Module org.apache.jena.ontapi
Class OntSimpleClassImpl.NamedImpl
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
org.apache.jena.ontapi.impl.objects.OntObjectImpl
org.apache.jena.ontapi.impl.objects.OntSimpleClassImpl
org.apache.jena.ontapi.impl.objects.OntSimpleClassImpl.NamedImpl
- All Implemented Interfaces:
org.apache.jena.graph.FrontsNode,OntClass,OntClass.Named,OntEntity,OntObject,org.apache.jena.rdf.model.RDFNode,org.apache.jena.rdf.model.Resource
- Direct Known Subclasses:
OntSimpleClassImpl.RLNamedImpl
- Enclosing class:
- OntSimpleClassImpl
public static class OntSimpleClassImpl.NamedImpl
extends OntSimpleClassImpl
implements OntClass.Named
Primary (named) class (
<uri> a owl:Class).
This is also OntEntity.
Note:
In jena OWL1, class expressions, such as OntClass.ComplementOf
can also be named.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.jena.ontapi.impl.objects.OntSimpleClassImpl
OntSimpleClassImpl.NamedImpl, OntSimpleClassImpl.RLNamedImplNested classes/interfaces inherited from interface org.apache.jena.ontapi.model.OntClass
OntClass.CardinalityRestriction<O extends OntObject,P extends OntRelationalProperty>, OntClass.CollectionOf<O extends OntObject>, OntClass.ComplementOf, OntClass.ComponentRestriction<O extends org.apache.jena.rdf.model.RDFNode, P extends OntRelationalProperty>, OntClass.DataAllValuesFrom, OntClass.DataCardinality, OntClass.DataHasValue, OntClass.DataMaxCardinality, OntClass.DataMinCardinality, OntClass.DataSomeValuesFrom, OntClass.HasSelf, OntClass.IntersectionOf, OntClass.LogicalExpression, OntClass.Named, OntClass.NaryDataAllValuesFrom, OntClass.NaryDataSomeValuesFrom, OntClass.NaryRestriction<O extends OntObject, P extends OntRelationalProperty>, OntClass.ObjectAllValuesFrom, OntClass.ObjectCardinality, OntClass.ObjectHasValue, OntClass.ObjectMaxCardinality, OntClass.ObjectMinCardinality, OntClass.ObjectSomeValuesFrom, OntClass.OneOf, OntClass.Restriction, OntClass.UnaryRestriction<P extends OntRelationalProperty>, OntClass.UnionOf, OntClass.ValueRestriction<O extends org.apache.jena.rdf.model.RDFNode, P extends OntRelationalProperty> -
Field Summary
Fields inherited from class org.apache.jena.rdf.model.impl.ResourceImpl
factory, rdfNodeFactory -
Constructor Summary
ConstructorsConstructorDescriptionNamedImpl(org.apache.jena.graph.Node n, org.apache.jena.enhanced.EnhGraph eg) -
Method Summary
Modifier and TypeMethodDescriptionaddDisjointClass(OntClass other) Adds the given class as a disjoint class and returns this class expression instance to allow cascading calls.asNamed()Represents this OWL class expression as a named OWL class if it is possible, otherwise throws an exception.createDisjointUnion(Collection<OntClass> classes) Creates aDisjointUnionasontology []-listofClass Expressions that is attached to this OWL Class using the predicateowl:disjointUnionOf.Lists allDisjointUnionontology lists that are attached to this OWL Class on predicateowl:disjointUnionOf.default <X extends org.apache.jena.rdf.model.RDFNode>
XSafely converts this RDF resource to the giventypeinterface, if it is possible.getModel()Returns the ontology model associated with this resource.booleanDetermines if this is a builtin entity.booleanisLocal()Determines if this Ontology Resource is locally defined.Gets a public ont-object type identifier.removeDisjointClass(org.apache.jena.rdf.model.Resource other) Removes the specified disjoint class resource.removeDisjointUnion(org.apache.jena.rdf.model.Resource rdfList) Deletes the givenDisjointUnionlist including its annotations.removeEquivalentClass(org.apache.jena.rdf.model.Resource other) Removes the given equivalent class resource including the statement's annotations.Methods inherited from class org.apache.jena.ontapi.impl.objects.OntSimpleClassImpl
addDisjointWithStatement, addEquivalentClassStatement, addHasKeyStatement, createHasKey, createIndividual, createIndividual, declaredProperties, disjointClasses, equivalentClasses, findRootStatement, hasDeclaredProperty, hasKeys, hasSuperClass, individuals, isDisjoint, isHierarchyRoot, removeHasKey, subClasses, superClassesMethods inherited from class org.apache.jena.ontapi.impl.objects.OntObjectImpl
addAnnotation, addStatement, annotations, annotationValues, assertions, checkNamed, checkNamed, clearAnnotations, content, findActualClass, findActualClass, getAs, getMainStatement, getModel, getNodeAs, getRequiredObject, getRequiredProperty, isLocal, isReservedOrBuiltin, listAnnotationLiterals, listAnnotations, listAssertions, listObjects, listObjects, listProperties, listProperties, listSpec, listStatements, listStatements, listSubjects, object, objects, objects, remove, spec, statement, statement, statements, statements, subjects, toString, wrapAsOntObjectMethods 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, asStatementTerm, begin, commit, getId, getLocalName, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, removeAll, removeProperties, visitWithMethods inherited from class org.apache.jena.enhanced.EnhNode
as, asNode, canAs, equals, getGraph, hashCode, isAnon, isLiteral, isResource, isStatementTerm, isURIResource, isValid, viewAsMethods inherited from class org.apache.jena.enhanced.Polymorphic
addView, supportsMethods inherited from interface org.apache.jena.graph.FrontsNode
asNodeMethods inherited from interface org.apache.jena.ontapi.model.OntClass
addDisjointWithStatement, addEquivalentClassStatement, addHasKeyStatement, addHasKeyStatement, addSubClassOfStatement, asAssertionClass, asDisjointClass, asEquivalentClass, asSubClass, asSuperClass, canAsAssertionClass, canAsDisjointClass, canAsEquivalentClass, canAsSubClass, canAsSuperClass, createHasKey, createIndividual, createIndividual, declaredProperties, declaredProperties, disjointClasses, disjoints, equivalentClasses, findHasKey, fromHasKey, hasDeclaredProperty, hasKeys, hasSubClass, hasSuperClass, individuals, individuals, isDisjoint, isHierarchyRoot, properties, removeHasKey, removeIndividual, removeSubClass, subClass, subClasses, subClasses, superClass, superClasses, superClassesMethods inherited from interface org.apache.jena.ontapi.model.OntClass.Named
addComment, addComment, addDisjointUnion, addDisjointUnion, addDisjointUnionOfStatement, addDisjointUnionOfStatement, addEquivalentClass, addHasKey, addHasKey, addLabel, addLabel, addSubClass, addSuperClass, annotate, annotate, clearDisjointUnions, clearHasKeys, findDisjointUnion, fromDisjointUnionOf, removeSuperClassMethods inherited from interface org.apache.jena.ontapi.model.OntObject
addAnnotation, addAnnotation, addAnnotation, addStatement, annotations, annotationValues, annotationValues, clearAnnotations, content, getComment, getComment, getLabel, getLabel, getMainStatement, getRequiredProperty, hasType, objects, objects, remove, spec, statement, statement, statements, statements, typesMethods inherited from interface org.apache.jena.rdf.model.RDFNode
as, asLiteral, asResource, asStatementTerm, canAs, isAnon, isLiteral, isResource, isStatementTerm, isURIResource, visitWithMethods 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, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, listProperties, listProperties, removeAll, removeProperties, toString
-
Constructor Details
-
NamedImpl
public NamedImpl(org.apache.jena.graph.Node n, org.apache.jena.enhanced.EnhGraph eg)
-
-
Method Details
-
asNamed
Description copied from interface:OntClassRepresents this OWL class expression as a named OWL class if it is possible, otherwise throws an exception. Effectively equivalent to the expressionthis.as(Named.class). -
objectType
Description copied from class:OntObjectImplGets a public ont-object type identifier.- Specified by:
objectTypein interfaceOntObject- Overrides:
objectTypein classOntSimpleClassImpl- Returns:
- Class, the actual type of this object
-
isBuiltIn
public boolean isBuiltIn()Description copied from interface:OntEntityDetermines if this is a builtin entity. In a standard (default) OWL2 vocabulary an entity is builtin if it is:- a
classand its IRI is eitherowl:Thingorowl:Nothing - an
object propertyand its IRI is eitherowl:topObjectPropertyorowl:bottomObjectProperty - a
data propertyand its IRI is eitherowl:topDataPropertyorowl:bottomDataProperty - a
datatypeand its IRI is eitherrdfs:Literal, orrdf:PlainLiteral, or it is from the OWL 2 datatype map - an
annotation propertyand its IRI is one of the following:rdfs:labelrdfs:commentrdfs:seeAlsordfs:isDefinedByowl:deprecatedowl:versionInfoowl:priorVersionowl:backwardCompatibleWithowl:incompatibleWith
Builtins Vocabulary. A model with differentBuiltinsvocabulary will naturally have a differentSetof builtin IRIs, and this method will return a different result. - a
-
disjointUnions
Description copied from interface:OntClass.NamedLists allDisjointUnionontology lists that are attached to this OWL Class on predicateowl:disjointUnionOf.- Specified by:
disjointUnionsin interfaceOntClass.Named- Returns:
StreamofOntLists with parameter-typeOntCE
-
createDisjointUnion
Description copied from interface:OntClass.NamedCreates aDisjointUnionasontology []-listofClass Expressions that is attached to this OWL Class using the predicateowl:disjointUnionOf. The resulting rdf-list will consist of all the elements of the specified collection in the same order but with exclusion of duplicates. Note:nulls in the collection will causeexception. For additional information aboutDisjointUnionlogical construction see 9.1.4 Disjoint Union of Class Expressions.- Specified by:
createDisjointUnionin interfaceOntClass.Named- Parameters:
classes-Collection(preferablySet) ofclass expressions- Returns:
OntListofOntClasss- See Also:
-
removeDisjointUnion
public OntClass.Named removeDisjointUnion(org.apache.jena.rdf.model.Resource rdfList) throws OntJenaException.IllegalArgument Description copied from interface:OntClass.NamedDeletes the givenDisjointUnionlist including its annotations.- Specified by:
removeDisjointUnionin interfaceOntClass.Named- Parameters:
rdfList-Resourcecan beOntListorRDFList- Returns:
- this instance to allow cascading calls
- Throws:
OntJenaException.IllegalArgument- See Also:
-
removeDisjointClass
Description copied from interface:OntClassRemoves the specified disjoint class resource. No-op in case no match found. Removes allowl:disjointWithstatements with all their annotations in casenullis specified.- Specified by:
removeDisjointClassin interfaceOntClass- Specified by:
removeDisjointClassin interfaceOntClass.Named- Overrides:
removeDisjointClassin classOntSimpleClassImpl- Parameters:
other-Resource, ornullto remove all disjoint classes- Returns:
- this instance to allow cascading calls
- See Also:
-
removeEquivalentClass
Description copied from interface:OntClassRemoves the given equivalent class resource including the statement's annotations. No-op in case no match found. Removes allowl:equivalentClassstatements with all their annotations in casenullis specified.- Specified by:
removeEquivalentClassin interfaceOntClass- Specified by:
removeEquivalentClassin interfaceOntClass.Named- Overrides:
removeEquivalentClassin classOntSimpleClassImpl- Parameters:
other-Resource, ornullto remove all equivalent classes- Returns:
- this instance to allow cascading calls
- See Also:
-
addDisjointClass
Description copied from interface:OntClassAdds the given class as a disjoint class and returns this class expression instance to allow cascading calls.- Specified by:
addDisjointClassin interfaceOntClass- Specified by:
addDisjointClassin interfaceOntClass.Named- Overrides:
addDisjointClassin classOntSimpleClassImpl- Parameters:
other-OntClass, notnull- Returns:
- this instance to allow cascading calls
- See Also:
-
getModel
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:
getModelin interfaceorg.apache.jena.rdf.model.RDFNode- Returns:
OntModel
-
isLocal
boolean isLocal()Determines if this Ontology Resource is locally defined. This means that the resource definition (i.e., a theroot statement) belongs to the base ontology graph. If the ontology contains subgraphs (which should matchowl:importsin OWL) and the resource is defined in one of them, than this method called from top-level interface will returnfalse.- Returns:
trueif this resource is local to the base model graph.
-
getAs
Safely converts this RDF resource to the giventypeinterface, 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
Xornull - See Also:
-
RDFNode.as(Class)RDFNode.canAs(Class)
-