private static Stream<OWL2Datatype> stream() { return Stream.of(values()); }
private static Stream<OWL2Datatype> stream() { return Stream.of(values()); }
private static Stream<OWL2Datatype> stream() { return Stream.of(values()); }
@Nonnull static Set<IRI> init() { List<IRI> iris = new ArrayList<>(); for (OWL2Datatype v : OWL2Datatype.values()) { iris.add(v.iri); } Collections.sort(iris); return CollectionFactory.getCopyOnRequestSetFromImmutableCollection(iris); }
public static void main(String[] args) { for(OWL2Datatype v : OWL2Datatype.values()) { System.out.println(v); } boolean matches = OWL2Datatype.OWL_RATIONAL.getPattern().matcher("22/7").matches(); System.out.println("MATCH: " + matches); } }
public Set<OWLDatatype> getBuiltinDatatypes(){ Set<OWLDatatype> datatypes = new HashSet<OWLDatatype>(); final OWLDataFactory df = mngr.getOWLDataFactory(); datatypes.add(df.getTopDatatype()); for (OWL2Datatype dt : OWL2Datatype.values()) { datatypes.add(df.getOWLDatatype(dt.getIRI())); } return datatypes; }
public Set<OWLDatatype> getBuiltinDatatypes(){ Set<OWLDatatype> datatypes = new HashSet<>(); final OWLDataFactory df = mngr.getOWLDataFactory(); datatypes.add(df.getTopDatatype()); for (OWL2Datatype dt : OWL2Datatype.values()) { datatypes.add(df.getOWLDatatype(dt.getIRI())); } return datatypes; }
public Set<OWLDatatype> getBuiltinDatatypes(){ Set<OWLDatatype> datatypes = new HashSet<>(); final OWLDataFactory df = mngr.getOWLDataFactory(); datatypes.add(df.getTopDatatype()); for (OWL2Datatype dt : OWL2Datatype.values()) { datatypes.add(df.getOWLDatatype(dt.getIRI())); } return datatypes; }
public Set<OWLDatatype> getBuiltinDatatypes(){ Set<OWLDatatype> datatypes = new HashSet<OWLDatatype>(); final OWLDataFactory df = mngr.getOWLDataFactory(); datatypes.add(df.getTopDatatype()); for (OWL2Datatype dt : OWL2Datatype.values()) { datatypes.add(df.getOWLDatatype(dt.getIRI())); } return datatypes; }
public void initialise() { for(OWLRDFVocabulary vocabulary : OWLRDFVocabulary.values()) { addOWLRDFVocabulary(vocabulary); } for(OWL2Datatype dt : OWL2Datatype.values()) { wellKnownRenderings.put(dt.getIRI(), dt.getPrefixedName()); } for(DublinCoreVocabulary dublinCoreVocabulary : DublinCoreVocabulary.values()) { wellKnownRenderings.put(dublinCoreVocabulary.getIRI(), dublinCoreVocabulary.getPrefixedName()); } }
/** * Given a URI that identifies an OWLDatatype, this method obtains the * corresponding OWLDatatypeVocabulary * @param datatype The datatype URI * @return The OWLDatatypeVocabulary * @throws OWLRuntimeException if the specified URI is not a built in datatype URI */ public static OWL2Datatype getDatatype(IRI datatype) { if (!isBuiltIn(datatype)) { throw new OWLRuntimeException(datatype + " is not a built in datatype!"); } for (OWL2Datatype v : values()) { if (v.getIRI().equals(datatype)) { return v; } } throw new OWLRuntimeException(datatype + " is not a built in datatype!"); }
private void loadOwl2Datatypes() { for(OWL2Datatype d : OWL2Datatype.values()) { shortFormCache.put(entityProvider.getOWLDatatype(d.getIRI()), d.getPrefixedName()); } }
public void initialise() { for(OWLRDFVocabulary vocabulary : OWLRDFVocabulary.values()) { addOWLRDFVocabulary(vocabulary); } for(OWL2Datatype dt : OWL2Datatype.values()) { wellKnownRenderings.put(dt.getIRI(), dt.getPrefixedName()); } for(DublinCoreVocabulary dublinCoreVocabulary : DublinCoreVocabulary.values()) { wellKnownRenderings.put(dublinCoreVocabulary.getIRI(), dublinCoreVocabulary.getPrefixedName()); } }
/** * Given an IRI that identifies an {@link OWLDatatype}, this method obtains * the corresponding {@code OWL2Datatype}. * * @param datatype * The datatype IRI. Not {@code null}. * @return The {@code OWL2Datatype} that has the specified {@link IRI}. * @throws OWLRuntimeException * if the specified IRI is not a built in datatype IRI. */ @Nonnull public static OWL2Datatype getDatatype(IRI datatype) { if (!isBuiltIn(datatype)) { throw new OWLRuntimeException(datatype + " is not a built in datatype!"); } for (OWL2Datatype v : values()) { if (v.iri.equals(datatype)) { return v; } } throw new OWLRuntimeException(datatype + " is not a built in datatype!"); }
/** * Given an IRI that identifies an {@link org.semanticweb.owlapi.model.OWLDatatype}, this method obtains the * corresponding {@link OWL2Datatype}. * @param datatype The datatype IRI. Not {@code null}. * @return The {@link OWL2Datatype} that has the specified {@link IRI}. * @throws OWLRuntimeException if the specified IRI is not a built in datatype IRI. */ public static OWL2Datatype getDatatype(IRI datatype) { if (!isBuiltIn(datatype)) { throw new OWLRuntimeException(datatype + " is not a built in datatype!"); } for (OWL2Datatype v : values()) { if (v.iri.equals(datatype)) { return v; } } throw new OWLRuntimeException(datatype + " is not a built in datatype!"); }
BUILT_IN_AP_IRIS.forEach(annPropertyIRIs::add); dataRangeIRIs.add(RDFS_LITERAL.getIRI()); Stream.of(OWL2Datatype.values()).forEach(v -> dataRangeIRIs.add(v.getIRI())); if (!configuration.isStrict()) { Stream.of(XSDVocabulary.values()).forEach(v -> dataRangeIRIs.add(v.getIRI()));
BUILT_IN_AP_IRIS.forEach(annPropertyIRIs::add); dataRangeIRIs.add(RDFS_LITERAL.getIRI()); Stream.of(OWL2Datatype.values()).forEach(v -> dataRangeIRIs.add(v.getIRI())); if (!configuration.isStrict()) { Stream.of(XSDVocabulary.values()).forEach(v -> dataRangeIRIs.add(v.getIRI()));
dataTypeNames.add(v.getPrefixedName()); for (OWL2Datatype v : OWL2Datatype.values()) { dataTypeNames.add(v.getIRI().toString()); dataTypeNames.add(v.getIRI().toQuotedString());
dataTypeNames.add(v.getPrefixedName()); for (OWL2Datatype v : OWL2Datatype.values()) { dataTypeNames.add(v.getIRI().toString()); dataTypeNames.add(v.getIRI().toQuotedString());
private void setupBuiltinObjectRenderings(OWLOntology rootOntology) { OWLDataFactory df = rootOntology.getOWLOntologyManager().getOWLDataFactory(); for(IRI iri : OWLRDFVocabulary.BUILT_IN_ANNOTATION_PROPERTY_IRIS) { delegate.add(df.getOWLAnnotationProperty(iri)); } delegate.add(df.getOWLThing()); delegate.add(df.getOWLNothing()); delegate.add(df.getOWLTopObjectProperty()); delegate.add(df.getOWLBottomObjectProperty()); delegate.add(df.getOWLBottomDataProperty()); delegate.add(df.getOWLBottomDataProperty()); for(OWL2Datatype datatype : OWL2Datatype.values()) { delegate.add(df.getOWLDatatype(datatype.getIRI())); } for(DublinCoreVocabulary vocabulary : DublinCoreVocabulary.values()) { delegate.add(df.getOWLAnnotationProperty(vocabulary.getIRI())); } for(OWLAnnotationProperty annotationProperty : SKOSVocabulary.getAnnotationProperties(df)) { delegate.add(annotationProperty); } }