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

项目:HermiT-android    文件:OWLClausification.java   
public Object visit(OWLDatatypeRestriction object) {
    if (!(object.getDatatype().isOWLDatatype()))
        throw new IllegalArgumentException("Datatype restrictions are supported only on OWL datatypes.");
    String datatypeURI=object.getDatatype().getIRI().toString();
    if (InternalDatatype.RDFS_LITERAL.getIRI().equals(datatypeURI)) {
        if (!object.getFacetRestrictions().isEmpty())
            throw new IllegalArgumentException("rdfs:Literal does not support any facets.");
        return InternalDatatype.RDFS_LITERAL;
    }
    String[] facetURIs=new String[object.getFacetRestrictions().size()];
    Constant[] facetValues=new Constant[object.getFacetRestrictions().size()];
    int index=0;
    for (OWLFacetRestriction facet : object.getFacetRestrictions()) {
        facetURIs[index]=facet.getFacet().getIRI().toURI().toString();
        facetValues[index]=(Constant)facet.getFacetValue().accept(this);
        index++;
    }
    DatatypeRestriction datatype=DatatypeRestriction.create(datatypeURI,facetURIs,facetValues);
    DatatypeRegistry.validateDatatypeRestriction(datatype);
    return datatype;
}
项目:Hermit_1.3.8_android    文件:OWLClausification.java   
public Object visit(OWLDatatypeRestriction object) {
    if (!(object.getDatatype().isOWLDatatype()))
        throw new IllegalArgumentException("Datatype restrictions are supported only on OWL datatypes.");
    String datatypeURI=object.getDatatype().getIRI().toString();
    if (InternalDatatype.RDFS_LITERAL.getIRI().equals(datatypeURI)) {
        if (!object.getFacetRestrictions().isEmpty())
            throw new IllegalArgumentException("rdfs:Literal does not support any facets.");
        return InternalDatatype.RDFS_LITERAL;
    }
    String[] facetURIs=new String[object.getFacetRestrictions().size()];
    Constant[] facetValues=new Constant[object.getFacetRestrictions().size()];
    int index=0;
    for (OWLFacetRestriction facet : object.getFacetRestrictions()) {
        facetURIs[index]=facet.getFacet().getIRI().toURI().toString();
        facetValues[index]=(Constant)facet.getFacetValue().accept(this);
        index++;
    }
    DatatypeRestriction datatype=DatatypeRestriction.create(datatypeURI,facetURIs,facetValues);
    DatatypeRegistry.validateDatatypeRestriction(datatype);
    return datatype;
}
项目:OntoBench    文件:OwlDatatypeRestrictionFeature.java   
@Override
public void addToOntology() {
  OWLDatatype datatype = factory.getOWLDatatype(":DatatypeRestrictionDatatype", pm);

  OWLFacetRestriction fr1 = factory.getOWLFacetRestriction(OWLFacet.MIN_LENGTH, 10);
  OWLLiteral patternLiteral = factory.getOWLLiteral("DatatypeRestrictionLiteral");
  OWLFacetRestriction fr2 = factory.getOWLFacetRestriction(OWLFacet.PATTERN, patternLiteral);

  OWLDatatypeRestriction restriction = factory.getOWLDatatypeRestriction(datatype, fr1, fr2);

  OWLDataProperty property = factory.getOWLDataProperty(":datatypeRestrictionProperty", pm);
  addToGenericDomainAndNewRange(property, restriction);
}
项目:owlapi-gwt    文件:NNF.java   
@Override
public OWLDataRange visit(OWLDatatypeRestriction node) {
    if (negated) {
        return dataFactory.getOWLDataComplementOf(node);
    } else {
        return node;
    }
}
项目:owlapi-gwt    文件:AbstractEntityRegistrationManager.java   
@Override
public void visit(@Nonnull OWLDatatypeRestriction node) {
    node.getDatatype().accept(this);
    for (OWLFacetRestriction facetRestriction : node.getFacetRestrictions()) {
        facetRestriction.accept(this);
    }
}
项目:HermiT-android    文件:OWLNormalization.java   
protected static boolean isAtomic(OWLDataRange dr) {
    return dr instanceof OWLDatatype || dr instanceof OWLDatatypeRestriction || dr instanceof OWLDataOneOf;
}
项目:HermiT-android    文件:OWLNormalization.java   
public OWLDataRange visit(OWLDatatypeRestriction node) {
    return node;
}
项目:HermiT-android    文件:ExpressionManager.java   
public OWLDataRange visit(OWLDatatypeRestriction o) {
    return o;
}
项目:HermiT-android    文件:ExpressionManager.java   
public OWLDataRange visit(OWLDatatypeRestriction o) {
    return m_factory.getOWLDataComplementOf(o);
}
项目:HermiT-android    文件:ExpressionManager.java   
public OWLDataRange visit(OWLDatatypeRestriction o) {
    return o;
}
项目:HermiT-android    文件:OWLClausification.java   
public void visit(OWLDatatypeRestriction node) {
    LiteralDataRange literalRange=m_dataRangeConverter.convertDataRange(node);
    m_headAtoms.add(Atom.create((DLPredicate)literalRange,X));
}
项目:elk-reasoner    文件:AbstractElkObjectConverter.java   
@Override
public OWLDatatypeRestriction visit(ElkDatatypeRestriction expression) {
    return owlFactory_.getOWLDatatypeRestriction(
            convert(expression.getDatatype()),
            toFacetRestrictionSet(expression.getFacetRestrictions()));
}
项目:elk-reasoner    文件:OwlConverter.java   
@SuppressWarnings("static-method")
public ElkDatatypeRestriction convert(
        OWLDatatypeRestriction owlDatatypeRestriction) {
    return new ElkDatatypeRestrictionWrap<OWLDatatypeRestriction>(
            owlDatatypeRestriction);
}
项目:elk-reasoner    文件:OwlDataRangeConverterVisitor.java   
@Override
public ElkDatatypeRestriction visit(
        OWLDatatypeRestriction owlDatatypeRestriction) {
    return CONVERTER.convert(owlDatatypeRestriction);
}
项目:Hermit_1.3.8_android    文件:OWLNormalization.java   
protected static boolean isAtomic(OWLDataRange dr) {
    return dr instanceof OWLDatatype || dr instanceof OWLDatatypeRestriction || dr instanceof OWLDataOneOf;
}
项目:Hermit_1.3.8_android    文件:OWLNormalization.java   
public OWLDataRange visit(OWLDatatypeRestriction node) {
    return node;
}
项目:Hermit_1.3.8_android    文件:ExpressionManager.java   
public OWLDataRange visit(OWLDatatypeRestriction o) {
    return o;
}
项目:Hermit_1.3.8_android    文件:ExpressionManager.java   
public OWLDataRange visit(OWLDatatypeRestriction o) {
    return m_factory.getOWLDataComplementOf(o);
}
项目:Hermit_1.3.8_android    文件:ExpressionManager.java   
public OWLDataRange visit(OWLDatatypeRestriction o) {
    return o;
}
项目:Hermit_1.3.8_android    文件:OWLClausification.java   
public void visit(OWLDatatypeRestriction node) {
    LiteralDataRange literalRange=m_dataRangeConverter.convertDataRange(node);
    m_headAtoms.add(Atom.create((DLPredicate)literalRange,X));
}
项目:Wolpertinger    文件:OWLNormalization.java   
protected static boolean isAtomic(OWLDataRange dr) {
    return dr instanceof OWLDatatype || dr instanceof OWLDatatypeRestriction || dr instanceof OWLDataOneOf;
}
项目:Wolpertinger    文件:OWLNormalization.java   
public OWLDataRange visit(OWLDatatypeRestriction node) {
    return node;
}
项目:Wolpertinger    文件:ExpressionManager.java   
public OWLDataRange visit(OWLDatatypeRestriction o) {
    return o;
}
项目:Wolpertinger    文件:ExpressionManager.java   
public OWLDataRange visit(OWLDatatypeRestriction o) {
    return m_factory.getOWLDataComplementOf(o);
}
项目:Wolpertinger    文件:ExpressionManager.java   
public OWLDataRange visit(OWLDatatypeRestriction o) {
    return o;
}
项目:owlapi-gwt    文件:OWLDataVisitorExAdapter.java   
@Override
public O visit(OWLDatatypeRestriction node) {
    return doDefault(node);
}
项目:owlapi-gwt    文件:OWLObjectVisitorAdapter.java   
@Override
public void visit(OWLDatatypeRestriction node) {
    handleDefault(node);
}
项目:owlapi-gwt    文件:OWLObjectTypeIndexProvider.java   
@Override
public void visit(OWLDatatypeRestriction node) {
    type = DATA_TYPE_INDEX_BASE + 6;
}
项目:owlapi-gwt    文件:HashCode.java   
@Override
public void visit(OWLDatatypeRestriction node) {
    hashCode = primes[54];
    hashCode = hashCode * MULT + node.getDatatype().hashCode();
    hashCode = hashCode * MULT + node.getFacetRestrictions().hashCode();
}
项目:SVoNt    文件:PelletOWL2ELProfile.java   
public Object visit(OWLDatatypeRestriction node) {
  profileViolations.add(new UseOfIllegalDataRange(getCurrentOntology(), getCurrentAxiom(), node));
  return null;
}
项目:binaryowl    文件:OWLDatatypeRestrictionSerializer.java   
@Override
protected void writeObject(OWLDatatypeRestriction object, BinaryOWLOutputStream outputStream) throws IOException {
    outputStream.writeOWLObject(object.getDatatype());
    outputStream.writeOWLObjects(object.getFacetRestrictions());
}
项目:binaryowl    文件:OWLDatatypeRestrictionSerializer.java   
@Override
protected OWLDatatypeRestriction readObject(BinaryOWLInputStream inputStream) throws IOException, BinaryOWLParseException {
    OWLDatatype datatype = inputStream.readOWLObject();
    Set<OWLFacetRestriction> facetRestrictions = inputStream.readOWLObjects();
    return inputStream.getDataFactory().getOWLDatatypeRestriction(datatype, facetRestrictions);
}