public class RDFClassInfo extends FinalizedResource
RDFClassInfoSetup
where all
the characteristics of this class are defined.
To create a new RDFClassInfo
, define a subclass of Ontology
and overwrite the Ontology.create()
method.RDFClassInfoSetup
,
OntClassInfo
,
OntClassInfoSetup
Modifier and Type | Class and Description |
---|---|
protected class |
RDFClassInfo.PrivateRDFSetup
Implementation of the setup interface.
|
Modifier and Type | Field and Description |
---|---|
protected ArrayList |
combinedSuperClasses
The combined list of all super classes as set in the RDF graph (contains
named super classes and restrictions).
|
protected ResourceFactory |
factory
The factory to create new instances of this class.
|
protected int |
factoryIndex
Factory index to be given to the
ResourceFactory to create new
instances of this class. |
protected HashMap |
instances
Repository of all known (non-anonymous) instances.
|
protected boolean |
locked
Determines whether this class is locked.
|
protected HashSet |
namedSuperClasses
The set of URIs of all super classes.
|
protected Ontology |
ont
The
Ontology which defines or extends this class. |
protected RDFClassInfo.PrivateRDFSetup |
rdfsetup
The setup interface.
|
protected ArrayList |
superClasses
The set of super classes.
|
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 | Constructor and Description |
---|---|
protected |
RDFClassInfo(String classURI,
Ontology ont,
ResourceFactory factory,
int factoryIndex)
Create a new RDF Class.
|
Modifier and Type | Method and Description |
---|---|
static RDFClassInfoSetup |
create(String classURI,
Ontology ont,
ResourceFactory factory,
int factoryIndex)
Create a new RDF Class.
|
ResourceFactory |
getFactory()
Get the factory.
|
int |
getFactoryIndex()
Get the factory index.
|
Resource |
getInstanceByURI(String uri)
Get a specific registered instance of this class.
|
Resource[] |
getInstances()
Get the set of all registered instances of this class.
|
String[] |
getNamedSuperClasses(boolean inherited,
boolean includeAbstractClasses)
Get the set of URIs of all named super classes.
|
TypeExpression[] |
getSuperClasses()
Get the set of all non-named super classes.
|
boolean |
hasSuperClass(String classURI,
boolean inherited)
Determines whether the given class is a super class of this class.
|
boolean |
isAbstract()
Determines whether this class is an abstract class.
|
boolean |
isClosedCollection(String propURI)
Returns true if the value of the given property should be treated as an
rdf:List.
|
void |
lock()
Lock this instance.
|
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, setProperty, setPropertyPath, setPropertyPath, setPropertyPathFromOffset, setResourceComment, setResourceLabel, toString, toStringRecursive, toStringRecursive, unliteral
protected volatile HashSet namedSuperClasses
protected HashMap instances
protected volatile ArrayList combinedSuperClasses
protected ArrayList superClasses
TypeExpression
.protected ResourceFactory factory
protected int factoryIndex
ResourceFactory
to create new
instances of this class.protected boolean locked
protected RDFClassInfo.PrivateRDFSetup rdfsetup
protected RDFClassInfo(String classURI, Ontology ont, ResourceFactory factory, int factoryIndex)
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 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 final boolean isAbstract()
public final ResourceFactory getFactory()
ResourceFactory
public final int getFactoryIndex()
ResourceFactory
public final boolean hasSuperClass(String classURI, boolean inherited)
inherited
is false, then only direct super classes
are considered.classURI
- The URI of the super class.inherited
- false, iff only direct super classes should be
considered.public final String[] getNamedSuperClasses(boolean inherited, boolean includeAbstractClasses)
inherited
- false, iff only direct super classes should be
returned.includeAbstractClasses
- true, iff abstract classes should be returned.public final TypeExpression[] getSuperClasses()
public final Resource[] getInstances()
RDFClassInfoSetup.addInstance(Resource)
public final Resource getInstanceByURI(String uri)
RDFClassInfoSetup.addInstance(Resource)
uri
- The URI of the instance.public final void lock()
Ontology
that defines the class
is registered at the OntologyManagement
.public final boolean isClosedCollection(String propURI)
Resource
List
is assumed to be a closed collection
(unless it is specifically an instance of OpenCollection
).
Subclasses can change this, if needed.isClosedCollection
in class Resource
Resource.isClosedCollection(String)
Copyright © 2018 universAAL Consortium. All rights reserved.