org.embl.ebi.escience.scufl
Class AnnotationTemplate

java.lang.Object
  extended by org.embl.ebi.escience.scufl.AnnotationTemplate

public class AnnotationTemplate
extends java.lang.Object

An AnnotationTemplate object represents a single possible RDF statement that may be generated as a side effect of the invocation of a processor task instance. Any processor may have zero or more of these templates associated with it.

Author:
Tom Oinn

Field Summary
static java.lang.String TAVERNA_PROVENANCE_NS
           
 
Constructor Summary
AnnotationTemplate()
          Create a blank annotation template object
AnnotationTemplate(org.jdom.Element templateElement)
          Create an annotation template object from a JDOM Element, the element being the <template> tag.
 
Method Summary
 void addLiteral(java.lang.String text)
          Add a new text literal to the template
 void addPortReference(Port p)
          Add a new port reference to this template
static java.lang.String convert(java.lang.String input)
          Take an input string and return the string with all less than characters replaced with the appropriate XML literal
 java.lang.String getDescription()
          Return a chunk of HTML showing the unknowns in purple
 org.jdom.Element getElement()
          The JDOM Element for this AnnotationTemplate
 java.lang.String getTextAnnotation(java.util.Map inputs, java.util.Map outputs)
          Given two maps of inputName->LSID and outputName->LSID create a concatenated text string from all the elements in this annotation template populated with the LSID values.
static AnnotationTemplate standardTemplate(Port subject, java.lang.String verb, Port object)
          Create a basic 'subject verb object' triple in RDF format
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAVERNA_PROVENANCE_NS

public static final java.lang.String TAVERNA_PROVENANCE_NS
See Also:
Constant Field Values
Constructor Detail

AnnotationTemplate

public AnnotationTemplate()
Create a blank annotation template object


AnnotationTemplate

public AnnotationTemplate(org.jdom.Element templateElement)
Create an annotation template object from a JDOM Element, the element being the <template> tag.

Method Detail

standardTemplate

public static AnnotationTemplate standardTemplate(Port subject,
                                                  java.lang.String verb,
                                                  Port object)
Create a basic 'subject verb object' triple in RDF format


addLiteral

public void addLiteral(java.lang.String text)
Add a new text literal to the template


addPortReference

public void addPortReference(Port p)
Add a new port reference to this template


getTextAnnotation

public java.lang.String getTextAnnotation(java.util.Map inputs,
                                          java.util.Map outputs)
Given two maps of inputName->LSID and outputName->LSID create a concatenated text string from all the elements in this annotation template populated with the LSID values. Return null if any of the values are unknown


getElement

public org.jdom.Element getElement()
The JDOM Element for this AnnotationTemplate


getDescription

public java.lang.String getDescription()
Return a chunk of HTML showing the unknowns in purple


convert

public static java.lang.String convert(java.lang.String input)
Take an input string and return the string with all less than characters replaced with the appropriate XML literal