public class RDFSModelImpl extends RDFModelImpl implements RDFSModel, RDFSReasoner
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger |
baseRep| Constructor and Description |
|---|
RDFSModelImpl(BaseRDFTripleModel baseRep) |
| Modifier and Type | Method and Description |
|---|---|
void |
addClass(java.lang.String uri,
ARTResource... graphs)
This method has a different behavior depending on the level of the vocabulary used by the repository
implementation.
|
void |
addComment(ARTResource subject,
java.lang.String label,
java.lang.String language,
ARTResource... graphs)
/* ADD/REMOVE METHODS ***
|
void |
addLabel(ARTResource subject,
java.lang.String label,
java.lang.String language,
ARTResource... graphs)
Adds
label to subject in the given language language |
void |
addPropertyDomain(ARTURIResource property,
ARTResource domain,
ARTResource... graphs)
adds a domain statement between
property and domain beware:
property should already be part of the repository! |
void |
addPropertyRange(ARTURIResource property,
ARTResource range,
ARTResource... graphs)
adds a range statement between
property and range beware:
property should already be part of the repository! |
void |
addSuperClass(ARTResource cls,
ARTResource supercls,
ARTResource... graphs) |
void |
addSuperProperty(ARTURIResource property,
ARTURIResource superProperty,
ARTResource... graphs)
adds a subPropertyOf statement between
property and superProp beware:
property should already be part of the repository! |
void |
deleteClass(ARTResource cls,
ARTResource... graphs) |
boolean |
hasSuperProperty(ARTURIResource property,
ARTURIResource superProp,
boolean inferred,
ARTResource... graphs)
HAS METHODS *******
|
boolean |
isClass(ARTResource cls,
ARTResource... graphs)
/* BOOLEAN METHODS ***
|
ARTResourceIterator |
listClasses(boolean inferred,
ARTResource... graphs)
list all the classes in the current Model (in graphs:
graphs). |
ARTLiteralIterator |
listComments(ARTResource res,
boolean inferred,
ARTResource... graphs)
/* LIST/GET METHODS ***
|
ARTLiteralIterator |
listLabels(ARTResource res,
boolean inferred,
ARTResource... graphs)
lists all labels for given
ARTResource res |
ARTURIResourceIterator |
listNamedClasses(boolean inferred,
ARTResource... graphs)
list all the classes in the current Model (in graphs:
graphs) which have a name (a URI). |
ARTURIResourceIterator |
listNamedResources(ARTResource... graphs)
list all the URI resources in the current Model.
|
ARTURIResourceIterator |
listPropertiesForDomainClass(ARTResource cls,
boolean inferred,
ARTResource... graphs)
returns all the properties which see class
cls as their domain |
ARTURIResourceIterator |
listPropertiesForRangeClass(ARTResource cls,
boolean inferred,
ARTResource... graphs)
returns all the properties which see class
cls as their range |
ARTResourceIterator |
listPropertyDomains(ARTResource property,
boolean inferred,
ARTResource... graphs)
returns all the classes which have been declared in the domain of the property
|
ARTResourceIterator |
listPropertyRanges(ARTResource property,
boolean inferred,
ARTResource... graphs)
as
getPropertyRanges(property, false) |
ARTResourceIterator |
listSubClasses(ARTResource cls,
boolean inferred,
ARTResource... graphs)
returns all subclasses (also non direct ones) of class
cls |
ARTURIResourceIterator |
listSubProperties(ARTURIResource property,
boolean inferred,
ARTResource... graphs)
returns a list of subproperties of
resource |
ARTResourceIterator |
listSuperClasses(ARTResource cls,
boolean inferred,
ARTResource... graphs)
returns all superclasses (also non direct ones) of class
cls |
ARTURIResourceIterator |
listSuperProperties(ARTURIResource property,
boolean inferred,
ARTResource... graphs)
returns a list of superproperties of
resource |
ARTURIResourceIterator |
listURISuperClasses(ARTResource cls,
boolean inferred,
ARTResource... graphs)
given class
cls, it retrieves all of its named superclasses in an Iterator |
void |
removeComment(ARTResource subject,
java.lang.String label,
java.lang.String language,
ARTResource... graphs)
removes a comment for given
resource from the model |
void |
removeLabel(ARTResource subject,
java.lang.String label,
java.lang.String language,
ARTResource... graphs)
removes a label for given
resource from the model |
void |
removePropertyDomain(ARTURIResource property,
ARTResource domain,
ARTResource... graphs)
removes a domain statement between
property and domain beware:
property should already be part of the repository! |
void |
removePropertyRange(ARTURIResource property,
ARTResource range,
ARTResource... graphs)
removes a range statement between
property and range beware:
property should already be part of the repository! |
void |
removeSuperClass(ARTResource cls,
ARTResource supercls,
ARTResource... graphs) |
void |
removeSuperProperty(ARTResource property,
ARTResource superProp,
ARTResource... graphs)
removes a subPropertyOf statement between
property and superProp beware:
property should already be part of the repository! |
void |
renameClass(ARTURIResource cls,
java.lang.String newURI,
ARTResource... graphs) |
ARTURIResource |
retrieveClass(java.lang.String uri,
ARTResource... graphs)
/* RETRIEVE METHODS ***
|
boolean |
supportsClassIdentification()
tells that the reasoner is able to infer if the given resource is a class, e.g. because it is the
subject of a <*,rdfs:subClassOf,*> triple
|
boolean |
supportsSubClassOfClosure()
this reasoner is able to entail that:
given three classes
c1, c2 and c3
for which holds that c1 rdfs:subClassOf c2 and c2 rdfs:subClassOf c3
then it holds also true that: c1 rdfs:subClassOf c3 |
boolean |
supportsSubPropertyMaterialization()
RDFS REASONING METHODS ***
|
boolean |
supportsSubPropertyOfClosure()
this reasoner is able to entail that:
given three properties
p1, p2 and p3
for which holds that p1 rdfs:subPropertyOf p2 and
p2 rdfs:subPropertyOf p3
then it holds also true that: p1 rdfs:subPropertyOf p3 |
addInstance, addProperty, addRDF, addRDF, addStatement, addTriple, addType, clearRDF, close, createBNode, createBNode, createBooleanQuery, createBooleanQuery, createBooleanQuery, createBooleanQuery, createGraphQuery, createGraphQuery, createGraphQuery, createGraphQuery, createLiteral, createLiteral, createLiteral, createQuery, createQuery, createQuery, createQuery, createStatement, createTupleQuery, createTupleQuery, createTupleQuery, createTupleQuery, createUpdate, createUpdateQuery, createUpdateQuery, createUpdateQuery, createURIResource, deleteProperty, deleteResource, deleteStatement, deleteTriple, existsResource, expandQName, getBaseURI, getDefaultNamespace, getNamespacePrefixMapping, getNSForPrefix, getPrefixForNS, getQName, hasStatement, hasTriple, hasType, instantiatePropertyWithPlainLiteral, instantiatePropertyWithPlainLiteral, instantiatePropertyWithResource, instantiatePropertyWithTypedLiteral, isProperty, listInstances, listNamedGraphs, listNamedInstances, listNamespaces, listPredicatesOfSubjObjPair, listProperties, listStatements, listSubjectsOfPredObjPair, listTypes, listValuesOfSubjPredPair, removeNsPrefixMapping, removeType, renameProperty, renameResource, retrieveBNode, retrieveURIResource, setBaseURI, setDefaultNamespace, setNsPrefix, writeRDF, writeRDF, writeRDF, writeRDFclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddInstance, addProperty, addType, deleteProperty, deleteResource, existsResource, hasType, instantiatePropertyWithPlainLiteral, instantiatePropertyWithPlainLiteral, instantiatePropertyWithResource, instantiatePropertyWithTypedLiteral, isProperty, listInstances, listNamedInstances, listProperties, listTypes, removeType, renameProperty, renameResource, retrieveBNode, retrieveURIResourceaddRDF, addRDF, addStatement, addTriple, clearRDF, close, deleteStatement, deleteTriple, getBaseURI, getDefaultNamespace, hasStatement, hasTriple, listNamedGraphs, listNamespaces, listPredicatesOfSubjObjPair, listStatements, listSubjectsOfPredObjPair, listValuesOfSubjPredPair, setBaseURI, setDefaultNamespace, writeRDF, writeRDFexpandQName, getNamespacePrefixMapping, getNSForPrefix, getPrefixForNS, getQName, removeNsPrefixMapping, setNsPrefixcreateBNode, createBNode, createLiteral, createLiteral, createLiteral, createStatement, createURIResourcewriteRDF, writeRDFcreateBooleanQuery, createBooleanQuery, createBooleanQuery, createGraphQuery, createGraphQuery, createGraphQuery, createQuery, createQuery, createQuery, createTupleQuery, createTupleQuery, createTupleQuery, createUpdateQuery, createUpdateQuery, createUpdateQuerycreateBooleanQuery, createGraphQuery, createQuery, createTupleQuery, createUpdatepublic RDFSModelImpl(BaseRDFTripleModel baseRep)
public void addComment(ARTResource subject, java.lang.String label, java.lang.String language, ARTResource... graphs) throws ModelUpdateException
addComment in interface RDFSModelModelUpdateExceptionpublic void addLabel(ARTResource subject, java.lang.String label, java.lang.String language, ARTResource... graphs) throws ModelUpdateException
RDFSModellabel to subject in the given language languageaddLabel in interface RDFSModelModelUpdateExceptionpublic void addClass(java.lang.String uri,
ARTResource... graphs)
throws ModelUpdateException
RDFSModeladdClass in interface RDFSModeluri - URI string of the class being createdModelUpdateExceptionpublic void addPropertyDomain(ARTURIResource property, ARTResource domain, ARTResource... graphs) throws ModelUpdateException
RDFSModelproperty and domain beware:
property should already be part of the repository!addPropertyDomain in interface RDFSModelModelUpdateExceptionpublic void addPropertyRange(ARTURIResource property, ARTResource range, ARTResource... graphs) throws ModelUpdateException
RDFSModelproperty and range beware:
property should already be part of the repository!addPropertyRange in interface RDFSModelModelUpdateExceptionpublic void addSuperClass(ARTResource cls, ARTResource supercls, ARTResource... graphs) throws ModelUpdateException
addSuperClass in interface RDFSModelModelUpdateExceptionpublic void addSuperProperty(ARTURIResource property, ARTURIResource superProperty, ARTResource... graphs) throws ModelUpdateException
RDFSModelproperty and superProp beware:
property should already be part of the repository!addSuperProperty in interface RDFSModelModelUpdateExceptionpublic void removeComment(ARTResource subject, java.lang.String label, java.lang.String language, ARTResource... graphs) throws ModelUpdateException
RDFSModelresource from the modelremoveComment in interface RDFSModelModelUpdateExceptionpublic void removeLabel(ARTResource subject, java.lang.String label, java.lang.String language, ARTResource... graphs) throws ModelUpdateException
RDFSModelresource from the modelremoveLabel in interface RDFSModelModelUpdateExceptionpublic void removePropertyDomain(ARTURIResource property, ARTResource domain, ARTResource... graphs) throws ModelUpdateException
RDFSModelproperty and domain beware:
property should already be part of the repository!removePropertyDomain in interface RDFSModelModelUpdateExceptionpublic void removePropertyRange(ARTURIResource property, ARTResource range, ARTResource... graphs) throws ModelUpdateException
RDFSModelproperty and range beware:
property should already be part of the repository!removePropertyRange in interface RDFSModelModelUpdateExceptionpublic void removeSuperClass(ARTResource cls, ARTResource supercls, ARTResource... graphs) throws ModelUpdateException
removeSuperClass in interface RDFSModelModelUpdateExceptionpublic void removeSuperProperty(ARTResource property, ARTResource superProp, ARTResource... graphs) throws ModelUpdateException
RDFSModelproperty and superProp beware:
property should already be part of the repository!removeSuperProperty in interface RDFSModelModelUpdateExceptionpublic boolean isClass(ARTResource cls, ARTResource... graphs) throws ModelAccessException
isClass in interface RDFSModelModelAccessExceptionpublic ARTURIResource retrieveClass(java.lang.String uri, ARTResource... graphs) throws ModelAccessException
retrieveClass in interface RDFSModelModelAccessExceptionUnavailableResourceExceptionpublic boolean hasSuperProperty(ARTURIResource property, ARTURIResource superProp, boolean inferred, ARTResource... graphs) throws ModelAccessException
hasSuperProperty in interface RDFSModeltrue if property rdfs:subPropertyOf superPropModelAccessExceptionpublic ARTLiteralIterator listComments(ARTResource res, boolean inferred, ARTResource... graphs) throws ModelAccessException
listComments in interface RDFSModelModelAccessExceptionpublic ARTLiteralIterator listLabels(ARTResource res, boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModelARTResource reslistLabels in interface RDFSModelModelAccessExceptionpublic ARTURIResourceIterator listPropertiesForDomainClass(ARTResource cls, boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModelcls as their domainlistPropertiesForDomainClass in interface RDFSModelModelAccessExceptionpublic ARTURIResourceIterator listPropertiesForRangeClass(ARTResource cls, boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModelcls as their rangelistPropertiesForRangeClass in interface RDFSModelModelAccessExceptionpublic ARTResourceIterator listPropertyDomains(ARTResource property, boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModellistPropertyDomains in interface RDFSModelproperty - the property whose domain is being queriedModelAccessExceptionpublic ARTResourceIterator listPropertyRanges(ARTResource property, boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModelgetPropertyRanges(property, false)listPropertyRanges in interface RDFSModelproperty - the property whose range is being queriedModelAccessExceptionpublic ARTResourceIterator listSubClasses(ARTResource cls, boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModelclslistSubClasses in interface RDFSModelModelAccessExceptionpublic ARTResourceIterator listSuperClasses(ARTResource cls, boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModelclslistSuperClasses in interface RDFSModelinferred - TODOModelAccessExceptionpublic ARTURIResourceIterator listSubProperties(ARTURIResource property, boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModelresourcelistSubProperties in interface RDFSModelresourceModelAccessExceptionpublic ARTURIResourceIterator listSuperProperties(ARTURIResource property, boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModelresourcelistSuperProperties in interface RDFSModelresourceModelAccessExceptionpublic ARTURIResourceIterator listNamedClasses(boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModelgraphs) which have a name (a URI).
If this model is also an RDFSReasoner which RDFSReasoner.supportsSubClassOfClosure(),
the returned URIs are all rdf instances of RDFS.CLASS. If negative case, the returned URIs are
those specified as subjects of triples present in the given graphs where the predicate is
RDF.TYPE or RDFS.SUBCLASSOF.listNamedClasses in interface RDFSModelModelAccessExceptionpublic ARTResourceIterator listClasses(boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModelgraphs). If this model is also an
RDFSReasoner which RDFSReasoner.supportsSubClassOfClosure(), the returned URIs are all
rdf instances of RDFS.CLASS. If negative case, the returned URIs are those specified as
subjects of triples present in the given graphs where the predicate is RDF.TYPE or
RDFS.SUBCLASSOF.listClasses in interface RDFSModelModelAccessExceptionpublic ARTURIResourceIterator listNamedResources(ARTResource... graphs) throws ModelAccessException
RDFSModelRDFSReasoner which
RDFSReasoner.supportsSubClassOfClosure(), the returned URIs are all rdf instances of
RDFS.RESOURCE. If negative case, the returned URIs are those specified as subjects of triples
present in the specified graphs.listNamedResources in interface RDFSModelModelAccessExceptionpublic ARTURIResourceIterator listURISuperClasses(ARTResource cls, boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModelcls, it retrieves all of its named superclasses in an IteratorlistURISuperClasses in interface RDFSModelModelAccessExceptionpublic void deleteClass(ARTResource cls, ARTResource... graphs) throws ModelUpdateException
deleteClass in interface RDFSModelModelUpdateExceptionpublic void renameClass(ARTURIResource cls, java.lang.String newURI, ARTResource... graphs) throws ModelUpdateException
renameClass in interface RDFSModelModelUpdateExceptionpublic boolean supportsSubPropertyMaterialization()
supportsSubPropertyMaterialization in interface RDFSReasonerpublic boolean supportsSubPropertyOfClosure()
RDFSReasonerp1, p2 and p3p1 rdfs:subPropertyOf p2 and
p2 rdfs:subPropertyOf p3p1 rdfs:subPropertyOf p3supportsSubPropertyOfClosure in interface RDFSReasonerpublic boolean supportsSubClassOfClosure()
RDFSReasonerc1, c2 and c3c1 rdfs:subClassOf c2 and c2 rdfs:subClassOf c3c1 rdfs:subClassOf c3supportsSubClassOfClosure in interface RDFSReasonerpublic boolean supportsClassIdentification()
RDFSReasonersupportsClassIdentification in interface RDFSReasonerCopyright © 2013 ART Group, University of Rome, Tor Vergata. All Rights Reserved.