• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java SWRLClassAtom类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.semanticweb.owlapi.model.SWRLClassAtom的典型用法代码示例。如果您正苦于以下问题:Java SWRLClassAtom类的具体用法?Java SWRLClassAtom怎么用?Java SWRLClassAtom使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

SWRLClassAtom类属于org.semanticweb.owlapi.model包,在下文中一共展示了SWRLClassAtom类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: visit

点赞 2

import org.semanticweb.owlapi.model.SWRLClassAtom; //导入依赖的package包/类
public void visit(SWRLClassAtom atom) {
    if (!(atom.getArgument() instanceof SWRLIndividualArgument))
        throw new IllegalArgumentException("A SWRL rule contains a head atom "+atom+" with a variable that does not occur in the body. ");
    OWLIndividual ind=((SWRLIndividualArgument)atom.getArgument()).getIndividual();
    if (ind.isAnonymous())
        throwAnonIndError(atom);
    if (!isSimple(atom.getPredicate())) {
        OWLClassExpression definition=getDefinitionFor(atom.getPredicate(),m_alreadyExists);
        if (!m_alreadyExists[0])
            m_newInclusions.add(new OWLClassExpression[] { negative(definition),atom.getPredicate() });
        addFact(m_factory.getOWLClassAssertionAxiom(definition,ind.asOWLNamedIndividual()));
    }
    else
        addFact(m_factory.getOWLClassAssertionAxiom(atom.getPredicate(),ind.asOWLNamedIndividual()));
}
 

开发者ID:robertoyus,
项目名称:HermiT-android,
代码行数:16,
代码来源:OWLNormalization.java

示例2: visit

点赞 2

import org.semanticweb.owlapi.model.SWRLClassAtom; //导入依赖的package包/类
public Atom visit(SWRLClassAtom atom) {
    if (atom.getPredicate().isAnonymous())
        throw new IllegalStateException("Internal error: SWRL rule class atoms should be normalized to contain only named classes, but this class atom has a complex concept: "+atom.getPredicate());
    Variable variable=toVariable(atom.getArgument());
    m_abstractVariables.add(variable);
    return Atom.create(AtomicConcept.create(atom.getPredicate().asOWLClass().getIRI().toString()),variable);
}
 

开发者ID:robertoyus,
项目名称:HermiT-android,
代码行数:8,
代码来源:OWLClausification.java

示例3: equals

点赞 2

import org.semanticweb.owlapi.model.SWRLClassAtom; //导入依赖的package包/类
@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof SWRLClassAtom)) {
        return false;
    }
    SWRLClassAtom other = (SWRLClassAtom) obj;
    return other.getArgument().equals(getArgument())
            && other.getPredicate().equals(getPredicate());
}
 

开发者ID:matthewhorridge,
项目名称:owlapi-gwt,
代码行数:13,
代码来源:SWRLClassAtomImpl.java

示例4: compareObjectOfSameType

点赞 2

import org.semanticweb.owlapi.model.SWRLClassAtom; //导入依赖的package包/类
@Override
protected int compareObjectOfSameType(OWLObject object) {
    SWRLClassAtom other = (SWRLClassAtom) object;
    int diff = getPredicate().compareTo(other.getPredicate());
    if (diff != 0) {
        return diff;
    }
    return getArgument().compareTo(other.getArgument());
}
 

开发者ID:matthewhorridge,
项目名称:owlapi-gwt,
代码行数:10,
代码来源:SWRLClassAtomImpl.java

示例5: visit

点赞 2

import org.semanticweb.owlapi.model.SWRLClassAtom; //导入依赖的package包/类
@Override
public O visit(SWRLClassAtom node) {
    return doDefault(node);
}
 

开发者ID:matthewhorridge,
项目名称:owlapi-gwt,
代码行数:5,
代码来源:OWLObjectVisitorExAdapter.java

示例6: visit

点赞 2

