org.weblab_project.core.helper
Interface AnnotationHelper

All Superinterfaces:
PoKHelper
All Known Subinterfaces:
AnnotationHelperExtended

Deprecated.

@Deprecated
public interface AnnotationHelper
extends PoKHelper

Author:
ymombrun
WARNING:
Deprecated. Use PoKHelper instead.
Date:
2009-06-23

Method Summary
 void createLitStat(java.lang.String uriSubj, java.lang.String uriPred, java.lang.String litObj)
          Creates a statement having uriSubj as subject, uriPred as predicate and litObj as literal value of the object.
 void createLitStat(java.lang.String uriSubj, java.lang.String uriPred, java.lang.String litObj, java.lang.String language)
          Creates a statement having uriSubj as subject, uriPred as predicate and litObj as literal value of the object.
 void createResStat(java.lang.String uriSubj, java.lang.String uriPred, java.lang.String uriObj)
          Creates a statement having uriSubj as subject, uriPred as predicate and uriObj as URI of the object.
 Annotation getAnnotation()
          Deprecated. 
 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()
           
 java.util.List<java.lang.String> getRessOnPredSubj(java.lang.String uriSubj, java.lang.String uriPred)
           
 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)
           
 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.
 void loadFromRdfXml(java.lang.String rdfXml)
          Loads an RDF/XML String, to be queried.
 void removeLitStat(java.lang.String uriSubj, java.lang.String uriPred, java.lang.String litObj)
          Removes every statements having uriSubj as subject, uriPred as predicate and litObj as literal value of the object.
 void removeResStat(java.lang.String uriSubj, java.lang.String uriPred, java.lang.String uriObj)
          Removes every statements having uriSubj as subject, uriPred as predicate and uriObj as URI of the object.
 void removeStatsOnSubj(java.lang.String uriSubj)
          Removes every statements having uriSubj as subject whatever are predicate and object.
 void removeStatsWithLit(java.lang.String litObj)
          Removes every statements having litObj as object literal value whatever are subject and predicate.
 void removeStatsWithPred(java.lang.String uriPred)
          Removes every statements having uriPred as predicate whatever are subject and object.
 void removeStatsWithRes(java.lang.String uriObj)
          Removes every statements having uriObj as object named resource URI value whatever are subject and predicate.
 void setAnnotation(Annotation annotation)
          Deprecated. 
 
Methods inherited from interface org.weblab_project.core.helper.PoKHelper
commit, getPoK, setAutoCommitMode, setPoK
 

Method Detail

getAnnotation

@Deprecated
Annotation getAnnotation()
Deprecated. 

Retrieve the current Annotation which is manipulated. Please not that this will not commit any changes made into the RDF/XML if AnnotationHelper do not works in "autoCommitMode" and if you did not call PoKHelper.commit() method.

Returns:
The loaded Annotation.
WARNING:
Use getPOK instead

setAnnotation

@Deprecated
void setAnnotation(Annotation annotation)
Deprecated. 

Fixes the current Annotation which is manipulated by the helper. Note that using an AnnotationHelper without Annotation will throw RuntimeException.

Parameters:
annotation - An existing Annotation
WARNING:
Use setPOK instead

getRdfXml

java.lang.String getRdfXml()
Returns:
A valid RDF/XML String of the current changed made.

loadFromRdfXml

void loadFromRdfXml(java.lang.String rdfXml)
                    throws WebLabCheckedException
Loads an RDF/XML String, to be queried.

Parameters:
rdfXml - A RDF/XML content to be loaded.
Throws:
WebLabCheckedException - If the rdfXml is not an RDF/XML valid String.

getLitsOnPredSubj

java.util.List<java.lang.String> getLitsOnPredSubj(java.lang.String uriSubj,
                                                   java.lang.String uriPred)
Parameters:
uriSubj - The URI of the subject resource.
uriPred - The URI of the predicate resource.
Returns:
A List containing values of every literal that are object of statements having uriPred as predicate and uriSubj as subject in the PieceOfKnowledge.

getLitsOnPredSubj

java.util.List<java.lang.String> getLitsOnPredSubj(java.lang.String uriSubj,
                                                   java.lang.String uriPred,
                                                   java.lang.String language)
Parameters:
uriSubj - The URI of the subject resource.
uriPred - The URI of the predicate resource.
language - The xml:lang attribute for this literal.
Returns:
A 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.

getPredsOnSubj

java.util.Set<java.lang.String> getPredsOnSubj(java.lang.String uriSubj)
Parameters:
uriSubj - The URI of the subject resource.
Returns:
A Set containing URIs of every named resources that are predicate of any statement having uriSubj as subject in the PieceOfKnowledge.

getRessOnPredSubj

java.util.List<java.lang.String> getRessOnPredSubj(java.lang.String uriSubj,
                                                   java.lang.String uriPred)
Parameters:
uriSubj - The URI of the subject resource.
uriPred - The URI of the predicate resource.
Returns:
A List containing URIs of every named resources that are object of statements having uriPred as predicate and uriSubj as subject in the PieceOfKnowledge.

getSubjs

