Java 类org.semanticweb.owlapi.model.SWRLDataRangeAtom 实例源码

项目:HermiT-android    文件:OWLNormalization.java   
public void visit(SWRLDataRangeAtom atom) {
    if (atom.getArgument() instanceof SWRLVariable)
        throwVarError(atom);
    // dr(literal) :-
    // convert to: ClassAssertion(DataSomeValuesFrom(freshDP DataOneOf(literal)) freshIndividual)
    // and top -> \forall freshDP.dr
    OWLLiteral lit=((SWRLLiteralArgument)atom.getArgument()).getLiteral();
    OWLDataRange dr=atom.getPredicate();
    OWLNamedIndividual freshIndividual=getFreshIndividual();
    OWLDataProperty freshDP=getFreshDataProperty();
    OWLDataSomeValuesFrom some=m_factory.getOWLDataSomeValuesFrom(freshDP,m_factory.getOWLDataOneOf(lit));
    OWLClassExpression definition=getDefinitionFor(some,m_alreadyExists);
    if (!m_alreadyExists[0])
        m_newInclusions.add(new OWLClassExpression[] { negative(definition),some });
    addFact(m_factory.getOWLClassAssertionAxiom(definition,freshIndividual));
    m_newInclusions.add(new OWLClassExpression[] { m_factory.getOWLDataAllValuesFrom(freshDP,dr) });
}
项目:HermiT-android    文件:OWLNormalization.java   
public void visit(SWRLDataRangeAtom at) {
    OWLDataRange dr=at.getPredicate();
    SWRLDArgument argument=at.getArgument();
    if (!(argument instanceof SWRLVariable))
        throw new IllegalArgumentException("A SWRL rule contains a data range with an argument that is not a literal, and such rules are not supported.");
    if (!m_isPositive)
        dr=m_factory.getOWLDataComplementOf(dr);
    dr=m_expressionManager.getNNF(m_expressionManager.getSimplified(dr));
    if (dr instanceof OWLDataIntersectionOf || dr instanceof OWLDataUnionOf) {
        OWLDatatype definition=getDefinitionFor(dr,m_alreadyExists);
        if (!m_alreadyExists[0])
            m_dataRangeInclusions.add(new OWLDataRange[] { negative(definition),dr });
        dr=definition;
    }
    SWRLAtom atom=m_factory.getSWRLDataRangeAtom(dr,argument);
    m_normalizedHeadAtoms.add(atom);
    m_headDataRangeVariables.add((SWRLVariable)argument);
}
项目:Hermit_1.3.8_android    文件:OWLNormalization.java   
public void visit(SWRLDataRangeAtom atom) {
    if (atom.getArgument() instanceof SWRLVariable)
        throwVarError(atom);
    // dr(literal) :-
    // convert to: ClassAssertion(DataSomeValuesFrom(freshDP DataOneOf(literal)) freshIndividual)
    // and top -> \forall freshDP.dr
    OWLLiteral lit=((SWRLLiteralArgument)atom.getArgument()).getLiteral();
    OWLDataRange dr=atom.getPredicate();
    OWLNamedIndividual freshIndividual=getFreshIndividual();
    OWLDataProperty freshDP=getFreshDataProperty();
    OWLDataSomeValuesFrom some=m_factory.getOWLDataSomeValuesFrom(freshDP,m_factory.getOWLDataOneOf(lit));
    OWLClassExpression definition=getDefinitionFor(some,m_alreadyExists);
    if (!m_alreadyExists[0])
        m_newInclusions.add(new OWLClassExpression[] { negative(definition),some });
    addFact(m_factory.getOWLClassAssertionAxiom(definition,freshIndividual));
    m_newInclusions.add(new OWLClassExpression[] { m_factory.getOWLDataAllValuesFrom(freshDP,dr) });
}
项目:Hermit_1.3.8_android    文件:OWLNormalization.java   
public void visit(SWRLDataRangeAtom at) {
    OWLDataRange dr=at.getPredicate();
    SWRLDArgument argument=at.getArgument();
    if (!(argument instanceof SWRLVariable))
        throw new IllegalArgumentException("A SWRL rule contains a data range with an argument that is not a literal, and such rules are not supported.");
    if (!m_isPositive)
        dr=m_factory.getOWLDataComplementOf(dr);
    dr=m_expressionManager.getNNF(m_expressionManager.getSimplified(dr));
    if (dr instanceof OWLDataIntersectionOf || dr instanceof OWLDataUnionOf) {
        OWLDatatype definition=getDefinitionFor(dr,m_alreadyExists);
        if (!m_alreadyExists[0])
            m_dataRangeInclusions.add(new OWLDataRange[] { negative(definition),dr });
        dr=definition;
    }
    SWRLAtom atom=m_factory.getSWRLDataRangeAtom(dr,argument);
    m_normalizedHeadAtoms.add(atom);
    m_headDataRangeVariables.add((SWRLVariable)argument);
}
项目:Wolpertinger    文件:OWLNormalization.java   
public void visit(SWRLDataRangeAtom atom) {
    if (atom.getArgument() instanceof SWRLVariable)
        throwVarError(atom);
    // dr(literal) :-
    // convert to: ClassAssertion(DataSomeValuesFrom(freshDP DataOneOf(literal)) freshIndividual)
    // and top -> \forall freshDP.dr
    OWLLiteral lit=((SWRLLiteralArgument)atom.getArgument()).getLiteral();
    OWLDataRange dr=atom.getPredicate();
    OWLNamedIndividual freshIndividual=getFreshIndividual();
    OWLDataProperty freshDP=getFreshDataProperty();
    OWLDataSomeValuesFrom some=m_factory.getOWLDataSomeValuesFrom(freshDP,m_factory.getOWLDataOneOf(lit));
    OWLClassExpression definition=getDefinitionFor(some,m_alreadyExists);
    if (!m_alreadyExists[0])
        m_newInclusions.add(new OWLClassExpression[] { negative(definition),some });
    addFact(m_factory.getOWLClassAssertionAxiom(definition,freshIndividual));
    m_newInclusions.add(new OWLClassExpression[] { m_factory.getOWLDataAllValuesFrom(freshDP,dr) });
}
项目:Wolpertinger    文件:OWLNormalization.java   
public void visit(SWRLDataRangeAtom at) {
    OWLDataRange dr=at.getPredicate();
    SWRLDArgument argument=at.getArgument();
    if (!(argument instanceof SWRLVariable))
        throw new IllegalArgumentException("A SWRL rule contains a data range with an argument that is not a literal, and such rules are not supported.");
    if (!m_isPositive)
        dr=m_factory.getOWLDataComplementOf(dr);
    dr=m_expressionManager.getNNF(m_expressionManager.getSimplified(dr));
    if (dr instanceof OWLDataIntersectionOf || dr instanceof OWLDataUnionOf) {
        OWLDatatype definition=getDefinitionFor(dr,m_alreadyExists);
        if (!m_alreadyExists[0])
            m_dataRangeInclusions.add(new OWLDataRange[] { negative(definition),dr });
        dr=definition;
    }
    SWRLAtom atom=m_factory.getSWRLDataRangeAtom(dr,argument);
    m_normalizedHeadAtoms.add(atom);
    m_headDataRangeVariables.add((SWRLVariable)argument);
}
项目:owlapi-gwt    文件:SWRLDataRangeAtomImpl.java   
@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof SWRLDataRangeAtom)) {
        return false;
    }
    SWRLDataRangeAtom other = (SWRLDataRangeAtom) obj;
    return other.getArgument().equals(getArgument())
            && other.getPredicate().equals(getPredicate());
}
项目:owlapi-gwt    文件:SWRLDataRangeAtomImpl.java   
@Override
protected int compareObjectOfSameType(OWLObject object) {
    SWRLDataRangeAtom other = (SWRLDataRangeAtom) object;
    int diff = getPredicate().compareTo(other.getPredicate());
    if (diff != 0) {
        return diff;
    }
    return getArgument().compareTo(other.getArgument());
}
项目:HermiT-android    文件:OWLClausification.java   
public Atom visit(SWRLDataRangeAtom atom) {
    Variable variable=toVariable(atom.getArgument());
    LiteralDataRange literalRange=m_dataRangeConverter.convertDataRange(atom.getPredicate());
    return Atom.create((DLPredicate)literalRange,variable);
}
项目:Hermit_1.3.8_android    文件:OWLClausification.java   
public Atom visit(SWRLDataRangeAtom atom) {
    Variable variable=toVariable(atom.getArgument());
    LiteralDataRange literalRange=m_dataRangeConverter.convertDataRange(atom.getPredicate());
    return Atom.create((DLPredicate)literalRange,variable);
}
项目:owlapi-gwt    文件:OWLObjectVisitorExAdapter.java   
@Override
public O visit(SWRLDataRangeAtom node) {
    return doDefault(node);
}
项目:owlapi-gwt    文件:OWLObjectVisitorAdapter.java   
@Override
public void visit(SWRLDataRangeAtom node) {
    handleDefault(node);
}
项目:owlapi-gwt    文件:OWLObjectTypeIndexProvider.java   
@Override
public void visit(SWRLDataRangeAtom node) {
    type = RULE_OBJECT_TYPE_INDEX_BASE + 2;
}
项目:owlapi-gwt    文件:SWRLVariableExtractor.java   
@Override
public void visit(SWRLDataRangeAtom node) {
    node.getArgument().accept(this);
}
项目:owlapi-gwt    文件:HashCode.java   
@Override
public void visit(SWRLDataRangeAtom node) {
    hashCode = primes[63];
    hashCode = hashCode * MULT + node.getArgument().hashCode();
    hashCode = hashCode * MULT + node.getPredicate().hashCode();
}
项目:owlapi-gwt    文件:SWRLRuleImpl.java   
@Override
public SWRLDataRangeAtom visit(SWRLDataRangeAtom node) {
    return node;
}
项目:owlapi-gwt    文件:AbstractEntityRegistrationManager.java   
@Override
public void visit(@Nonnull SWRLDataRangeAtom node) {
    node.getArgument().accept(this);
    node.getPredicate().accept(this);
}
项目:binaryowl    文件:SWRLDataRangeAtomSerializer.java   
@Override
protected void writeObject(SWRLDataRangeAtom object, BinaryOWLOutputStream outputStream) throws IOException {
    outputStream.writeOWLObject(object.getPredicate());
    outputStream.writeOWLObject(object.getArgument());
}
项目:binaryowl    文件:SWRLDataRangeAtomSerializer.java   
@Override
protected SWRLDataRangeAtom readObject(BinaryOWLInputStream inputStream) throws IOException, BinaryOWLParseException {
    OWLDataRange predicate = inputStream.readOWLObject();
    SWRLDArgument argument = inputStream.readOWLObject();
    return inputStream.getDataFactory().getSWRLDataRangeAtom(predicate, argument);
}