gov.nasa.pds.harvest.util
Class Utility

java.lang.Object
  extended by gov.nasa.pds.harvest.util.Utility

public class Utility
extends Object

Utility class.


Constructor Summary
Utility()
           
 
Method Summary
static String getDateTime()
          Get the current date time.
static URL toURL(String s)
          Convert a string to a URL.
static String toWellFormedURI(String s)
          Convert a string to a URI.
static String toXML(gov.nasa.pds.registry.model.Association association)
          Convert the Association into an XML.
static String toXML(gov.nasa.pds.registry.model.ExtrinsicObject extrinsic)
          Convert the ExtrinsicObject into an XML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utility

public Utility()
Method Detail

toURL

public static URL toURL(String s)
                 throws MalformedURLException
Convert a string to a URL.

Parameters:
s - The string to convert
Returns:
A URL of the input string
Throws:
MalformedURLException

toWellFormedURI

public static String toWellFormedURI(String s)
Convert a string to a URI.

Parameters:
s - The string to convert.
Returns:
A well-formed URI.

getDateTime

public static String getDateTime()
Get the current date time.

Returns:
A date time.

toXML

public static String toXML(gov.nasa.pds.registry.model.ExtrinsicObject extrinsic)
                    throws JAXBException
Convert the ExtrinsicObject into an XML.

Parameters:
extrinsic - The ExtrinsicObject.
Returns:
The XML representation of the given ExtrinsicObject.
Throws:
JAXBException - If there was an error marshalling the given object.

toXML

public static String toXML(gov.nasa.pds.registry.model.Association association)
                    throws JAXBException
Convert the Association into an XML.

Parameters:
association - The Association.
Returns:
The XML representation of the given Association.
Throws:
JAXBException - If there was an error marshalling the given association.


Copyright © 2010-2013 Planetary Data System. All Rights Reserved.