java.util.Set<java.lang.String> getSubjs()
Returns:
A Set containing URIs of every named resources that are subject of any statement in the PieceOfKnowledge.

getSubjsOnPred

java.util.Set<java.lang.String> getSubjsOnPred(java.lang.String uriPred)
Parameters:
uriPred - The URI of the predicate resource.
Returns:
A Set containing URIs of every named resources that are subject of statements having uriPred as predicate in the PieceOfKnowledge.

getSubjsOnPredLit

java.util.Set<java.lang.String> getSubjsOnPredLit(java.lang.String uriPred,
                                                  java.lang.String litObj)
Parameters:
uriPred - The URI of the predicate resource.
litObj - The literal value of the object.
Returns:
A 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.

getSubjsOnPredRes

java.util.Set<java.lang.String> getSubjsOnPredRes(java.lang.String uriPred,
                                                  java.lang.String uriObj)
Parameters:
uriPred - The URI of the predicate resource.
uriObj - The URI of the object resource.
Returns:
A 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.

hasLitStat

boolean hasLitStat(java.lang.String uriSubj,
                   java.lang.String uriPred,
                   java.lang.String litObj)
Parameters:
uriSubj - The URI of the subject resource.
uriPred - The URI of the predicate resource.
litObj - The literal value of the object.
Returns:
Whether or not the PieceOfKnowledge contains at least one statement having uriSubj as subject, uriPred as predicate and litObj as literal value of the object.

hasResStat

boolean hasResStat(java.lang.String uriSubj,
                   java.lang.String uriPred,
                   java.lang.String uriObj)
Parameters:
uriSubj - The URI of the subject resource.
uriPred - The URI of the predicate resource.
uriObj - The URI of the object resource.
Returns:
Whether or not the PieceOfKnowledge contains at least one statement having uriSubj as subject, uriPred as predicate and uriObj as URI of the object.

isDefinedResource

boolean isDefinedResource(java.lang.String uri)
Tests if the given URI is defined as a named resource in the PieceOfKnowledge.

Parameters:
uri - The URI to test existence in the PieceOfKnowledge.
Returns:
true if the URI is defined as a named resource URI in the PieceOfKnowledge.

getPreds

java.util.Set<java.lang.String> getPreds()
Returns:
A Set containing URIs of properties that are predicate of any statement in the PieceOfKnowledge.

createLitStat

void createLitStat(java.lang.String uriSubj,
                   java.lang.String uriPred,
                   java.lang.String litObj,
                   java.lang.String language)
Creates a statement having uriSubj as subject, uriPred as predicate and litObj as literal value of the object.

Parameters:
uriSubj - The URI of the subject resource.
uriPred - The URI of the predicate resource.
litObj - The literal value of the object.
language - The language of the literal value. See http://www.w3.org/TR/REC-xml/#sec-lang-tag for more information.

createLitStat

void createLitStat(java.lang.String uriSubj,
                   java.lang.String uriPred,
                   java.lang.String litObj)
Creates a statement having uriSubj as subject, uriPred as predicate and litObj as literal value of the object.

Parameters:
uriSubj - The URI of the subject resource.
uriPred - The URI of the predicate resource.
litObj - The literal value of the object.

createResStat

void createResStat(java.lang.String uriSubj,
                   java.lang.String uriPred,
                   java.lang.String uriObj)
Creates a statement having uriSubj as subject, uriPred as predicate and uriObj as URI of the object.

Parameters:
uriSubj - The URI of the subject resource.
uriPred - The URI of the predicate resource.
uriObj - The URI of the object resource.

removeLitStat

void removeLitStat(java.lang.String uriSubj,
                   java.lang.String uriPred,
                   java.lang.String litObj)
Removes every statements having uriSubj as subject, uriPred as predicate and litObj as literal value of the object.

Parameters:
uriSubj - The URI of the subject resource.
uriPred - The URI of the predicate resource.
litObj - The literal value of the object.

removeResStat

void removeResStat(java.lang.String uriSubj,
                   java.lang.String uriPred,
                   java.lang.String uriObj)
Removes every statements having uriSubj as subject, uriPred as predicate and uriObj as URI of the object.

Parameters:
uriSubj - The URI of the subject resource.
uriPred - The URI of the predicate resource.
uriObj - The URI of the object resource.

removeStatsOnSubj

void removeStatsOnSubj(java.lang.String uriSubj)
Removes every statements having uriSubj as subject whatever are predicate and object.

Parameters:
uriSubj - The URI of the subject resource.

removeStatsWithLit

void removeStatsWithLit(java.lang.String litObj)
Removes every statements having litObj as object literal value whatever are subject and predicate.

Parameters:
litObj - The literal value of the object.

removeStatsWithPred

void removeStatsWithPred(java.lang.String uriPred)
Removes every statements having uriPred as predicate whatever are subject and object.

Parameters:
uriPred - The URI of the predicate resource.

removeStatsWithRes

void removeStatsWithRes(java.lang.String uriObj)
Removes every statements having uriObj as object named resource URI value whatever are subject and predicate.

Parameters:
uriObj - The URI of the object resource. The URI of the object resource.


Copyright © 2004-2010. All Rights Reserved.