import org.semanticweb.owlapi.model.SWRLClassAtom; //导入依赖的package包/类
@Override
public void visit(SWRLClassAtom node) {
    handleDefault(node);
}
 

开发者ID:matthewhorridge,
项目名称:owlapi-gwt,
代码行数:5,
代码来源:OWLObjectVisitorAdapter.java

示例7: visit

点赞 2

import org.semanticweb.owlapi.model.SWRLClassAtom; //导入依赖的package包/类
@Override
public void visit(SWRLClassAtom node) {
    type = RULE_OBJECT_TYPE_INDEX_BASE + 1;
}
 

开发者ID:matthewhorridge,
项目名称:owlapi-gwt,
代码行数:5,
代码来源:OWLObjectTypeIndexProvider.java

示例8: visit

点赞 2

import org.semanticweb.owlapi.model.SWRLClassAtom; //导入依赖的package包/类
@Override
public void visit(SWRLClassAtom node) {
    node.getArgument().accept(this);
}
 

开发者ID:matthewhorridge,
项目名称:owlapi-gwt,
代码行数:5,
代码来源:SWRLVariableExtractor.java

示例9: visit

点赞 2

import org.semanticweb.owlapi.model.SWRLClassAtom; //导入依赖的package包/类
@Override
public void visit(SWRLClassAtom node) {
    hashCode = primes[62];
    hashCode = hashCode * MULT + node.getArgument().hashCode();
    hashCode = hashCode * MULT + node.getPredicate().hashCode();
}
 

开发者ID:matthewhorridge,
项目名称:owlapi-gwt,
代码行数:7,
代码来源:HashCode.java

示例10: visit

点赞 2

import org.semanticweb.owlapi.model.SWRLClassAtom; //导入依赖的package包/类
@Override
public Set<OWLClassExpression> visit(SWRLClassAtom node) {
    return node.getPredicate().accept(this);
}
 

开发者ID:matthewhorridge,
项目名称:owlapi-gwt,
代码行数:5,
代码来源:OWLClassExpressionCollector.java

示例11: visit

点赞 2

import org.semanticweb.owlapi.model.SWRLClassAtom; //导入依赖的package包/类
@Override
public SWRLClassAtom visit(SWRLClassAtom node) {
    return node;
}
 

开发者ID:matthewhorridge,
项目名称:owlapi-gwt,
代码行数:5,
代码来源:SWRLRuleImpl.java

示例12: visit

点赞 2

import org.semanticweb.owlapi.model.SWRLClassAtom; //导入依赖的package包/类
@Override
public void visit(@Nonnull SWRLClassAtom node) {
    node.getArgument().accept(this);
    node.getPredicate().accept(this);
}
 

开发者ID:matthewhorridge,
项目名称:owlapi-gwt,
代码行数:6,
代码来源:AbstractEntityRegistrationManager.java

示例13: writeObject

点赞 2

import org.semanticweb.owlapi.model.SWRLClassAtom; //导入依赖的package包/类
@Override
protected void writeObject(SWRLClassAtom object, BinaryOWLOutputStream outputStream) throws IOException {
    outputStream.writeOWLObject(object.getPredicate());
    outputStream.writeOWLObject(object.getArgument());
}
 

开发者ID:matthewhorridge,
项目名称:binaryowl,
代码行数:6,
代码来源:SWRLClassAtomSerializer.java

示例14: readObject

点赞 2

import org.semanticweb.owlapi.model.SWRLClassAtom; //导入依赖的package包/类
@Override
protected SWRLClassAtom readObject(BinaryOWLInputStream inputStream) throws IOException, BinaryOWLParseException {
    OWLClassExpression predicate = inputStream.readOWLObject();
    SWRLIArgument arg = inputStream.readOWLObject();
    return inputStream.getDataFactory().getSWRLClassAtom(predicate, arg);
}
 

开发者ID:matthewhorridge,
项目名称:binaryowl,
代码行数:7,
代码来源:SWRLClassAtomSerializer.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)