@Override public OWLFacetRestriction getOWLObject() { return getOWLDataFactory().getOWLFacetRestriction(facet, constant); } }
public static <N extends Number> OWLDataRange getMinMaxInclusiveRestrictedInteger(OWLDataFactory dataFactory, N minInclusive, N maxInclusive) { OWLDatatype dr = getDatatype(dataFactory, minInclusive); Set<OWLFacetRestriction> facetRestrictions = new HashSet<OWLFacetRestriction>(); facetRestrictions.add(dataFactory.getOWLFacetRestriction(OWLFacet.MIN_INCLUSIVE, getTypedConstant(dataFactory, minInclusive))); facetRestrictions.add(dataFactory.getOWLFacetRestriction(OWLFacet.MAX_INCLUSIVE, getTypedConstant(dataFactory, maxInclusive))); return dataFactory.getOWLDatatypeRestriction(dr, facetRestrictions); }
public static <N extends Number> OWLDataRange getMinMaxExclusiveRestrictedInteger(OWLDataFactory dataFactory, N minExclusive, N maxExclusive) { OWLDatatype dr = getDatatype(dataFactory, minExclusive); Set<OWLFacetRestriction> facetRestrictions = new HashSet<OWLFacetRestriction>(); facetRestrictions.add(dataFactory.getOWLFacetRestriction(OWLFacet.MIN_EXCLUSIVE, getTypedConstant(dataFactory, minExclusive))); facetRestrictions.add(dataFactory.getOWLFacetRestriction(OWLFacet.MAX_EXCLUSIVE, getTypedConstant(dataFactory, maxExclusive))); return dataFactory.getOWLDatatypeRestriction(dr, facetRestrictions); }
private OWLDatatypeRestriction asDatatypeRestriction(OWLDataProperty dp, OWLLiteral value, OWLFacet facet) { OWLDatatype datatype = reasoner.getDatatype(dp); OWLDatatypeRestriction restriction = df.getOWLDatatypeRestriction( datatype, Collections.singleton(df.getOWLFacetRestriction( facet, value))); return restriction; }
@Override @Nullable public OWLFacetRestriction translate(IRI firstObject) { for (OWLFacet facet : OWLFacet.values()) { OWLLiteral lit = consumer.getLiteralObject(firstObject, facet.getIRI(), true); if (lit != null) { return consumer.getDataFactory().getOWLFacetRestriction(facet, lit); } } return null; } }
@Override @Nullable public OWLFacetRestriction translate(IRI firstObject) { for (OWLFacet facet : OWLFacet.values()) { OWLLiteral lit = consumer.getLiteralObject(firstObject, facet.getIRI(), true); if (lit != null) { return consumer.getDataFactory().getOWLFacetRestriction(facet, lit); } } return null; } }
@Override @Nullable public OWLFacetRestriction translate(IRI firstObject) { for (OWLFacet facet : OWLFacet.values()) { OWLLiteral lit = consumer.getLiteralObject(firstObject, facet.getIRI(), true); if (lit != null) { return consumer.getDataFactory().getOWLFacetRestriction(facet, lit); } } return null; } }
@Override @Nullable public OWLFacetRestriction translate(IRI firstObject) { for (OWLFacet facet : OWLFacet.values()) { OWLLiteral lit = consumer.getLiteralObject(firstObject, facet.getIRI(), true); if (lit != null) { return consumer.getDataFactory().getOWLFacetRestriction(facet, lit); } } return null; } }
final public OWLFacetRestriction DataRangeFacetRestriction() throws ParseException {IRI iri; OWLLiteral con; iri = IRI(); con = Literal(); return df.getOWLFacetRestriction(OWLFacet.getFacetByShortName(iri.getFragment()), con); }
final public OWLFacetRestriction DataRangeFacetRestriction() throws ParseException {IRI iri; OWLLiteral con; iri = IRI(); con = Literal(); return df.getOWLFacetRestriction(OWLFacet.getFacetByShortName(iri.getFragment()), con); }
final public OWLFacetRestriction DataRangeFacetRestriction() throws ParseException { IRI iri; OWLLiteral con; iri = IRI(); con = Literal(); OWLFacet v = OWLFacet.getFacetByShortName(iri.getFragment()); return dataFactory.getOWLFacetRestriction(v, con); }
final public OWLFacetRestriction DataRangeFacetRestriction() throws ParseException { IRI iri; OWLLiteral con; iri = IRI(); con = Literal(); OWLFacet v = OWLFacet.getFacetByShortName(iri.getFragment()); {if (true) return dataFactory.getOWLFacetRestriction(v, con);} throw new Error("Missing return statement in function"); }
@Override public OWLFacetRestriction translate(IRI firstObject) { for(OWLFacet facet : OWLFacet.values()) { OWLLiteral lit = consumer.getLiteralObject(firstObject, facet.getIRI(), true); if(lit != null) { return consumer.getDataFactory().getOWLFacetRestriction(facet, lit); } } return null; } }
public OWLFacetRestriction translate(IRI firstObject) { for(OWLFacet facet : OWLFacet.values()) { OWLLiteral lit = consumer.getLiteralObject(firstObject, facet.getIRI(), true); if(lit != null) { return consumer.getDataFactory().getOWLFacetRestriction(facet, lit); } } return null; } }
final public OWLFacetRestriction DataRangeFacetRestriction() throws ParseException {IRI iri; OWLLiteral con; iri = IRI(); con = Literal(); return df.getOWLFacetRestriction(OWLFacet.getFacetByShortName(iri.getFragment()), con); }
@Override public Object visit(OWLFacetRestriction node) { return visit(node, () -> df.getOWLFacetRestriction(t(node.getFacet()), t(node.getFacetValue()))); }
@Override public Object visit(OWLFacetRestriction node) { return visit(node, () -> df.getOWLFacetRestriction(t(node.getFacet()), t(node.getFacetValue()))); }
@Override public Object read(OWLInputStream in) throws IOException { int ordinal = IOUtils.readInt(in.getInputStream()); OWLFacet facet = OWLFacet.values()[ordinal]; OWLLiteral literal = (OWLLiteral) in.read(); return in.getOWLDataFactory().getOWLFacetRestriction(facet, literal); }
private OWLDataRange asMaxFacet(OWLDataFactory df, Set<Literal> literals){ //return Boolean datatype because it doesn't make sense to return a facet of Boolean values if(getOWLDatatype(df, literals).equals(df.getBooleanOWLDatatype())){ return df.getBooleanOWLDatatype(); } Literal max = getMax(literals); OWLFacetRestriction maxRestriction = df.getOWLFacetRestriction(OWLFacet.MAX_INCLUSIVE, asOWLLiteral(df, max)); return df.getOWLDatatypeRestriction(getOWLDatatype(df, literals), maxRestriction); }
public void setSingleRestrictionTarget(OWLFacet facetType, String solution) { this.target = df.getOWLDataSomeValuesFrom( df.getOWLDataProperty(IRI.create(prefix + "value")), df.getOWLDatatypeRestriction( restrictionType, df.getOWLFacetRestriction( facetType, df.getOWLLiteral(solution, restrictionType)))); }