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

项目: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);
}
项目:elk-reasoner    文件:AbstractElkObjectConverter.java   
Set<OWLFacetRestriction> toFacetRestrictionSet(
        List<? extends ElkFacetRestriction> input) {
    Set<OWLFacetRestriction> result = new HashSet<OWLFacetRestriction>(
            input.size());
    for (ElkFacetRestriction next : input) {
        result.add(convert(next));
    }
    return result;
}
项目:elk-reasoner    文件:ElkDatatypeRestrictionWrap.java   
@Override
public List<? extends ElkFacetRestriction> getFacetRestrictions() {
    List<ElkFacetRestriction> result = new ArrayList<ElkFacetRestriction>();
    for (OWLFacetRestriction frstr : this.owlObject.getFacetRestrictions()) {
        result.add(converter.convert(frstr));
    }
    return result;
}
项目:elk-reasoner    文件:ElkConverter.java   
@Override
public OWLFacetRestriction convert(ElkFacetRestriction input) {
    if (input instanceof ElkFacetRestrictionWrap<?>) {
        return ((ElkFacetRestrictionWrap<?>) input).getOwlObject();
    }
    // else
    return visit(input);
}
项目:owlapi-gwt    文件:AbstractEntityRegistrationManager.java   
@Override
public void visit(@Nonnull OWLDatatypeRestriction node) {
    node.getDatatype().accept(this);
    for (OWLFacetRestriction facetRestriction : node.getFacetRestrictions()) {
        facetRestriction.accept(this);
    }
}
项目:binaryowl    文件:OWLFacetRestrictionSerializer.java   
@Override
protected OWLFacetRestriction readObject(BinaryOWLInputStream inputStream) throws IOException, BinaryOWLParseException {
    int facetIndex = inputStream.readInt();
    OWLFacet facet = getFacet(facetIndex);
    OWLLiteral literal = inputStream.readOWLObject();
    return inputStream.getDataFactory().getOWLFacetRestriction(facet, literal);
}
项目:HermiT-android    文件:OWLNormalization.java   
public OWLDataRange visit(OWLFacetRestriction node) {
    throw new IllegalStateException("Internal error: We shouldn't visit facet restrictions during normalization. ");
}
项目:HermiT-android    文件:ExpressionManager.java   
public OWLDataRange visit(OWLFacetRestriction node) {
    return null;
}
项目:HermiT-android    文件:ExpressionManager.java   
public OWLDataRange visit(OWLFacetRestriction o) {
    return null;
}
项目:HermiT-android    文件:ExpressionManager.java   
public OWLDataRange visit(OWLFacetRestriction o) {
    return null;
}
项目:HermiT-android    文件:OWLClausification.java   
public void visit(OWLFacetRestriction node) {
    throw new IllegalStateException("Internal error: Invalid normal form. ");
}
项目:HermiT-android    文件:OWLClausification.java   
public Object visit(OWLFacetRestriction object) {
    throw new IllegalStateException("Internal error: should not get in here.");
}
项目:elk-reasoner    文件:AbstractElkObjectConverter.java   
@Override
public OWLFacetRestriction visit(ElkFacetRestriction restriction) {
    return owlFactory_.getOWLFacetRestriction(
            OWLFacet.getFacet(convert(restriction.getConstrainingFacet())),
            convert(restriction.getRestrictionValue()));
}
项目:elk-reasoner    文件:OwlConverter.java   
@SuppressWarnings("static-method")
public ElkFacetRestriction convert(
        OWLFacetRestriction owlFacetRestriction) {
    return new ElkFacetRestrictionWrap<OWLFacetRestriction>(
            owlFacetRestriction);
}
项目:Hermit_1.3.8_android    文件:OWLNormalization.java   
public OWLDataRange visit(OWLFacetRestriction node) {
    throw new IllegalStateException("Internal error: We shouldn't visit facet restrictions during normalization. ");
}
项目:Hermit_1.3.8_android    文件:ExpressionManager.java   
public OWLDataRange visit(OWLFacetRestriction node) {
    return null;
}
项目:Hermit_1.3.8_android    文件:ExpressionManager.java   
public OWLDataRange visit(OWLFacetRestriction o) {
    return null;
}
项目:Hermit_1.3.8_android    文件:ExpressionManager.java   
public OWLDataRange visit(OWLFacetRestriction o) {
    return null;
}
项目:Hermit_1.3.8_android    文件:OWLClausification.java   
public void visit(OWLFacetRestriction node) {
    throw new IllegalStateException("Internal error: Invalid normal form. ");
}
项目:Hermit_1.3.8_android    文件:OWLClausification.java   
public Object visit(OWLFacetRestriction object) {
    throw new IllegalStateException("Internal error: should not get in here.");
}
项目:Wolpertinger    文件:OWLNormalization.java   
public OWLDataRange visit(OWLFacetRestriction node) {
    throw new IllegalStateException("Internal error: We shouldn't visit facet restrictions during normalization. ");
}
项目:Wolpertinger    文件:ExpressionManager.java   
public OWLDataRange visit(OWLFacetRestriction node) {
    return null;
}
项目:Wolpertinger    文件:ExpressionManager.java   
public OWLDataRange visit(OWLFacetRestriction o) {
    return null;
}
项目:Wolpertinger    文件:ExpressionManager.java   
public OWLDataRange visit(OWLFacetRestriction o) {
    return null;
}
项目:owlapi-gwt    文件:OWLDatatypeRestrictionImpl_CustomFieldSerializer.java   
public static OWLDatatypeRestrictionImpl instantiate(SerializationStreamReader streamReader) throws SerializationException {
    OWLDatatype datatype = (OWLDatatype) streamReader.readObject();
    Set<OWLFacetRestriction> facetRestrictions = CustomFieldSerializerUtil.deserializeSet(streamReader);
    return new OWLDatatypeRestrictionImpl(datatype, facetRestrictions);
}
项目:owlapi-gwt    文件:OWLDataVisitorExAdapter.java   
@Override
public O visit(OWLFacetRestriction node) {
    return doDefault(node);
}
项目:owlapi-gwt    文件:OWLObjectVisitorAdapter.java   
@Override
public void visit(OWLFacetRestriction node) {
    handleDefault(node);
}
项目:owlapi-gwt    文件:OWLObjectTypeIndexProvider.java   
@Override
public void visit(OWLFacetRestriction node) {
    type = DATA_TYPE_INDEX_BASE + 7;
}
项目:owlapi-gwt    文件:HashCode.java   
@Override
public void visit(OWLFacetRestriction node) {
    hashCode = primes[59];
    hashCode = hashCode * MULT + node.getFacet().hashCode();
    hashCode = hashCode * MULT + node.getFacetValue().hashCode();
}
项目:owlapi-gwt    文件:AbstractEntityRegistrationManager.java   
@Override
public void visit(@Nonnull OWLFacetRestriction node) {
    node.getFacetValue().accept(this);
}
项目:binaryowl    文件:OWLFacetRestrictionSerializer.java   
@Override
protected void writeObject(OWLFacetRestriction object, BinaryOWLOutputStream outputStream) throws IOException {
    int facetMarker = getFacetMarker(object.getFacet());
    outputStream.writeInt(facetMarker);
    outputStream.writeOWLObject(object.getFacetValue());
}
项目: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);
}
项目:elk-reasoner    文件:AbstractElkObjectConverter.java   
abstract OWLFacetRestriction convert(ElkFacetRestriction input);