Class OntCEImpl.ObjectHasValueImpl
- java.lang.Object
-
- org.apache.jena.enhanced.Polymorphic<org.apache.jena.rdf.model.RDFNode>
-
- org.apache.jena.enhanced.EnhNode
-
- org.apache.jena.rdf.model.impl.ResourceImpl
-
- com.github.owlcs.ontapi.jena.impl.OntObjectImpl
-
- com.github.owlcs.ontapi.jena.impl.OntCEImpl
-
- com.github.owlcs.ontapi.jena.impl.OntCEImpl.OnPropertyRestrictionCEImpl<P,R>
-
- com.github.owlcs.ontapi.jena.impl.OntCEImpl.ComponentRestrictionCEImpl<OntIndividual,OntObjectProperty,OntCEImpl.ObjectHasValueImpl>
-
- com.github.owlcs.ontapi.jena.impl.OntCEImpl.ObjectHasValueImpl
-
- All Implemented Interfaces:
OntClass
,OntClass.ComponentRestrictionCE<OntIndividual,OntObjectProperty>
,OntClass.ObjectHasValue
,OntClass.RestrictionCE<OntObjectProperty>
,OntClass.UnaryRestrictionCE<OntObjectProperty>
,OntObject
,org.apache.jena.graph.FrontsNode
,org.apache.jena.rdf.model.RDFNode
,org.apache.jena.rdf.model.Resource
- Enclosing class:
- OntCEImpl
public static class OntCEImpl.ObjectHasValueImpl extends OntCEImpl.ComponentRestrictionCEImpl<OntIndividual,OntObjectProperty,OntCEImpl.ObjectHasValueImpl> implements OntClass.ObjectHasValue
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.github.owlcs.ontapi.jena.impl.OntCEImpl
OntCEImpl.CardinalityRestrictionCEImpl<O extends OntObject,P extends OntRealProperty,R extends OntCEImpl.CardinalityRestrictionCEImpl<?,?,?>>, OntCEImpl.CardinalityType, OntCEImpl.ClassExpressionFactory, OntCEImpl.ComplementOfImpl, OntCEImpl.ComponentRestrictionCEImpl<O extends org.apache.jena.rdf.model.RDFNode,P extends OntRealProperty,R extends OntCEImpl.ComponentRestrictionCEImpl<?,?,?>>, OntCEImpl.ComponentsCEImpl<O extends OntObject>, OntCEImpl.DataAllValuesFromImpl, OntCEImpl.DataCardinalityImpl, OntCEImpl.DataHasValueImpl, OntCEImpl.DataMaxCardinalityImpl, OntCEImpl.DataMinCardinalityImpl, OntCEImpl.DataSomeValuesFromImpl, OntCEImpl.HasSelfFilter, OntCEImpl.HasSelfImpl, OntCEImpl.HasSelfMaker, OntCEImpl.IntersectionOfImpl, OntCEImpl.NaryDataAllValuesFromImpl, OntCEImpl.NaryDataSomeValuesFromImpl, OntCEImpl.NaryRestrictionCEImpl<O extends OntObject,P extends OntRealProperty,R extends OntCEImpl.NaryRestrictionCEImpl<?,?,?>>, OntCEImpl.ObjectAllValuesFromImpl, OntCEImpl.ObjectCardinalityImpl, OntCEImpl.ObjectHasValueImpl, OntCEImpl.ObjectMaxCardinalityImpl, OntCEImpl.ObjectMinCardinalityImpl, OntCEImpl.ObjectRestrictionType, OntCEImpl.ObjectSomeValuesFromImpl, OntCEImpl.OneOfImpl, OntCEImpl.OnPropertyRestrictionCEImpl<P extends OntRealProperty,R extends OntCEImpl>, OntCEImpl.RestrictionType, OntCEImpl.UnionOfImpl
-
Nested classes/interfaces inherited from interface com.github.owlcs.ontapi.jena.model.OntClass
OntClass.CardinalityRestrictionCE<O extends OntObject,P extends OntRealProperty>, OntClass.ComplementOf, OntClass.ComponentRestrictionCE<O extends org.apache.jena.rdf.model.RDFNode,P extends OntRealProperty>, OntClass.ComponentsCE<O extends OntObject>, OntClass.DataAllValuesFrom, OntClass.DataCardinality, OntClass.DataHasValue, OntClass.DataMaxCardinality, OntClass.DataMinCardinality, OntClass.DataSomeValuesFrom, OntClass.HasSelf, OntClass.IntersectionOf, OntClass.Named, OntClass.NaryDataAllValuesFrom, OntClass.NaryDataSomeValuesFrom, OntClass.NaryRestrictionCE<O extends OntObject,P extends OntRealProperty>, OntClass.ObjectAllValuesFrom, OntClass.ObjectCardinality, OntClass.ObjectHasValue, OntClass.ObjectMaxCardinality, OntClass.ObjectMinCardinality, OntClass.ObjectSomeValuesFrom, OntClass.OneOf, OntClass.RestrictionCE<P extends OntRealProperty>, OntClass.UnaryRestrictionCE<P extends OntRealProperty>, OntClass.UnionOf
-
-
Field Summary
-
Fields inherited from class com.github.owlcs.ontapi.jena.impl.OntCEImpl.ComponentRestrictionCEImpl
objectView, predicate
-
Fields inherited from class com.github.owlcs.ontapi.jena.impl.OntCEImpl.OnPropertyRestrictionCEImpl
propertyView
-
Fields inherited from class com.github.owlcs.ontapi.jena.impl.OntCEImpl
abstractCardinalityRestrictionCEFactory, abstractCEFactory, abstractComponentRestrictionCEFactory, abstractComponentsCEFactory, abstractPropertyRestrictionCEFactory, abstractRestrictionCEFactory, CLASS_FINDER, complementOfCEFactory, dataAllValuesOfCEFactory, dataCardinalityCEFactory, dataHasValueCEFactory, dataMaxCardinalityCEFactory, dataMinCardinalityCEFactory, dataSomeValuesOfCEFactory, hasSelfCEFactory, intersectionOfCEFactory, naryDataAllValuesFromCEFactory, naryDataSomeValuesFromCEFactory, objectAllValuesOfCEFactory, objectCardinalityCEFactory, objectHasValueCEFactory, objectMaxCardinalityCEFactory, objectMinCardinalityCEFactory, objectSomeValuesOfCEFactory, oneOfCEFactory, RESTRICTION_FILTER, RESTRICTION_FINDER, unionOfCEFactory
-
Fields inherited from class com.github.owlcs.ontapi.jena.impl.OntObjectImpl
objectFactory
-
-
Constructor Summary
Constructors Constructor Description ObjectHasValueImpl(org.apache.jena.graph.Node n, org.apache.jena.enhanced.EnhGraph m)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Default Methods Modifier and Type Method Description Class<OntClass.ObjectHasValue>
getActualClass()
Gets a public ont-object type identifier.default <X extends org.apache.jena.rdf.model.RDFNode>
XgetAs(Class<X> type)
Safely converts this RDF resource to the giventype
interface, if it is possible.OntModel
getModel()
Returns the ontology model associated with this resource.P
getProperty()
Gets the property, that thisOntClass.UnaryRestrictionCE
has inside its RDF structure on predicateowl:onProperty
.V
getValue()
Gets a RDF-value (a filler in OWL-API terms) encapsulated by this expression (that can be eitherclass
ordata range
expression).boolean
isLocal()
Determines if this Ontology Resource is local defined.R
setProperty(P property)
Sets the given property into this Restriction (as an object with predicateowl:onProperty
if it is Unary Restriction).R
setValue(V value)
Sets the specified value (a filler in OWL-API terms) into thisclass
ordata range
expression.-
Methods inherited from class com.github.owlcs.ontapi.jena.impl.OntCEImpl.ComponentRestrictionCEImpl
getValue, listSpec, listSpec, setValue
-
Methods inherited from class com.github.owlcs.ontapi.jena.impl.OntCEImpl.OnPropertyRestrictionCEImpl
findRootStatement, getProperty, setProperty
-
Methods inherited from class com.github.owlcs.ontapi.jena.impl.OntCEImpl
addHasKeyStatement, createAnonymousIndividual, createCardinalityRestrictionCE, createCEFactory, createComplementOf, createComponentRestrictionCE, createComponentsCE, createHasKey, createHasKey, createHasSelf, createIndividual, createIndividual, createNamedIndividual, createNaryFactory, createNaryRestrictionCE, createNonNegativeIntegerLiteral, createOnPropertyRestriction, createRestrictionFactory, createRestrictionFactory, getCardinalityType, hasKeys, isQualified, listHasKeys, removeHasKey, removeHasKey, subClasses, superClasses
-
Methods inherited from class com.github.owlcs.ontapi.jena.impl.OntObjectImpl
addAnnotation, addStatement, annotations, annotationValues, assertions, changeRDFType, checkNamed, checkNamed, clearAll, clearAnnotations, content, createOntStatement, findActualClass, getAs, getCharacteristics, getContent, getHierarchy, getMainStatement, getModel, getNodeAs, getOptionalRootStatement, getRequiredObject, getRequiredProperty, getRequiredRootStatement, hierarchy, isLocal, listAnnotationLiterals, listAnnotations, listAssertions, listContent, listHierarchy, listObjects, listObjects, listProperties, listProperties, listRequired, listStatements, listStatements, listSubjects, object, objects, objects, remove, spec, statement, statement, statements, statements, toString, viewAsString, wrapAsOntObject
-
Methods inherited from class org.apache.jena.rdf.model.impl.ResourceImpl
abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, asLiteral, asResource, begin, commit, getId, getLocalName, getModelCom, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getStmtTerm, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, mustHaveModel, removeAll, removeProperties, visitWith
-
Methods inherited from class org.apache.jena.enhanced.EnhNode
as, asNode, canAs, canSupport, convertTo, equals, getGraph, getPersonality, hashCode, isAnon, isLiteral, isResource, isStmtResource, isURIResource, isValid, viewAs
-
Methods inherited from class org.apache.jena.enhanced.Polymorphic
addView, alreadyHasView, asInternal, supports
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.github.owlcs.ontapi.jena.model.OntClass
addDisjointClass, addDisjointWithStatement, addEquivalentClass, addEquivalentClassStatement, addHasKey, addHasKey, addHasKeyStatement, addHasKeyStatement, addSubClassOfStatement, addSuperClass, asNamed, clearHasKeys, createHasKey, createIndividual, createIndividual, disjointClasses, equivalentClasses, findHasKey, fromHasKey, hasKeys, individuals, properties, removeDisjointClass, removeEquivalentClass, removeHasKey, removeSuperClass, subClasses, superClasses, superClasses
-
Methods inherited from interface com.github.owlcs.ontapi.jena.model.OntObject
addAnnotation, addAnnotation, addAnnotation, addComment, addComment, addLabel, addLabel, addStatement, annotate, annotate, annotations, annotationValues, annotationValues, clearAnnotations, content, getComment, getComment, getLabel, getLabel, getMainStatement, getRequiredProperty, hasType, objects, objects, remove, spec, statement, statement, statements, statements, types
-
Methods inherited from interface org.apache.jena.rdf.model.RDFNode
as, asLiteral, asResource, canAs, isAnon, isLiteral, isResource, isStmtResource, isURIResource, visitWith
-
Methods inherited from interface org.apache.jena.rdf.model.Resource
abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, begin, commit, equals, getId, getLocalName, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getStmtTerm, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, listProperties, listProperties, removeAll, removeProperties, toString
-
-
-
-
Method Detail
-
getActualClass
public Class<OntClass.ObjectHasValue> getActualClass()
Description copied from class:OntObjectImpl
Gets a public ont-object type identifier.- Specified by:
getActualClass
in classOntCEImpl
- Returns:
- Class, the actual type of this object
-
getModel
public abstract OntModel getModel()
Returns the ontology model associated with this resource. If the Resource was not created by a Model, the result may be null.- Specified by:
getModel
in interfaceorg.apache.jena.rdf.model.RDFNode
- Returns:
OntModel
-
isLocal
public abstract boolean isLocal()
Determines if this Ontology Resource is local defined. This means that the resource definition (i.e. a theroot statement
) belongs to the base ontology graph. If the ontology contains sub-graphs (which should matchowl:imports
in OWL) and the resource is defined in one of them, than this method called from top-level interface will returnfalse
.- Returns:
true
if this resource is local to the base model graph.
-
getAs
public default <X extends org.apache.jena.rdf.model.RDFNode> X getAs(Class<X> type)
Safely converts this RDF resource to the giventype
interface, if it is possible. Otherwise returnsnull
. A calling of this method is effectively equivalent to the expressionthis.canAs(type) ? this.as(type) : null
.- Type Parameters:
X
- any subtype ofRDFNode
- Parameters:
type
- aClass
-type of the desired RDF view (interface)- Returns:
- an instance of the type
OntResource
ornull
- See Also:
RDFNode.as(Class)
,RDFNode.canAs(Class)
-
getProperty
public abstract P getProperty()
Gets the property, that thisOntClass.UnaryRestrictionCE
has inside its RDF structure on predicateowl:onProperty
.- Returns:
HasProperty
-
getValue
public abstract V getValue()
Gets a RDF-value (a filler in OWL-API terms) encapsulated by this expression (that can be eitherclass
ordata range
expression).The result is not
null
even if it is a Unqualified Cardinality Restriction, that has no explicit filler in RDF (the filler is expected to be eitherowl:Thing
for object restriction orRDFS.Literal
for data restriction).- Returns:
HasValue
, notnull
- See Also:
SetValue.setValue(RDFNode)
-
setValue
public abstract R setValue(V value)
Sets the specified value (a filler in OWL-API terms) into thisclass
ordata range
expression.A
value
can benull
if this is a Cardinality Restriction (the null-filler is considered asowl:Thing
for an object restriction and asRDFS.Literal
for a data restriction).- Parameters:
value
-SetValue
, possiblenull
in case of Cardinality Restriction- Returns:
- this instance to allow cascading calls
- See Also:
HasValue.getValue()
-
setProperty
public abstract R setProperty(P property)
Sets the given property into this Restriction (as an object with predicateowl:onProperty
if it is Unary Restriction).- Parameters:
property
-SetProperty
, notnull
- Returns:
- this instance to allow cascading calls
-
-