fedora.server.utilities
Class TypeUtility

java.lang.Object
  extended by fedora.server.utilities.TypeUtility

public abstract class TypeUtility
extends java.lang.Object

A utility class for converting back and forth from the internal Fedora type classes in fedora.server.storage.types and the generated type classes produced by the wsdl2java emitter in fedora.server.types.gen.

Version:
$Id: TypeUtility.java 6410 2007-12-14 19:51:22Z cwilper $
Author:
rlw@virginia.edu

Constructor Summary
TypeUtility()
           
 
Method Summary
static DatastreamDef[] convertDatastreamDefArrayToGenDatastreamDefArray(DatastreamDef[] dsDefs)
           
static DatastreamDef convertDatastreamDefToGenDatastreamDef(DatastreamDef in)
           
static Datastream convertDatastreamToGenDatastream(Datastream in)
           
static FieldSearchResult convertFieldSearchResultToGenFieldSearchResult(FieldSearchResult result)
           
static java.util.List convertGenConditionArrayToSearchConditionList(Condition[] genConditions)
           
static DatastreamDef[] convertGenDatastreamDefArrayToDatastreamDefArray(DatastreamDef[] genDatastreamDefs)
           
static DatastreamDef convertGenDatastreamDefToDatastreamDef(DatastreamDef genDatastreamDef)
           
static FieldSearchQuery convertGenFieldSearchQueryToFieldSearchQuery(FieldSearchQuery gen)
           
static MethodParmDef[] convertGenMethodParmDefArrayToMethodParmDefArray(MethodParmDef[] genMethodParmDefs)
          Converts an array of fedora.server.types.gen.MethodParmDef into an array of fedora.server.storage.types.MethodParmDef.
static MethodParmDef convertGenMethodParmDefToMethodParmDef(MethodParmDef genMethodParmDef)
          Converts an instance of fedora.server.storage.types.MethodParmDef into an instance of fedora.server.types.gen.MethodParmDef.
static MIMETypedStream convertGenMIMETypedStreamToMIMETypedStream(MIMETypedStream genMIMETypedStream)
          Converts an instance of fedora.server.types.gen.MIMETypedStream into an instance of fedora.server.storage.types.MIMETypedStream.
static ObjectMethodsDef[] convertGenObjectMethodsDefArrayToObjectMethodsDefArray(ObjectMethodsDef[] genObjectMethodDefs)
          Converts an array of fedora.server.types.gen.ObjectMethodsDef into an array of fedora.server.storage.types.ObjectMethodsDef.
static ObjectMethodsDef convertGenObjectMethodsDefToObjectMethodsDef(ObjectMethodsDef genObjectMethodDef)
          Converts an instance of fedora.server.types.gen.ObjectMethodsDef into an instance of fedora.server.storage.types.ObjectMethodsDef.
static ObjectProfile convertGenObjectProfileToObjectProfile(ObjectProfile genObjectProfile)
          Converts an instance of fedora.server.types.gen.ObjectProfile into an instance of fedora.server.access.ObjectProfile.
static Property[] convertGenPropertyArrayToPropertyArray(Property[] genProperties)
          Converts an array of fedora.server.types.gen.Property into an array of fedora.server.storage.types.Property.
static Property convertGenPropertyToProperty(Property genProperty)
          Converts an instance of fedora.server.types.gen.Property into an instance of fedora.server.storage.types.Property.
static MethodParmDef[] convertMethodParmDefArrayToGenMethodParmDefArray(MethodParmDef[] methodParmDefs)
          Converts an array of fedora.server.storage.types.MethodParmDef into an array of fedora.server.types.gen.MethodParmDef.
static MethodParmDef convertMethodParmDefToGenMethodParmDef(MethodParmDef methodParmDef)
          Converts an instance of fedora.server.storage.types.MethodParmDef into an instance of fedora.server.types.gen.MethodParmDef.
static MIMETypedStream convertMIMETypedStreamToGenMIMETypedStream(MIMETypedStream mimeTypedStream)
          Converts an instance of fedora.server.storage.types.MIMETypedStream into an instance of fedora.server.types.gen.MIMETypedStream.
static ObjectMethodsDef[] convertObjectMethodsDefArrayToGenObjectMethodsDefArray(ObjectMethodsDef[] objectMethodDefs)
          Converts an array of fedora.server.storage.types.ObjectMethodsDef into an array of fedora.server.types.gen.ObjectMethodsDef.
static ObjectMethodsDef convertObjectMethodsDefToGenObjectMethodsDef(ObjectMethodsDef objectMethodDef)
          Converts an instance of fedora.server.storage.types.ObjectMethodsDef into an instance of fedora.server.types.gen.ObjectMethodsDef.
static ObjectProfile convertObjectProfileToGenObjectProfile(ObjectProfile objectProfile)
           
static Property[] convertPropertyArrayToGenPropertyArray(Property[] properties)
          Converts an array of fedora.server.storage.types.Property into an array of fedora.server.types.gen.Property.
