org.embl.ebi.escience.scufl
Class SemanticMarkup

java.lang.Object
  extended by org.embl.ebi.escience.scufl.SemanticMarkup
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
PortSemanticMarkup

public class SemanticMarkup
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Constructor Summary
SemanticMarkup(java.lang.Object subject)
          Create a new item of semantic markup for the Object specified.
SemanticMarkup(SemanticMarkup other)
           
 
Method Summary
 void addMIMEType(java.lang.String mimeType)
          Add a MIME type
 void clearMIMETypes()
          Clear the array of MIME types
 void configureFromElement(org.jdom.Element theElement)
          Configure this markup object from the supplied XML element.
 org.jdom.Element getConfigurationElement()
          Emit an element that would be used to configure this object in the method above
 org.jdom.Element getConfigurationElement(java.util.List knownMIMETypes)
          Emit an element that would be used to configure this object in the method above, do not emit mime types that occur within the supplied list.
 java.lang.String getDescription()
          Get the free text description
 java.lang.String getDisplayTypeList()
          Get the MIME types as a single string with new lines seperating the types
 java.lang.String getFirstMIMEType()
          Get the first MIME type in the list, or return the empty string if no MIME types have been defined.
 java.util.List getMIMETypeList()
          Get hold of the List used to hold the MIME types, useful for UI components.
 java.lang.String[] getMIMETypes()
          Get an array of strings containing MIME types for the item this markup object applies to.
 java.lang.String getSemanticType()
          Get the string of semantic markup text FIXME - this is currently unstructured free text, which it almost certainly shouldn't be.
 java.lang.Object getSubject()
          Get the Object that is the subject of this markup, if that's not too confusing a way of expressing it...
 void setDescription(java.lang.String theDescription)
          Set the free text description
 void setMIMETypes(java.util.List mimeTypes)
           
 void setSemanticType(java.lang.String newSemanticType)
          Set the semantic markup as a string, not the best way to do things but will have to do for now
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SemanticMarkup

public SemanticMarkup(java.lang.Object subject)
Create a new item of semantic markup for the Object specified. This should be interpreted as 'this markup object applies to the supplied Object'.


SemanticMarkup

public SemanticMarkup(SemanticMarkup other)
Method Detail

getMIMETypeList

public java.util.List getMIMETypeList()
Get hold of the List used to hold the MIME types, useful for UI components. The returned list is owned by this object.


setDescription

public void setDescription(java.lang.String theDescription)
Set the free text description


getDescription

public java.lang.String getDescription()
Get the free text description


getSubject

public java.lang.Object getSubject()
Get the Object that is the subject of this markup, if that's not too confusing a way of expressing it... This cannot be altered once the object is created, I'm not entirely sure this is actually a requirement but I can't think of a good reason to do otherwise.


getMIMETypes

public java.lang.String[] getMIMETypes()
Get an array of strings containing MIME types for the item this markup object applies to. The returned array is owned by the caller.


getFirstMIMEType

public java.lang.String getFirstMIMEType()
Get the first MIME type in the list, or return the empty string if no MIME types have been defined.


getDisplayTypeList

public java.lang.String getDisplayTypeList()
Get the MIME types as a single string with new lines seperating the types


clearMIMETypes

public void clearMIMETypes()
Clear the array of MIME types


addMIMEType

public void addMIMEType(java.lang.String mimeType)
Add a MIME type


setMIMETypes

public void setMIMETypes(java.util.List mimeTypes)

getSemanticType

public java.lang.String getSemanticType()
Get the string of semantic markup text FIXME - this is currently unstructured free text, which it almost certainly shouldn't be.


setSemanticType

public void setSemanticType(java.lang.String newSemanticType)
Set the semantic markup as a string, not the best way to do things but will have to do for now


configureFromElement

public void configureFromElement(org.jdom.Element theElement)
Configure this markup object from the supplied XML element. This is assuming that the element passed in is the 'metadata' element in the XScufl namespace.


getConfigurationElement

public org.jdom.Element getConfigurationElement()
Emit an element that would be used to configure this object in the method above


getConfigurationElement

public org.jdom.Element getConfigurationElement(java.util.List knownMIMETypes)
Emit an element that would be used to configure this object in the method above, do not emit mime types that occur within the supplied list.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object