Package com.github.owlcs.ontapi.internal
Class InternalObjectFactory
java.lang.Object
com.github.owlcs.ontapi.internal.InternalObjectFactory
- All Implemented Interfaces:
ModelObjectFactory
,ONTObjectFactory
- Direct Known Subclasses:
CacheObjectFactory
An extended Object Factory impl which maps
OntObject
s
to OWLObject
s directly having no cache.
Unlike SimpleObjectFactory
, every object created by this factory is
an ONTObject
with a reference to the concrete model obtained from this factory.
Created by @ssz on 07.08.2019.
- Since:
- 2.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final DataFactory
protected final Supplier<org.apache.jena.ontapi.model.OntModel>
Fields inherited from interface com.github.owlcs.ontapi.internal.ONTObjectFactory
DEFAULT
-
Constructor Summary
ConstructorsConstructorDescriptionInternalObjectFactory
(DataFactory factory, Supplier<org.apache.jena.ontapi.model.OntModel> model) -
Method Summary
Modifier and TypeMethodDescriptionONTObject<org.semanticweb.owlapi.model.OWLAnnotation>
getAnnotation
(org.apache.jena.ontapi.model.OntStatement s) ONTObject<org.semanticweb.owlapi.model.OWLAnnotationProperty>
ONTObject<org.semanticweb.owlapi.model.OWLAnonymousIndividual>
ONTObject<org.semanticweb.owlapi.model.OWLClass>
ONTObject<? extends org.semanticweb.owlapi.model.OWLClassExpression>
getClass
(org.apache.jena.ontapi.model.OntClass ce) ONTObject<org.semanticweb.owlapi.model.OWLDataProperty>
getDataProperty
(String uri) ONTObject<org.semanticweb.owlapi.model.OWLDatatype>
getDatatype
(String uri) ONTObject<? extends org.semanticweb.owlapi.model.OWLDataRange>
getDatatype
(org.apache.jena.ontapi.model.OntDataRange dr) ONTObject<org.semanticweb.owlapi.model.OWLFacetRestriction>
getFacetRestriction
(org.apache.jena.ontapi.model.OntFacetRestriction fr) ONTObject<org.semanticweb.owlapi.model.IRI>
Gets anIRI
that is wrapped asONTObject
from the specifiedString
.ONTObject<org.semanticweb.owlapi.model.OWLLiteral>
getLiteral
(org.apache.jena.graph.impl.LiteralLabel label) ONTObject<org.semanticweb.owlapi.model.OWLNamedIndividual>
getNamedIndividual
(String uri) ONTObject<org.semanticweb.owlapi.model.OWLObjectProperty>
getObjectProperty
(String uri) static ONTObject<org.semanticweb.owlapi.model.OWLClass>
getONTClass
(String uri, org.apache.jena.ontapi.model.OntModel model, ONTObjectFactory factory) Using thefactory
finds or creates anOWLClass
instance.ONTObject<org.semanticweb.owlapi.model.OWLObjectInverseOf>
getProperty
(org.apache.jena.ontapi.model.OntObjectProperty.Inverse iop) ONTObject<? extends org.semanticweb.owlapi.model.SWRLIArgument>
ONTObject<? extends org.semanticweb.owlapi.model.SWRLIArgument>
getSWRLArgument
(String uri) ONTObject<? extends org.semanticweb.owlapi.model.SWRLDArgument>
getSWRLArgument
(org.apache.jena.graph.impl.LiteralLabel label) ONTObject<? extends org.semanticweb.owlapi.model.SWRLAtom>
getSWRLAtom
(org.apache.jena.ontapi.model.OntSWRL.Atom<?> atom) ONTObject<org.semanticweb.owlapi.model.SWRLVariable>
getSWRLVariable
(String uri) Supplier<org.apache.jena.ontapi.model.OntModel>
model()
org.semanticweb.owlapi.model.IRI
Gets anIRI
from theString
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.github.owlcs.ontapi.internal.ModelObjectFactory
getClass, getDatatype, getEntity, getIndividual, getIndividual, getIndividual, getIndividual, getLiteral, getModel, getProperty, getProperty, getProperty, getProperty, getSWRLArgument, getSWRLArgument, getSWRLVariable
Methods inherited from interface com.github.owlcs.ontapi.internal.ONTObjectFactory
getAnnotations, getEntity, getProperty, getProperty, getSubject, getValue
-
Field Details
-
model
-
factory
-
-
Constructor Details
-
InternalObjectFactory
public InternalObjectFactory(DataFactory factory, Supplier<org.apache.jena.ontapi.model.OntModel> model)
-
-
Method Details
-
getONTClass
public static ONTObject<org.semanticweb.owlapi.model.OWLClass> getONTClass(String uri, org.apache.jena.ontapi.model.OntModel model, ONTObjectFactory factory) Using thefactory
finds or creates anOWLClass
instance.- Parameters:
uri
-String
, notnull
factory
-ONTObjectFactory
, notnull
model
-OntModel
- Returns:
- an
ONTObject
which isOWLClass
-
model
- Specified by:
model
in interfaceModelObjectFactory
-
getOWLDataFactory
- Specified by:
getOWLDataFactory
in interfaceONTObjectFactory
-
getIRI
Description copied from interface:ONTObjectFactory
Gets anIRI
that is wrapped asONTObject
from the specifiedString
.- Specified by:
getIRI
in interfaceONTObjectFactory
- Parameters:
uri
-String
, notnull
- Returns:
ONTObject
that wrapsIRI
- See Also:
-
toIRI
Description copied from interface:ONTObjectFactory
Gets anIRI
from theString
.- Specified by:
toIRI
in interfaceONTObjectFactory
- Parameters:
uri
- URI, notnull
- Returns:
IRI
- See Also:
-
getAnnotation
public ONTObject<org.semanticweb.owlapi.model.OWLAnnotation> getAnnotation(org.apache.jena.ontapi.model.OntStatement s) - Specified by:
getAnnotation
in interfaceONTObjectFactory
-
getClass
public ONTObject<? extends org.semanticweb.owlapi.model.OWLClassExpression> getClass(org.apache.jena.ontapi.model.OntClass ce) - Specified by:
getClass
in interfaceONTObjectFactory
-
getDatatype
public ONTObject<? extends org.semanticweb.owlapi.model.OWLDataRange> getDatatype(org.apache.jena.ontapi.model.OntDataRange dr) - Specified by:
getDatatype
in interfaceONTObjectFactory
-
getProperty
public ONTObject<org.semanticweb.owlapi.model.OWLObjectInverseOf> getProperty(org.apache.jena.ontapi.model.OntObjectProperty.Inverse iop) - Specified by:
getProperty
in interfaceONTObjectFactory
-
getFacetRestriction
public ONTObject<org.semanticweb.owlapi.model.OWLFacetRestriction> getFacetRestriction(org.apache.jena.ontapi.model.OntFacetRestriction fr) - Specified by:
getFacetRestriction
in interfaceONTObjectFactory
-
getSWRLAtom
public ONTObject<? extends org.semanticweb.owlapi.model.SWRLAtom> getSWRLAtom(org.apache.jena.ontapi.model.OntSWRL.Atom<?> atom) - Specified by:
getSWRLAtom
in interfaceONTObjectFactory
-
getClass
- Specified by:
getClass
in interfaceModelObjectFactory
-
getAnonymousIndividual
public ONTObject<org.semanticweb.owlapi.model.OWLAnonymousIndividual> getAnonymousIndividual(BlankNodeId id) - Specified by:
getAnonymousIndividual
in interfaceModelObjectFactory
-
getNamedIndividual
- Specified by:
getNamedIndividual
in interfaceModelObjectFactory
-
getDatatype
- Specified by:
getDatatype
in interfaceModelObjectFactory
-
getAnnotationProperty
public ONTObject<org.semanticweb.owlapi.model.OWLAnnotationProperty> getAnnotationProperty(String uri) - Specified by:
getAnnotationProperty
in interfaceModelObjectFactory
-
getObjectProperty
- Specified by:
getObjectProperty
in interfaceModelObjectFactory
-
getDataProperty
- Specified by:
getDataProperty
in interfaceModelObjectFactory
-
getLiteral
public ONTObject<org.semanticweb.owlapi.model.OWLLiteral> getLiteral(org.apache.jena.graph.impl.LiteralLabel label) - Specified by:
getLiteral
in interfaceModelObjectFactory
-
getSWRLVariable
- Specified by:
getSWRLVariable
in interfaceModelObjectFactory
-
getSWRLArgument
public ONTObject<? extends org.semanticweb.owlapi.model.SWRLDArgument> getSWRLArgument(org.apache.jena.graph.impl.LiteralLabel label) - Specified by:
getSWRLArgument
in interfaceModelObjectFactory
- Parameters:
label
-LiteralLabel
, notnull
- Returns:
ONTObject
withSWRLDArgument
-
getSWRLArgument
- Specified by:
getSWRLArgument
in interfaceModelObjectFactory
- Parameters:
uri
-String
, notnull
- Returns:
ONTObject
withSWRLIArgument
-
getSWRLArgument
public ONTObject<? extends org.semanticweb.owlapi.model.SWRLIArgument> getSWRLArgument(BlankNodeId id) - Specified by:
getSWRLArgument
in interfaceModelObjectFactory
- Parameters:
id
-BlankNodeId
, notnull
- Returns:
ONTObject
withSWRLDArgument
-