static Property convertPropertyToGenProperty(Property property)
          Converts an instance of fedora.server.storage.types.Property into an instance of fedora.server.types.gen.Property.
static RelationshipTuple convertRelsTupleToGenRelsTuple(RelationshipTuple in)
           
static RepositoryInfo convertReposInfoToGenReposInfo(RepositoryInfo repositoryInfo)
           
static ObjectFields[] convertSearchObjectFieldsListToGenObjectFieldsArray(java.util.List sfList)
           
static void main(java.lang.String[] args)
           
static java.lang.String[] toStringArray(java.util.List l)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeUtility

public TypeUtility()
Method Detail

convertDatastreamToGenDatastream

public static Datastream convertDatastreamToGenDatastream(Datastream in)

convertFieldSearchResultToGenFieldSearchResult

public static FieldSearchResult convertFieldSearchResultToGenFieldSearchResult(FieldSearchResult result)

convertGenFieldSearchQueryToFieldSearchQuery

public static FieldSearchQuery convertGenFieldSearchQueryToFieldSearchQuery(FieldSearchQuery gen)
                                                                     throws InvalidOperatorException,
                                                                            QueryParseException
Throws:
InvalidOperatorException
QueryParseException

convertGenConditionArrayToSearchConditionList

public static java.util.List convertGenConditionArrayToSearchConditionList(Condition[] genConditions)
                                                                    throws InvalidOperatorException,
                                                                           QueryParseException
Throws:
InvalidOperatorException
QueryParseException

convertSearchObjectFieldsListToGenObjectFieldsArray

public static ObjectFields[] convertSearchObjectFieldsListToGenObjectFieldsArray(java.util.List sfList)

toStringArray

public static java.lang.String[] toStringArray(java.util.List l)

convertMethodParmDefArrayToGenMethodParmDefArray

public static MethodParmDef[] convertMethodParmDefArrayToGenMethodParmDefArray(MethodParmDef[] methodParmDefs)

Converts an array of fedora.server.storage.types.MethodParmDef into an array of fedora.server.types.gen.MethodParmDef.

Parameters:
methodParmDefs - An array of fedora.server.storage.types.MethodParmDef.
Returns:
An array of fedora.server.types.gen.MethodParmDef.

convertMethodParmDefToGenMethodParmDef

public static MethodParmDef convertMethodParmDefToGenMethodParmDef(MethodParmDef methodParmDef)

Converts an instance of fedora.server.storage.types.MethodParmDef into an instance of fedora.server.types.gen.MethodParmDef.

Parameters:
methodParmDef - An instance of fedora.server.storage.types.MethodParmDef.
Returns:
An instance of fedora.server.types.gen.MethodParmDef.

convertGenMethodParmDefArrayToMethodParmDefArray

public static MethodParmDef[] convertGenMethodParmDefArrayToMethodParmDefArray(MethodParmDef[] genMethodParmDefs)

Converts an array of fedora.server.types.gen.MethodParmDef into an array of fedora.server.storage.types.MethodParmDef.

Parameters:
genMethodParmDefs - An array of fedora.server.types.gen.MethodParmDef.
Returns:
An array of fedora.server.storage.types.MethodParmDef.

convertGenMethodParmDefToMethodParmDef

public static MethodParmDef convertGenMethodParmDefToMethodParmDef(MethodParmDef genMethodParmDef)

Converts an instance of fedora.server.storage.types.MethodParmDef into an instance of fedora.server.types.gen.MethodParmDef.

Parameters:
genMethodParmDef - An instance of fedora.server.storage.types.MethodParmDef.
Returns:
An instance of fedora.server.types.gen.MethodParmDef.

convertMIMETypedStreamToGenMIMETypedStream

public static MIMETypedStream convertMIMETypedStreamToGenMIMETypedStream(MIMETypedStream mimeTypedStream)

Converts an instance of fedora.server.storage.types.MIMETypedStream into an instance of fedora.server.types.gen.MIMETypedStream.

Parameters:
mimeTypedStream - An instance of fedora.server.storage.types.MIMETypedStream.
Returns:
An instance of fedora.server.types.gen.MIMETypedStream.

convertGenMIMETypedStreamToMIMETypedStream

public static MIMETypedStream convertGenMIMETypedStreamToMIMETypedStream(MIMETypedStream genMIMETypedStream)

Converts an instance of fedora.server.types.gen.MIMETypedStream into an instance of fedora.server.storage.types.MIMETypedStream.

Parameters:
genMIMETypedStream - An instance of fedora.server.types.gen.MIMETypedStream.
Returns:
an instance of fedora.server.storage.types.MIMETypedStream.

convertGenObjectMethodsDefArrayToObjectMethodsDefArray

public static ObjectMethodsDef[] convertGenObjectMethodsDefArrayToObjectMethodsDefArray(ObjectMethodsDef[] genObjectMethodDefs)

Converts an array of fedora.server.types.gen.ObjectMethodsDef into an array of fedora.server.storage.types.ObjectMethodsDef.

Parameters:
genObjectMethodDefs - An array of fedora.server.types.gen.ObjectMethodsDef.
Returns:
An array of fedora.server.storage.types.ObjectMethodsDef.

convertGenObjectMethodsDefToObjectMethodsDef

public static ObjectMethodsDef convertGenObjectMethodsDefToObjectMethodsDef(ObjectMethodsDef genObjectMethodDef)

Converts an instance of fedora.server.types.gen.ObjectMethodsDef into an instance of fedora.server.storage.types.ObjectMethodsDef.

Parameters:
genObjectMethodDef - An instance of fedora.server.types.gen.ObjectMethodsDef.
Returns:
An instance of fedora.server.storage.types.ObjectMethodsDef.

convertObjectMethodsDefArrayToGenObjectMethodsDefArray

public static ObjectMethodsDef[] convertObjectMethodsDefArrayToGenObjectMethodsDefArray(ObjectMethodsDef[] objectMethodDefs)

Converts an array of fedora.server.storage.types.ObjectMethodsDef into an array of fedora.server.types.gen.ObjectMethodsDef.

Parameters:
objectMethodDefs - An array of fedora.server.storage.types.ObjectMethodsDef.
Returns:
An array of fedora.server.types.gen.ObjectMethodsDef.

convertObjectMethodsDefToGenObjectMethodsDef

public static ObjectMethodsDef convertObjectMethodsDefToGenObjectMethodsDef(ObjectMethodsDef objectMethodDef)

Converts an instance of fedora.server.storage.types.ObjectMethodsDef into an instance of fedora.server.types.gen.ObjectMethodsDef.

Parameters:
objectMethodDef - An instance of fedora.server.storage.types.ObjectMethodsDef.
Returns:
An instance of fedora.server.types.gen.ObjectMethodsDef.

convertGenObjectProfileToObjectProfile

public static ObjectProfile convertGenObjectProfileToObjectProfile(ObjectProfile genObjectProfile)

Converts an instance of fedora.server.types.gen.ObjectProfile into an instance of fedora.server.access.ObjectProfile.

Parameters:
genObjectProfile - An instance of fedora.server.types.gen.ObjectProfile.
Returns:
An instance of fedora.server.access.ObjectProfile.

convertObjectProfileToGenObjectProfile

public static ObjectProfile convertObjectProfileToGenObjectProfile(ObjectProfile objectProfile)

convertReposInfoToGenReposInfo

public static RepositoryInfo convertReposInfoToGenReposInfo(RepositoryInfo repositoryInfo)

convertGenPropertyArrayToPropertyArray

public static Property[] convertGenPropertyArrayToPropertyArray(Property[] genProperties)

Converts an array of fedora.server.types.gen.Property into an array of fedora.server.storage.types.Property.

Parameters:
genProperties - An array of fedora.server.types.gen.Property.
Returns:
An array of fedora.server.storage.types.Property.

convertGenPropertyToProperty

public static Property convertGenPropertyToProperty(Property genProperty)

Converts an instance of fedora.server.types.gen.Property into an instance of fedora.server.storage.types.Property.

Parameters:
genProperty - An instance of fedora.server.types.gen.Property.
Returns:
An instance of fedora.server.storage.types.Property.

convertPropertyArrayToGenPropertyArray

public static Property[] convertPropertyArrayToGenPropertyArray(Property[] properties)

Converts an array of fedora.server.storage.types.Property into an array of fedora.server.types.gen.Property.

Parameters:
properties - An array of fedora.server.storage.typesProperty.
Returns:
An array of fedora.server.types.gen.Property.

convertPropertyToGenProperty

public static Property convertPropertyToGenProperty(Property property)

Converts an instance of fedora.server.storage.types.Property into an instance of fedora.server.types.gen.Property.

Parameters:
property - An instance of fedora.server.storage.types.Property.
Returns:
An instance of fedora.server.types.gen.Property.

convertRelsTupleToGenRelsTuple

public static RelationshipTuple convertRelsTupleToGenRelsTuple(RelationshipTuple in)

convertDatastreamDefToGenDatastreamDef

public static DatastreamDef convertDatastreamDefToGenDatastreamDef(DatastreamDef in)

convertGenDatastreamDefToDatastreamDef

public static DatastreamDef convertGenDatastreamDefToDatastreamDef(DatastreamDef genDatastreamDef)

convertDatastreamDefArrayToGenDatastreamDefArray

public static DatastreamDef[] convertDatastreamDefArrayToGenDatastreamDefArray(DatastreamDef[] dsDefs)

convertGenDatastreamDefArrayToDatastreamDefArray

public static DatastreamDef[] convertGenDatastreamDefArrayToDatastreamDefArray(DatastreamDef[] genDatastreamDefs)

main

public static void main(java.lang.String[] args)