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, writeRDF
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addInstance, addProperty, addType, deleteProperty, deleteResource, existsResource, hasType, instantiatePropertyWithPlainLiteral, instantiatePropertyWithPlainLiteral, instantiatePropertyWithResource, instantiatePropertyWithTypedLiteral, isProperty, listInstances, listNamedInstances, listProperties, listTypes, removeType, renameProperty, renameResource, retrieveBNode, retrieveURIResource
addRDF, addRDF, addStatement, addTriple, clearRDF, close, deleteStatement, deleteTriple, getBaseURI, getDefaultNamespace, hasStatement, hasTriple, listNamedGraphs, listNamespaces, listPredicatesOfSubjObjPair, listStatements, listSubjectsOfPredObjPair, listValuesOfSubjPredPair, setBaseURI, setDefaultNamespace, writeRDF, writeRDF
expandQName, getNamespacePrefixMapping, getNSForPrefix, getPrefixForNS, getQName, removeNsPrefixMapping, setNsPrefix
createBNode, createBNode, createLiteral, createLiteral, createLiteral, createStatement, createURIResource
writeRDF, writeRDF
createBooleanQuery, createBooleanQuery, createBooleanQuery, createGraphQuery, createGraphQuery, createGraphQuery, createQuery, createQuery, createQuery, createTupleQuery, createTupleQuery, createTupleQuery, createUpdateQuery, createUpdateQuery, createUpdateQuery
createBooleanQuery, createGraphQuery, createQuery, createTupleQuery, createUpdate
public RDFSModelImpl(BaseRDFTripleModel baseRep)
public void addComment(ARTResource subject, java.lang.String label, java.lang.String language, ARTResource... graphs) throws ModelUpdateException
addComment
in interface RDFSModel
ModelUpdateException
public void addLabel(ARTResource subject, java.lang.String label, java.lang.String language, ARTResource... graphs) throws ModelUpdateException
RDFSModel
label
to subject
in the given language language
addLabel
in interface RDFSModel
ModelUpdateException
public void addClass(java.lang.String uri, ARTResource... graphs) throws ModelUpdateException
RDFSModel
addClass
in interface RDFSModel
uri
- URI string of the class being createdModelUpdateException
public void addPropertyDomain(ARTURIResource property, ARTResource domain, ARTResource... graphs) throws ModelUpdateException
RDFSModel
property
and domain
beware:
property
should already be part of the repository!addPropertyDomain
in interface RDFSModel
ModelUpdateException
public void addPropertyRange(ARTURIResource property, ARTResource range, ARTResource... graphs) throws ModelUpdateException
RDFSModel
property
and range
beware:
property
should already be part of the repository!addPropertyRange
in interface RDFSModel
ModelUpdateException
public void addSuperClass(ARTResource cls, ARTResource supercls, ARTResource... graphs) throws ModelUpdateException
addSuperClass
in interface RDFSModel
ModelUpdateException
public void addSuperProperty(ARTURIResource property, ARTURIResource superProperty, ARTResource... graphs) throws ModelUpdateException
RDFSModel
property
and superProp
beware:
property
should already be part of the repository!addSuperProperty
in interface RDFSModel
ModelUpdateException
public void removeComment(ARTResource subject, java.lang.String label, java.lang.String language, ARTResource... graphs) throws ModelUpdateException
RDFSModel
resource
from the modelremoveComment
in interface RDFSModel
ModelUpdateException
public void removeLabel(ARTResource subject, java.lang.String label, java.lang.String language, ARTResource... graphs) throws ModelUpdateException
RDFSModel
resource
from the modelremoveLabel
in interface RDFSModel
ModelUpdateException
public void removePropertyDomain(ARTURIResource property, ARTResource domain, ARTResource... graphs) throws ModelUpdateException
RDFSModel
property
and domain
beware:
property
should already be part of the repository!removePropertyDomain
in interface RDFSModel
ModelUpdateException
public void removePropertyRange(ARTURIResource property, ARTResource range, ARTResource... graphs) throws ModelUpdateException
RDFSModel
property
and range
beware:
property
should already be part of the repository!removePropertyRange
in interface RDFSModel
ModelUpdateException
public void removeSuperClass(ARTResource cls, ARTResource supercls, ARTResource... graphs) throws ModelUpdateException
removeSuperClass
in interface RDFSModel
ModelUpdateException
public void removeSuperProperty(ARTResource property, ARTResource superProp, ARTResource... graphs) throws ModelUpdateException
RDFSModel
property
and superProp
beware:
property
should already be part of the repository!removeSuperProperty
in interface RDFSModel
ModelUpdateException
public boolean isClass(ARTResource cls, ARTResource... graphs) throws ModelAccessException
isClass
in interface RDFSModel
ModelAccessException
public ARTURIResource retrieveClass(java.lang.String uri, ARTResource... graphs) throws ModelAccessException
retrieveClass
in interface RDFSModel
ModelAccessException
UnavailableResourceException
public boolean hasSuperProperty(ARTURIResource property, ARTURIResource superProp, boolean inferred, ARTResource... graphs) throws ModelAccessException
hasSuperProperty
in interface RDFSModel
true
if property rdfs:subPropertyOf superProp
ModelAccessException
public ARTLiteralIterator listComments(ARTResource res, boolean inferred, ARTResource... graphs) throws ModelAccessException
listComments
in interface RDFSModel
ModelAccessException
public ARTLiteralIterator listLabels(ARTResource res, boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModel
ARTResource
res
listLabels
in interface RDFSModel
ModelAccessException
public ARTURIResourceIterator listPropertiesForDomainClass(ARTResource cls, boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModel
cls
as their domainlistPropertiesForDomainClass
in interface RDFSModel
ModelAccessException
public ARTURIResourceIterator listPropertiesForRangeClass(ARTResource cls, boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModel
cls
as their rangelistPropertiesForRangeClass
in interface RDFSModel
ModelAccessException
public ARTResourceIterator listPropertyDomains(ARTResource property, boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModel
listPropertyDomains
in interface RDFSModel
property
- the property whose domain is being queriedModelAccessException
public ARTResourceIterator listPropertyRanges(ARTResource property, boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModel
getPropertyRanges(property, false)listPropertyRanges
in interface RDFSModel
property
- the property whose range is being queriedModelAccessException
public ARTResourceIterator listSubClasses(ARTResource cls, boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModel
cls
listSubClasses
in interface RDFSModel
ModelAccessException
public ARTResourceIterator listSuperClasses(ARTResource cls, boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModel
cls
listSuperClasses
in interface RDFSModel
inferred
- TODOModelAccessException
public ARTURIResourceIterator listSubProperties(ARTURIResource property, boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModel
resource
listSubProperties
in interface RDFSModel
resource
ModelAccessException
public ARTURIResourceIterator listSuperProperties(ARTURIResource property, boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModel
resource
listSuperProperties
in interface RDFSModel
resource
ModelAccessException
public ARTURIResourceIterator listNamedClasses(boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModel
graphs
) 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 RDFSModel
ModelAccessException
public ARTResourceIterator listClasses(boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModel
graphs
). 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 RDFSModel
ModelAccessException
public ARTURIResourceIterator listNamedResources(ARTResource... graphs) throws ModelAccessException
RDFSModel
RDFSReasoner
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 RDFSModel
ModelAccessException
public ARTURIResourceIterator listURISuperClasses(ARTResource cls, boolean inferred, ARTResource... graphs) throws ModelAccessException
RDFSModel
cls
, it retrieves all of its named superclasses in an IteratorlistURISuperClasses
in interface RDFSModel
ModelAccessException
public void deleteClass(ARTResource cls, ARTResource... graphs) throws ModelUpdateException
deleteClass
in interface RDFSModel
ModelUpdateException
public void renameClass(ARTURIResource cls, java.lang.String newURI, ARTResource... graphs) throws ModelUpdateException
renameClass
in interface RDFSModel
ModelUpdateException
public boolean supportsSubPropertyMaterialization()
supportsSubPropertyMaterialization
in interface RDFSReasoner
public boolean supportsSubPropertyOfClosure()
RDFSReasoner
p1
, p2
and p3
p1 rdfs:subPropertyOf p2
and
p2 rdfs:subPropertyOf p3
p1 rdfs:subPropertyOf p3
supportsSubPropertyOfClosure
in interface RDFSReasoner
public boolean supportsSubClassOfClosure()
RDFSReasoner
c1
, c2
and c3
c1 rdfs:subClassOf c2
and c2 rdfs:subClassOf c3
c1 rdfs:subClassOf c3
supportsSubClassOfClosure
in interface RDFSReasoner
public boolean supportsClassIdentification()
RDFSReasoner
supportsClassIdentification
in interface RDFSReasoner
Copyright © 2013 ART Group, University of Rome, Tor Vergata. All Rights Reserved.