|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResourceHelper
API to manipulate Annotation
objects that are present on a Resource
and its potential sub-resources.
Note that if the given Resource
is it self an PieceOfKnowledge
, it will not load its content but the content of every
Annotation
on this PieceOfKnowledge
(and recursively then for each Annotation
loaded).
RecursiveAnnotationHelper
.
PoKHelper
,
ResourceHelperExtended
Method Summary | ||
---|---|---|
java.util.List<java.lang.String> |
getLitsOnPredSubj(java.lang.String uriSubj,
java.lang.String uriPred)
|
|
java.util.List<java.lang.String> |
getLitsOnPredSubj(java.lang.String uriSubj,
java.lang.String uriPred,
java.lang.String language)
|
|
java.util.Set<java.lang.String> |
getPreds()
|
|
java.util.Set<java.lang.String> |
getPredsOnSubj(java.lang.String uriSubj)
|
|
java.lang.String |
getRdfXml()
|
|
Resource |
getResource()
|
|
Resource |
getResource(java.lang.String uri)
|
|
java.util.List<java.lang.String> |
getRessOnPredSubj(java.lang.String uriSubj,
java.lang.String uriPred)
|
|
|
getSpecificResource(java.lang.String uri,
java.lang.Class<T> resourceType)
|
|
java.util.Set<java.lang.String> |
getSubjs()
|
|
java.util.Set<java.lang.String> |
getSubjsOnPred(java.lang.String uriPred)
|
|
java.util.Set<java.lang.String> |
getSubjsOnPredLit(java.lang.String uriPred,
java.lang.String litObj)
|
|
java.util.Set<java.lang.String> |
getSubjsOnPredRes(java.lang.String uriPred,
java.lang.String uriObj)
|
|
java.lang.Class<? extends Resource> |
getType(java.lang.String uri)
|
|
boolean |
hasLitStat(java.lang.String uriSubj,
java.lang.String uriPred,
java.lang.String litObj)
|
|
boolean |
hasResStat(java.lang.String uriSubj,
java.lang.String uriPred,
java.lang.String uriObj)
|
|
boolean |
isDefinedResource(java.lang.String uri)
Tests if the given URI is defined as a named resource in the PieceOfKnowledge . |
|
boolean |
isFullyDefinedResource(java.lang.String uri)
|
|
void |
loadFromRdfXml(java.lang.String rdfXml)
Loads an RDF/XML String , to be queried. |
|
void |
setResource(Resource resource)
Fixes the current Resource that is manipulated by the helper. |
Method Detail |
---|
void setResource(Resource resource)
Resource
that is manipulated by the helper.resource
to load every Annotation
that are present in its Resource
tree.
resource
- The Resource
to be considered by this helper.Resource getResource()
Resource
currently handled by the helper.Resource getResource(java.lang.String uri) throws WebLabCheckedException
uri
- The URI of a Resource
that must be defined in RDF statements and in the Resource
tree.
Resource
, which is a sub-resource of the Resource
behind this helper, and that its URI is uri
.
WebLabCheckedException
- If uri
is not a valid Resource
and a defined URI in RDF.boolean isFullyDefinedResource(java.lang.String uri)
uri
- An URI to test existence in RDF and in loaded sub-resources.
uri
represents a WebLab Resource
present in Resource
tree and an RDF resource.<T extends Resource> T getSpecificResource(java.lang.String uri, java.lang.Class<T> resourceType) throws WebLabCheckedException
T
- The real class of the Resource
to load.uri
- The URI of a Resource
that must be defined in RDF statements and in the Resource
tree.resourceType
- The class
of the Resource
represented by uri
.
Resource
, which is a sub-resource of the Resource
behind this helper, and that its URI is uri
.
WebLabCheckedException
- If uri
is not a valid Resource
and a defined URI in RDF.java.lang.Class<? extends Resource> getType(java.lang.String uri) throws WebLabCheckedException
uri
- The URI of a Resource
that must be defined in RDF statements and in the Resource
tree.
class
of the Resource
represented by uri
.
WebLabCheckedException
- If uri
is not a valid Resource
and a defined URI in RDF.java.lang.String getRdfXml()
String
of the current changed made.void loadFromRdfXml(java.lang.String rdfXml) throws WebLabCheckedException
String
, to be queried.
rdfXml
- A RDF/XML content to be loaded.
WebLabCheckedException
- If the rdfXml
is not an RDF/XML valid String
.java.util.List<java.lang.String> getLitsOnPredSubj(java.lang.String uriSubj, java.lang.String uriPred)
uriSubj
- The URI of the subject resource.uriPred
- The URI of the predicate resource.
List
containing values of every literal that are object of statements having uriPred
as predicate and
uriSubj
as subject in the PieceOfKnowledge
.java.util.List<java.lang.String> getLitsOnPredSubj(java.lang.String uriSubj, java.lang.String uriPred, java.lang.String language)
uriSubj
- The URI of the subject resource.uriPred
- The URI of the predicate resource.language
- The xml:lang attribute for this literal.
List
containing values in language language
of every literal that are object of statements having uriPred
as predicate and
uriSubj
as subject in the PieceOfKnowledge
. For more information about language attribute, see http://www.w3.org/TR/REC-xml/#sec-lang-tag.java.util.Set<java.lang.String> getPredsOnSubj(java.lang.String uriSubj)
uriSubj
- The URI of the subject resource.
Set
containing URIs of every named resources that are predicate of any statement having uriSubj
as subject in the
PieceOfKnowledge
.java.util.List<java.lang.String> getRessOnPredSubj(java.lang.String uriSubj, java.lang.String uriPred)
uriSubj
- The URI of the subject resource.uriPred
- The URI of the predicate resource.
List
containing URIs of every named resources that are object of statements having uriPred
as predicate and
uriSubj
as subject in the PieceOfKnowledge
.java.util.Set<java.lang.String> getSubjs()
Set
containing URIs of every named resources that are subject of any statement in the PieceOfKnowledge
.java.util.Set<java.lang.String> getSubjsOnPred(java.lang.String uriPred)
uriPred
- The URI of the predicate resource.
Set
containing URIs of every named resources that are subject of statements having uriPred
as predicate in the
PieceOfKnowledge
.java.util.Set<java.lang.String> getSubjsOnPredLit(java.lang.String uriPred, java.lang.String litObj)
uriPred
- The URI of the predicate resource.litObj
- The literal value of the object.
Set
containing URIs of every named resources that are subject of statements having uriPred
as predicate and
litObj
as object literal value in the PieceOfKnowledge
.java.util.Set<java.lang.String> getSubjsOnPredRes(java.lang.String uriPred, java.lang.String uriObj)
uriPred
- The URI of the predicate resource.uriObj
- The URI of the object resource.
Set
containing URIs of every named resources that are subject of statements having uriPred
as predicate and
uriObj
as object named resource URI in the PieceOfKnowledge
.boolean hasLitStat(java.lang.String uriSubj, java.lang.String uriPred, java.lang.String litObj)
uriSubj
- The URI of the subject resource.uriPred
- The URI of the predicate resource.litObj
- The literal value of the object.
PieceOfKnowledge
contains at least one statement having uriSubj
as subject, uriPred
as
predicate and litObj
as literal value of the object.boolean hasResStat(java.lang.String uriSubj, java.lang.String uriPred, java.lang.String uriObj)
uriSubj
- The URI of the subject resource.uriPred
- The URI of the predicate resource.uriObj
- The URI of the object resource.
PieceOfKnowledge
contains at least one statement having uriSubj
as subject, uriPred
as
predicate and uriObj
as URI of the object.boolean isDefinedResource(java.lang.String uri)
PieceOfKnowledge
.
uri
- The URI to test existence in the PieceOfKnowledge
.
true
if the URI is defined as a named resource URI in the PieceOfKnowledge
.java.util.Set<java.lang.String> getPreds()
Set
containing URIs of properties that are predicate of any statement in the PieceOfKnowledge
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |