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

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

java 1次浏览

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

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

示例1: visit

点赞 3

import org.semanticweb.owlapi.model.SWRLObjectPropertyAtom; //导入依赖的package包/类
public void visit(SWRLObjectPropertyAtom at) {
    OWLObjectPropertyExpression ope=at.getPredicate().getSimplified();
    OWLObjectProperty op=ope.getNamedProperty();
    SWRLVariable variable1;
    SWRLVariable variable2;
    if (ope.isAnonymous()) {
        variable1=getVariableFor(at.getSecondArgument());
        variable2=getVariableFor(at.getFirstArgument());
    }
    else {
        variable1=getVariableFor(at.getFirstArgument());
        variable2=getVariableFor(at.getSecondArgument());

    }
    SWRLAtom newAtom=m_factory.getSWRLObjectPropertyAtom(op,variable1,variable2);
    if (m_isPositive) {
        // head
        m_normalizedHeadAtoms.add(newAtom);
    }
    else {
        // body
        m_normalizedBodyAtoms.add(newAtom);
    }
}
 

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

示例2: checkRuleAtom

点赞 2

import org.semanticweb.owlapi.model.SWRLObjectPropertyAtom; //导入依赖的package包/类
protected void checkRuleAtom(SWRLAtom atom) {
    if (atom instanceof SWRLObjectPropertyAtom) {
        m_containsObjectProperties=true;
        OWLObjectProperty objectProperty=((SWRLObjectPropertyAtom)atom).getPredicate().getNamedProperty();
        boolean isGraphObjectProperty=m_graphObjectProperties.contains(objectProperty);
        boolean isNonGraphObjectProperty=m_objectPropertiesOccurringInOWLAxioms.contains(objectProperty);
        if (isGraphObjectProperty)
            m_containsGraphObjectProperties=true;
        if (isNonGraphObjectProperty)
            m_containsNonGraphObjectProperties=true;
        if (!isGraphObjectProperty && !isNonGraphObjectProperty)
            m_containsUndeterminedObjectProperties=true;
    }
}
 

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

示例3: visit

点赞 2

import org.semanticweb.owlapi.model.SWRLObjectPropertyAtom; //导入依赖的package包/类
public Atom visit(SWRLObjectPropertyAtom atom) {
    Variable variable1=toVariable(atom.getFirstArgument());
    Variable variable2=toVariable(atom.getSecondArgument());
    m_abstractVariables.add(variable1);
    m_abstractVariables.add(variable2);
    return getRoleAtom(atom.getPredicate().asOWLObjectProperty(),variable1,variable2);
}
 

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

示例4: visit

点赞 2

import org.semanticweb.owlapi.model.SWRLObjectPropertyAtom; //导入依赖的package包/类
public void visit(SWRLObjectPropertyAtom atom) {
    if (!(atom.getFirstArgument() instanceof SWRLIndividualArgument) || !(atom.getSecondArgument() instanceof SWRLIndividualArgument))
        throwVarError(atom);
    OWLObjectPropertyExpression ope=atom.getPredicate().getSimplified();
    OWLIndividual first=((SWRLIndividualArgument)atom.getFirstArgument()).getIndividual();
    OWLIndividual second=((SWRLIndividualArgument)atom.getSecondArgument()).getIndividual();
    if (first.isAnonymous() || second.isAnonymous())
        throwAnonIndError(atom);
    if (ope.isAnonymous())
        addFact(m_factory.getOWLObjectPropertyAssertionAxiom(ope.getNamedProperty(),second.asOWLNamedIndividual(),first.asOWLNamedIndividual()));
    else
        addFact(m_factory.getOWLObjectPropertyAssertionAxiom(ope.asOWLObjectProperty(),first.asOWLNamedIndividual(),second.asOWLNamedIndividual()));
}
 

开发者ID:wolpertinger-reasoner,
项目名称:Wolpertinger,
代码行数:14,
代码来源:OWLNormalization.java

示例5: visit

点赞 2

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

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

示例6: getSimplified

点赞 2

import org.semanticweb.owlapi.model.SWRLObjectPropertyAtom; //导入依赖的package包/类
@Override
public SWRLObjectPropertyAtom getSimplified() {
    OWLObjectPropertyExpression prop = getPredicate().getSimplified();
    if (prop.equals(getPredicate())) {
        return this;
    } else if (prop.isAnonymous()) {
        // Flip
        return new SWRLObjectPropertyAtomImpl(prop.getInverseProperty()
                .getSimplified(), getSecondArgument(), getFirstArgument());
    } else {
        // No need to flip
        return new SWRLObjectPropertyAtomImpl(prop, getFirstArgument(),
                getSecondArgument());
    }
}
 

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

示例7: equals

点赞 2

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

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

示例8: readObject

点赞 2

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

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

示例9: makeGraphObjectProperty

点赞 2

import org.semanticweb.owlapi.model.SWRLObjectPropertyAtom; //导入依赖的package包/类
protected void makeGraphObjectProperty(SWRLAtom atom) {
    if (atom instanceof SWRLObjectPropertyAtom) {
        OWLObjectProperty objectProperty=((SWRLObjectPropertyAtom)atom).getPredicate().getNamedProperty();
        m_graphObjectProperties.add(objectProperty);
    }
}
 

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

示例10: makeNonGraphObjectProperty

点赞 2

import org.semanticweb.owlapi.model.SWRLObjectPropertyAtom; //导入依赖的package包/类
protected void makeNonGraphObjectProperty(SWRLAtom atom) {
    if (atom instanceof SWRLObjectPropertyAtom) {
        OWLObjectProperty objectProperty=((SWRLObjectPropertyAtom)atom).getPredicate().getNamedProperty();
        m_objectPropertiesOccurringInOWLAxioms.add(objectProperty);
    }
}
 

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

示例11: visit

点赞 2

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

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

示例12: visit

点赞 2

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

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

示例13: visit

点赞 2

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

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

示例14: visit

点赞 2

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

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

示例15: visit

点赞 2

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

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

示例16: visit

点赞 2

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

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

示例17: writeObject

点赞 2

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

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


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