|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.unidu.is.annotation.rework.backend.JenaAnnotationService
JenaAnnoService.java
Jena persistent implementation of the AnnotationSerice interface
| Field Summary | |
protected de.unidu.is.retrieval.pire.PIRE |
ir
PIRE IR system |
JenaModel |
model
JenaModel |
protected int |
modelType
JenaModel type |
| Constructor Summary | |
JenaAnnotationService(int modelType)
Creates a new JenaAnnoService object with the specified model type |
|
| Method Summary | |
void |
addAnnotations(java.lang.String owlAnnotation)
Adds all annotations in the specified OWL serialization. |
void |
addAnnotationType(java.lang.String userName,
java.lang.String parentName,
java.lang.String annotypeName)
Adds a new user defined annotation type. |
protected void |
addSubClasses(JenaModel resModel,
java.lang.String subclass,
java.lang.String userName)
Adds all subclasses of subclass to the specified model.
|
protected java.lang.String |
createPatternQuery(AnnotationIndividual annotationPattern)
Creates a RDQL query. |
protected de.unidu.is.retrieval.pire.PIRE |
createPire()
Creates a new PIRE instance and registers the attribues "test" and "title" |
java.lang.String |
getAnnotation(java.lang.String annotationUri)
Returns an OWL serialization with the desired annotation. |
java.lang.String |
getAnnotationOntology(java.lang.String userName)
Returns an OWL serialization with all annotation types for a specified user |
java.lang.String |
getAnnotations(java.lang.String rdqlWhereClause)
Returns an OWL serialization with all annotations, which satisfy the specified RDQL query. |
java.lang.String |
getAnnotations(java.lang.String owlAnnotation,
java.lang.String fulltext,
int numDocs)
Returns all annotations, which satisfy the specified conditions. |
protected java.lang.String |
getAnnotationsRDQL(java.lang.String rdqlQuery)
Returns an OWL serialization with all annotations, which satisfy the specified RDQL query. |
java.lang.String |
getAnnotationThread(java.lang.String annotableObjectUri)
Returns an OWL serialization with the desired annotation thread. |
protected java.util.List |
getAnnotationThreadUris(java.lang.String annotableObjectUri)
Returns the annotation thread (as list of URIs) |
protected de.unidu.is.retrieval.pire.PIRE |
getPire()
Returns the PIRE instance. |
protected void |
getReplyUris(java.lang.String annotabelObjectUri,
java.util.List resUriList)
Returns all annotations, which annotate the specified annotable object (transitive closure) |
protected java.util.List |
getResultIntersection(java.util.List searchResults,
java.util.List retrievalResults)
Returns the intersection of the specified lists |
void |
importBasicOntology()
Imports the basic ontology. |
void |
importOwlFile(java.lang.String owlFileUri)
Imports an OWL file. |
void |
indexAllAnnotations()
Indexes all annotations (only title and text) with PIRE |
void |
modifyAnnotations(java.lang.String userUri,
java.lang.String owlAnnotation)
Replaces all annotations, which are mentioned in the specified ontology, if the annotation is created by the specified user and the annotation has got no childs. |
void |
removeAnnotation(java.lang.String userUri,
java.lang.String annotationUri)
Removes the annotation with the specified URI, if the annotation is created by the specified user and the annotation has got no childs. |
protected java.util.List |
retrieveAnnotations(java.lang.String query,
int numDocs)
Returns all relevant annotations (as ProbDoc list) |
protected java.util.List |
searchAnnotations(java.lang.String owlAnnotation)
Returns all annotations, which satisfy the specified conditions. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public JenaModel model
protected int modelType
protected de.unidu.is.retrieval.pire.PIRE ir
| Constructor Detail |
public JenaAnnotationService(int modelType)
throws ModelException
modelType - Model type (JenaModel.MEMORY or JenaModel.PERSISTENT)
ModelException - if a model error occurs| Method Detail |
public void importOwlFile(java.lang.String owlFileUri)
throws ModelException
owlFileUri - URI of the OWL file to be imported
ModelException - if a model error occurs
public void importBasicOntology()
throws ModelException
ModelException - if a model error occurs
public void addAnnotations(java.lang.String owlAnnotation)
throws ModelException
addAnnotations in interface BackendAnnotationServiceowlAnnotation - OWL serialization to be imported
ModelException - if a model error occurs
public java.lang.String getAnnotation(java.lang.String annotationUri)
throws ModelException,
ResourceNotFoundException
getAnnotation in interface BackendAnnotationServiceannotationUri - URI of the desired annotation
ModelException - if a model error occurs
ResourceNotFoundException - if the desired annotation
does not exist
protected void getReplyUris(java.lang.String annotabelObjectUri,
java.util.List resUriList)
annotabelObjectUri - URI of the annotationresUriList - List of URIs
protected java.util.List getAnnotationThreadUris(java.lang.String annotableObjectUri)
throws ModelException
annotableObjectUri - URI of the annotation
ModelException - if a model error occurs
public java.lang.String getAnnotationThread(java.lang.String annotableObjectUri)
throws ModelException
getAnnotationThread in interface BackendAnnotationServiceannotableObjectUri - URI of the annotable object
ModelException
protected java.lang.String getAnnotationsRDQL(java.lang.String rdqlQuery)
throws ModelException
rdqlQuery - RDQL query
ModelException - if a model error occursprotected java.lang.String createPatternQuery(AnnotationIndividual annotationPattern)
annotationPattern - Annotation pattern
protected java.util.List searchAnnotations(java.lang.String owlAnnotation)
throws ModelException
null.
owlAnnotation - OWL serialization with annotation pattern
ModelException - if a model error occurs
protected java.util.List retrieveAnnotations(java.lang.String query,
int numDocs)
throws ModelException
query - TermsnumDocs - Number of documents to retrieve
ModelException
protected java.util.List getResultIntersection(java.util.List searchResults,
java.util.List retrievalResults)
searchResults - List of URIsretrievalResults - List of ProbDoc instances
ProbDoc instances)
public java.lang.String getAnnotations(java.lang.String owlAnnotation,
java.lang.String fulltext,
int numDocs)
throws ModelException
null.
getAnnotations in interface BackendAnnotationServicefulltext - Terms (Only available, if you use the persistent modelnumDocs - Maximum number of annotations
ModelException
public java.lang.String getAnnotations(java.lang.String rdqlWhereClause)
throws ModelException
WHERE clause!
(Query variable is ?x)
getAnnotations in interface BackendAnnotationServicerdqlWhereClause - RDQL query (Only WHERE clause!)
ModelException - if a model error occurs
public void modifyAnnotations(java.lang.String userUri,
java.lang.String owlAnnotation)
throws ModelException,
NoPermissionException
modifyAnnotations in interface BackendAnnotationServiceuserUri - URI of the user, who wants to modify the annotationowlAnnotation - OWL serialization with modified annotations
ModelException - if a model error occurs
NoPermissionException - if user is not the creator of the annotaion
or the annotation is not a leaf
public void removeAnnotation(java.lang.String userUri,
java.lang.String annotationUri)
throws ModelException,
ResourceNotFoundException,
NoPermissionException
removeAnnotation in interface BackendAnnotationServiceuserUri - URI of the userannotationUri - URI of the annotation to be removed
NoPermissionException - if the user has no permission to
remove a annotation
ResourceNotFoundException - if a resource does not exist
ModelException - if a model error occurs
protected void addSubClasses(JenaModel resModel,
java.lang.String subclass,
java.lang.String userName)
throws ModelException,
ResourceNotFoundException,
java.net.URISyntaxException
subclass to the specified model.
(Only subclasses of the user and public subclasses)
resModel - Model to be modifiedsubclass - SubclassuserName - Username (no URI!)
ModelException - if a model error occurs
ResourceNotFoundException - if a resource does not exist
java.net.URISyntaxException - if user name is not valid (as a part of an URI)
public java.lang.String getAnnotationOntology(java.lang.String userName)
throws ModelException,
ResourceNotFoundException,
java.net.URISyntaxException
getAnnotationOntology in interface BackendAnnotationServiceuserName - User name (no URI!)
ModelException - if a model error occurs
ResourceNotFoundException - if a resource does not exist
java.net.URISyntaxException - if userUri is not valid
public void addAnnotationType(java.lang.String userName,
java.lang.String parentName,
java.lang.String annotypeName)
throws ModelException,
ResourceNotFoundException,
java.net.URISyntaxException
parentUri and
will be linked with the user (userUri).
addAnnotationType in interface BackendAnnotationServiceuserName - Name of the userparentName - Name of the super classannotypeName - Name of new annotation type (only the name, no URI!)
java.net.URISyntaxException - if userUri is not valid
ModelException - if a model error occurs
ResourceNotFoundException - if a resource does not existprotected de.unidu.is.retrieval.pire.PIRE getPire()
protected de.unidu.is.retrieval.pire.PIRE createPire()
public void indexAllAnnotations()
throws ModelException
ModelException - if a model error occurs
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||