org.gcube.data.gml.elements
Class Conversions

java.lang.Object
  extended by org.gcube.data.gml.elements.Conversions

public class Conversions
extends Object

Author:
Federico De Faveri defaveri@isti.cnr.it

Constructor Summary
Conversions()
           
 
Method Summary
static String calendarToString(Calendar calendar)
          Formats a Calendar into a String.
static GCubeDocument toDocument(Reader r)
          Returns a GCubeDocument from a textual stream.
static GCubeDocument toDocument(org.gcube.data.trees.data.Tree tree)
          Converts the specified Tree into a GCubeDocument.
static org.gcube.data.trees.data.Tree toTree(GCubeDocument document)
          Converts the a GCubeDocument to a Tree.
static String toXML(GCubeDocument d)
          Converts a GCubeDocument into its textual representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Conversions

public Conversions()
Method Detail

toDocument

public static GCubeDocument toDocument(Reader r)
                                throws Exception
Returns a GCubeDocument from a textual stream.

Parameters:
r - the stream.
Returns:
the document.
Throws:
Exception - if the textual representation is not well-formed.

toXML

public static String toXML(GCubeDocument d)
                    throws Exception
Converts a GCubeDocument into its textual representation.

Parameters:
d - the document
Returns:
the textual representation of the document.
Throws:
Exception - if the conversion could not be performed.

toDocument

public static GCubeDocument toDocument(org.gcube.data.trees.data.Tree tree)
                                throws Exception
Converts the specified Tree into a GCubeDocument.

Parameters:
tree - the tree.
Returns:
the document.
Throws:
Exception

toTree

public static org.gcube.data.trees.data.Tree toTree(GCubeDocument document)
                                             throws Exception
Converts the a GCubeDocument to a Tree.

Parameters:
document - the document.
Returns:
the tree.
Throws:
Exception - if an error occurs during the conversion.

calendarToString

public static String calendarToString(Calendar calendar)
Formats a Calendar into a String.

Parameters:
calendar - the calendar.
Returns:
the formatted string.


Copyright © 2012. All Rights Reserved.