public final class OntClassInfo extends RDFClassInfo
OntClassInfoSetup
where all the characteristics of this class are
defined.
To create a new OntClassInfo
, define a subclass of Ontology
and overwrite the Ontology.create()
method.RDFClassInfoSetup
,
RDFClassInfo
,
OntClassInfoSetup
Modifier and Type | Class and Description |
---|---|
class |
OntClassInfo.ManagementOperation |
RDFClassInfo.PrivateRDFSetup
Modifier and Type | Field and Description |
---|---|
static String |
MY_URI
URI of this class.
|
combinedSuperClasses, factory, factoryIndex, instances, locked, namedSuperClasses, ont, rdfsetup, superClasses
ANON_URI_PREFIX, blockAddingTypes, isXMLLiteral, NAMESPACE_PREFIX, ns_delim_index, PROP_INVOLVED_HUMAN_USER, PROP_RDF_FIRST, PROP_RDF_REST, PROP_RDF_TYPE, PROP_RDFS_COMMENT, PROP_RDFS_LABEL, PROP_SERIALIZATION_FULL, PROP_SERIALIZATION_OPTIONAL, PROP_SERIALIZATION_REDUCED, PROP_SERIALIZATION_UNDEFINED, props, RDF_EMPTY_LIST, RDF_NAMESPACE, RDFS_NAMESPACE, SERVICE_NAMESPACE, TYPE_RDF_LIST, TYPE_RDFS_CLASS, uri, VOCABULARY_NAMESPACE
Modifier and Type | Method and Description |
---|---|
boolean |
checkPermission(String uri)
Internal method for management.
|
static RDFClassInfoSetup |
create(String classURI,
Ontology ont,
ResourceFactory factory,
int factoryIndex)
Create a new OWL Class.
|
Property[] |
getDeclaredProperties()
Get all properties of this class.
|
Property |
getDeclaredProperty(String propURI)
Get a specific property of this class.
|
String[] |
getDeclaredPropertyURIs()
Get the set of URIs of all properties for this class.
|
OntClassInfo.ManagementOperation |
getManagementOperation(String permissionCheck)
Internal method for management.
|
MergedRestriction |
getRestrictionsOnProp(String propURI)
Get the restriction that are defined for a property.
|
boolean |
isEnumeration()
Determines whether this class is an enumeration class.
|
boolean |
setProperty(String propURI,
Object value)
Adds a statement with this resource as the subject, the given
propURI as the predicate and the given value as the object. |
getFactory, getFactoryIndex, getInstanceByURI, getInstances, getNamedSuperClasses, getSuperClasses, hasSuperClass, isAbstract, isClosedCollection, lock
addType, getLocalName, getNamespace, getProperty, getPropertyURIs, getType, getTypes, getURI, hasQualifiedName, isAnon, numberOfProperties
addMultiLangProp, asList, asList, asRDFList, changeProperty, copy, deepCopy, equals, generateAnonURI, getDefaultLang, getFilename, getMultiLangProp, getOrConstructLabel, getOrConstructLabel, getPropSerializationType, getResource, getResourceComment, getResourceLabel, getResourceLabel, getStaticFieldValue, hashCode, hasProperty, isAnon, isBlockingAddingTypes, isQualifiedName, isWellFormed, literal, representsQualifiedURI, serializesAsXMLLiteral, setPropertyPath, setPropertyPath, setPropertyPathFromOffset, setResourceComment, setResourceLabel, toString, toStringRecursive, toStringRecursive, unliteral
public static final String MY_URI
public static RDFClassInfoSetup create(String classURI, Ontology ont, ResourceFactory factory, int factoryIndex)
Ontology
.classURI
- The URI of the class.ont
- The Ontology
that creates this instance.factory
- A factory to create new instances; it is null iff the
class is abstract.factoryIndex
- An index to be given to the factory
. If the
factory
is null, this parameter is
ignored.public boolean checkPermission(String uri)
public OntClassInfo.ManagementOperation getManagementOperation(String permissionCheck)
public String[] getDeclaredPropertyURIs()
OntClassInfoSetup.addDatatypeProperty(String)
or
OntClassInfoSetup.addObjectProperty(String)
.public Property[] getDeclaredProperties()
OntClassInfoSetup.addDatatypeProperty(String)
or
OntClassInfoSetup.addObjectProperty(String)
.public Property getDeclaredProperty(String propURI)
OntClassInfoSetup.addDatatypeProperty(String)
or
OntClassInfoSetup.addObjectProperty(String)
.public MergedRestriction getRestrictionsOnProp(String propURI)
propURI
- URI of the property for which the restrictions apply.public boolean isEnumeration()
public boolean setProperty(String propURI, Object value)
Resource
propURI
as the predicate and the given value as the object.
Subclasses must override this in order to decide if the statement to be
added fits the general class constraints. If not, the call of this method
should be ignored. For each property only one single call may be made to
this method, unless subsequent calls to this method for setting the value
of the same property are treated as an update for an update-able
property. Multi-valued properties must be set using an instance of
List
. The differentiation, if a such list should be
treated as an rdf:List, can be made with the help of
Resource.isClosedCollection(String)
. The default implementation here
accepts all property-value pairs blindly except for rdf:type which is
handled if the value is a type URI, a Resource or a java.util.List of
them.
Note: The setting of the property rdf:type is being handled by this class
via the final methods Resource.addType(String, boolean)
,
Resource.getType()
, and Resource.getTypes()
. Although these methods give
the view of handling type URIs as strings, but in reality the types are
stored as direct instances of this class. So, the subclasses should
ignore calls for setting rdf:type; if not, then the subclass must pay
attention that the value should be a List
of direct instances of
this class so that (1) the Resource.toString()
method returns just the
URI and (2) the serializers get no problems with the value. Also,
settings via subclasses may be overwritten by this class if a subsequent
call to Resource.addType(String, boolean)
is made.
setProperty
in class Resource
Copyright © 2018 universAAL Consortium. All rights reserved.