de.unidu.is.annotation.rework.ontology.classes
Class AnnotationOwlConverter

java.lang.Object
  extended byde.unidu.is.annotation.rework.ontology.classes.AnnotationOwlConverter

public class AnnotationOwlConverter
extends java.lang.Object

AnnotationOwlConverter.java Converts service objects like Annotation into OWL serializations and OWL serializations into service objects.

Author:
Marc Lechtenfeld

Constructor Summary
AnnotationOwlConverter()
           
 
Method Summary
protected static void addAnnotationSerialization(JenaModel resModel, Annotation annotation)
          Adds the OWL serialization of the specified annotation to the specified JenaModel
protected static void addMVSelectionSerialization(JenaModel resModel, AnnotationIndividual annotationIndividual, MVSelection selection)
          Adds the specified MVSelection to the specified JenaModel and the specified annotation
protected static AnnotableObject createAnnotableObject(java.util.List ontologyClass, java.lang.String id)
          Creates an instance of the specified class
protected static Annotation getAnnotation(JenaModel owlModel, java.lang.String annotationUri)
          Returns the specified annotation
static java.util.List getAnnotations(java.lang.String owlAnnotations)
          Returns all annotations, which are serialized in the specified OWL serialization.
protected static java.lang.String getLocalName(java.lang.String uri)
          Returns the local name of the specified URI
protected static MVSelection getMVSelection(JenaModel owlModel, java.lang.String selectionUri)
          Returns the specified MVSelection
protected static java.lang.String getOntologyClassName(AnnotableObject annotableObject)
          Returns the name of the ontology class
static java.lang.String getOwlSerialization(Annotation annotation)
          Returns the OWL serialization of the specified annotation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationOwlConverter

public AnnotationOwlConverter()
Method Detail

getOwlSerialization

public static java.lang.String getOwlSerialization(Annotation annotation)
                                            throws ModelException
Returns the OWL serialization of the specified annotation

Parameters:
annotation - Annotation
Returns:
OWL serialization of the annotation
Throws:
ModelException

addAnnotationSerialization

protected static void addAnnotationSerialization(JenaModel resModel,
                                                 Annotation annotation)
                                          throws ModelException
Adds the OWL serialization of the specified annotation to the specified JenaModel

Parameters:
resModel - JenaModel
annotation - Annotation
Throws:
ModelException

addMVSelectionSerialization

protected static void addMVSelectionSerialization(JenaModel resModel,
                                                  AnnotationIndividual annotationIndividual,
                                                  MVSelection selection)
                                           throws ModelException
Adds the specified MVSelection to the specified JenaModel and the specified annotation

Parameters:
resModel - JenaModel
annotationIndividual - Annotation
selection - MVSelection
Throws:
ModelException

getOntologyClassName

protected static java.lang.String getOntologyClassName(AnnotableObject annotableObject)
Returns the name of the ontology class

Parameters:
annotableObject - Annotable object
Returns:
Class name

getAnnotations

public static java.util.List getAnnotations(java.lang.String owlAnnotations)
                                     throws ModelException
Returns all annotations, which are serialized in the specified OWL serialization.

Parameters:
owlAnnotations - OWL serialization
Throws:
ModelException

getAnnotation

protected static Annotation getAnnotation(JenaModel owlModel,
                                          java.lang.String annotationUri)
                                   throws ModelException
Returns the specified annotation

Parameters:
owlModel - JenaModel
annotationUri - URI of the annotation
Returns:
Annotation
Throws:
ModelException

getMVSelection

protected static MVSelection getMVSelection(JenaModel owlModel,
                                            java.lang.String selectionUri)
                                     throws ModelException
Returns the specified MVSelection

Parameters:
owlModel - JenaModel
selectionUri - URI of the MVSelection object
Returns:
MVSelection instance
Throws:
ModelException

createAnnotableObject

protected static AnnotableObject createAnnotableObject(java.util.List ontologyClass,
                                                       java.lang.String id)
Creates an instance of the specified class

Parameters:
ontologyClass - Ontology class name
id - Id

getLocalName

protected static java.lang.String getLocalName(java.lang.String uri)
Returns the local name of the specified URI

Parameters:
uri - URI
Returns:
local name of the URI