[MOBY-guts] biomoby commit

Dmitry Repchevski drepchevski at dev.open-bio.org
Tue Aug 31 16:15:44 UTC 2010


drepchevski
Tue Aug 31 12:15:44 EDT 2010
Update of /home/repository/moby/moby-live/Java/src/main/org/inb/biomoby
In directory dev.open-bio.org:/tmp/cvs-serv28356/biomoby

Modified Files:
	MobyMessageContext.java 
Log Message:

moby-live/Java/src/main/org/inb/biomoby MobyMessageContext.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/inb/biomoby/MobyMessageContext.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/main/org/inb/biomoby/MobyMessageContext.java	2009/09/09 19:47:48	1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/inb/biomoby/MobyMessageContext.java	2010/08/31 16:15:44	1.2
@@ -35,7 +35,13 @@
     private static JAXBIntrospector introspector;
     
     private MobyMessageContext() {}
-    
+
+    /**
+     * Method that returns a cached JAXB context for BioMoby elements
+     *
+     * @return - a JAXB context
+     * @throws JAXBException
+     */
     public static synchronized JAXBContext getContext() throws JAXBException
     {
         if (jc == null)
@@ -46,6 +52,13 @@
         return jc;
     }
 
+    /**
+     * An utility method that returns a BioMoby "name" of a given BioMOby Object.
+     *
+     * @param mobyObject - an object we get a name for (for instance MobyString)
+     * @return - BioMoby name for a given BioMoby object
+     * @throws JAXBException - if the object was not found in a JAXBContext
+     */
     public static synchronized String getMobyName(AbstractMobyObject mobyObject) throws JAXBException
     {
         if (mobyObject instanceof AnyMobyObject)
@@ -69,6 +82,14 @@
         return name.getLocalPart();
     }
 
+    /**
+     * An utility method that encode a JAXB object into an XML string
+     *
+     * @param message - BioMoby element to be encoded
+     * @return - an XML string representation of given BioMOby element
+     *
+     * @throws JAXBException - when privided object is not known to a JAXBContext
+     */
     public static String marshall(Object message) throws JAXBException
     {
         if (message == null)




More information about the MOBY-guts mailing list