gov.nih.nci.cagrid.metadata
Class MetadataUtils

java.lang.Object
  extended by gov.nih.nci.cagrid.metadata.MetadataUtils

public class MetadataUtils
extends java.lang.Object


Constructor Summary
MetadataUtils()
           
 
Method Summary
static DomainModel deserializeDomainModel(java.io.Reader xmlReader)
          Create an instance of the data service metadata from the specified reader.
static ServiceMetadata deserializeServiceMetadata(java.io.Reader xmlReader)
          Create an instance of the service metadata from the specified reader.
static DomainModel getDomainModel(org.apache.axis.message.addressing.EndpointReferenceType serviceEPR)
          Obtain the data service metadata from the specified service.
static ServiceMetadata getServiceMetadata(org.apache.axis.message.addressing.EndpointReferenceType serviceEPR)
          Obtain the service metadata from the specified service.
static void serializeDomainModel(DomainModel domainModel, java.io.Writer writer)
          Write the XML representation of the specified metadata to the specified writer.
static void serializeServiceMetadata(ServiceMetadata metadata, java.io.Writer writer)
          Write the XML representation of the specified metadata to the specified writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetadataUtils

public MetadataUtils()
Method Detail

getServiceMetadata

public static ServiceMetadata getServiceMetadata(org.apache.axis.message.addressing.EndpointReferenceType serviceEPR)
                                          throws InvalidResourcePropertyException,
                                                 RemoteResourcePropertyRetrievalException,
                                                 ResourcePropertyRetrievalException
Obtain the service metadata from the specified service.

Parameters:
serviceEPR -
Returns:
Throws:
InvalidResourcePropertyException
RemoteResourcePropertyRetrievalException
ResourcePropertyRetrievalException

getDomainModel

public static DomainModel getDomainModel(org.apache.axis.message.addressing.EndpointReferenceType serviceEPR)
                                  throws InvalidResourcePropertyException,
                                         RemoteResourcePropertyRetrievalException,
                                         ResourcePropertyRetrievalException
Obtain the data service metadata from the specified service.

Parameters:
serviceEPR -
Returns:
Throws:
InvalidResourcePropertyException
RemoteResourcePropertyRetrievalException
ResourcePropertyRetrievalException

serializeServiceMetadata

public static void serializeServiceMetadata(ServiceMetadata metadata,
                                            java.io.Writer writer)
                                     throws java.lang.Exception
Write the XML representation of the specified metadata to the specified writer. If either are null, an IllegalArgumentException will be thown.

Parameters:
metadata -
writer -
Throws:
java.lang.Exception

deserializeServiceMetadata

public static ServiceMetadata deserializeServiceMetadata(java.io.Reader xmlReader)
                                                  throws java.lang.Exception
Create an instance of the service metadata from the specified reader. The reader must point to a stream that contains an XML representation of the metadata. If the reader is null, an IllegalArgumentException will be thown.

Parameters:
xmlReader -
Returns:
Throws:
java.lang.Exception

serializeDomainModel

public static void serializeDomainModel(DomainModel domainModel,
                                        java.io.Writer writer)
                                 throws java.lang.Exception
Write the XML representation of the specified metadata to the specified writer. If either are null, an IllegalArgumentException will be thown.

Parameters:
domainModel -
writer -
Throws:
java.lang.Exception

deserializeDomainModel

public static DomainModel deserializeDomainModel(java.io.Reader xmlReader)
                                          throws java.lang.Exception
Create an instance of the data service metadata from the specified reader. The reader must point to a stream that contains an XML representation of the metadata. If the reader is null, an IllegalArgumentException will be thown.

Parameters:
xmlReader -
Returns:
Throws:
java.lang.Exception