org.fcrepo.server.utilities
Class TypeUtility

java.lang.Object
  extended by org.fcrepo.server.utilities.TypeUtility

public abstract class TypeUtility
extends Object

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

Author:
Ross Wayland

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 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 org.fcrepo.server.types.gen.MethodParmDef into an array of org.fcrepo.server.storage.types.MethodParmDef.
static MethodParmDef convertGenMethodParmDefToMethodParmDef(MethodParmDef genMethodParmDef)
           Converts an instance of org.fcrepo.server.storage.types.MethodParmDef into an instance of org.fcrepo.server.types.gen.MethodParmDef.
static MIMETypedStream convertGenMIMETypedStreamToMIMETypedStream(MIMETypedStream genMIMETypedStream)
           Converts an instance of org.fcrepo.server.types.gen.MIMETypedStream into an instance of org.fcrepo.server.storage.types.MIMETypedStream.
static ObjectMethodsDef[] convertGenObjectMethodsDefArrayToObjectMethodsDefArray(ObjectMethodsDef[] genObjectMethodDefs)
           Converts an array of org.fcrepo.server.types.gen.ObjectMethodsDef into an array of org.fcrepo.server.storage.types.ObjectMethodsDef.
static ObjectMethodsDef convertGenObjectMethodsDefToObjectMethodsDef(ObjectMethodsDef genObjectMethodDef)
           Converts an instance of org.fcrepo.server.types.gen.ObjectMethodsDef into an instance of org.fcrepo.server.storage.types.ObjectMethodsDef.
static ObjectProfile convertGenObjectProfileToObjectProfile(ObjectProfile genObjectProfile)
           Converts an instance of org.fcrepo.server.types.gen.ObjectProfile into an instance of org.fcrepo.server.access.ObjectProfile.
static Property[] convertGenPropertyArrayToPropertyArray(Property[] genProperties)
           Converts an array of org.fcrepo.server.types.gen.Property into an array of org.fcrepo.server.storage.types.Property.
static Property convertGenPropertyToProperty(Property genProperty)
           Converts an instance of org.fcrepo.server.types.gen.Property into an instance of org.fcrepo.server.storage.types.Property.
static MethodParmDef[] convertMethodParmDefArrayToGenMethodParmDefArray(MethodParmDef[] methodParmDefs)
           Converts an array of org.fcrepo.server.storage.types.MethodParmDef into an array of org.fcrepo.server.types.gen.MethodParmDef.
static MethodParmDef convertMethodParmDefToGenMethodParmDef(MethodParmDef methodParmDef)
           Converts an instance of org.fcrepo.server.storage.types.MethodParmDef into an instance of org.fcrepo.server.types.gen.MethodParmDef.
static MIMETypedStream convertMIMETypedStreamToGenMIMETypedStream(MIMETypedStream mimeTypedStream)
           Converts an instance of org.fcrepo.server.storage.types.MIMETypedStream into an instance of org.fcrepo.server.types.gen.MIMETypedStream.
static ObjectMethodsDef[] convertObjectMethodsDefArrayToGenObjectMethodsDefArray(ObjectMethodsDef[] objectMethodDefs)
           Converts an array of org.fcrepo.server.storage.types.ObjectMethodsDef into an array of org.fcrepo.server.types.gen.ObjectMethodsDef.
static ObjectMethodsDef convertObjectMethodsDefToGenObjectMethodsDef(ObjectMethodsDef objectMethodDef)
           Converts an instance of org.fcrepo.server.storage.types.ObjectMethodsDef into an instance of org.fcrepo.server.types.gen.ObjectMethodsDef.
static ObjectProfile convertObjectProfileToGenObjectProfile(ObjectProfile objectProfile)
           
static Property[] convertPropertyArrayToGenPropertyArray(Property[] properties)
           Converts an array of org.fcrepo.server.storage.types.Property into an array of org.fcrepo.server.types.gen.Property.
static Property convertPropertyToGenProperty(Property property)
           Converts an instance of org.fcrepo.server.storage.types.Property into an instance of org.fcrepo.server.types.gen.Property.
static RelationshipTuple convertRelsTupleToGenRelsTuple(RelationshipTuple in)
           
static RepositoryInfo convertReposInfoToGenReposInfo(RepositoryInfo repositoryInfo)
           
static ObjectFields[] convertSearchObjectFieldsListToGenObjectFieldsArray(List sfList)
           
static Validation convertValidationToGenValidation(Validation validation)
           
static void main(String[] args)
           
static String[] toStringArray(List<DCField> 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 List convertGenConditionArrayToSearchConditionList(Condition[] genConditions)
                                                          throws InvalidOperatorException,
                                                                 QueryParseException
Throws:
InvalidOperatorException
QueryParseException

convertSearchObjectFieldsListToGenObjectFieldsArray

public static ObjectFields[] convertSearchObjectFieldsListToGenObjectFieldsArray(List sfList)

toStringArray

public static String[] toStringArray(List<DCField> l)

convertMethodParmDefArrayToGenMethodParmDefArray

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

Converts an array of org.fcrepo.server.storage.types.MethodParmDef into an array of org.fcrepo.server.types.gen.MethodParmDef.

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

convertMethodParmDefToGenMethodParmDef

public static MethodParmDef convertMethodParmDefToGenMethodParmDef(MethodParmDef methodParmDef)

Converts an instance of org.fcrepo.server.storage.types.MethodParmDef into an instance of org.fcrepo.server.types.gen.MethodParmDef.

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

convertGenMethodParmDefArrayToMethodParmDefArray

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

Converts an array of org.fcrepo.server.types.gen.MethodParmDef into an array of org.fcrepo.server.storage.types.MethodParmDef.

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

convertGenMethodParmDefToMethodParmDef

public static MethodParmDef convertGenMethodParmDefToMethodParmDef(MethodParmDef genMethodParmDef)

Converts an instance of org.fcrepo.server.storage.types.MethodParmDef into an instance of org.fcrepo.server.types.gen.MethodParmDef.

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

convertMIMETypedStreamToGenMIMETypedStream

public static MIMETypedStream convertMIMETypedStreamToGenMIMETypedStream(MIMETypedStream mimeTypedStream)

Converts an instance of org.fcrepo.server.storage.types.MIMETypedStream into an instance of org.fcrepo.server.types.gen.MIMETypedStream.

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

convertGenMIMETypedStreamToMIMETypedStream

public static MIMETypedStream convertGenMIMETypedStreamToMIMETypedStream(MIMETypedStream genMIMETypedStream)

Converts an instance of org.fcrepo.server.types.gen.MIMETypedStream into an instance of org.fcrepo.server.storage.types.MIMETypedStream.

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

convertGenObjectMethodsDefArrayToObjectMethodsDefArray

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

Converts an array of org.fcrepo.server.types.gen.ObjectMethodsDef into an array of org.fcrepo.server.storage.types.ObjectMethodsDef.

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

convertGenObjectMethodsDefToObjectMethodsDef

public static ObjectMethodsDef convertGenObjectMethodsDefToObjectMethodsDef(ObjectMethodsDef genObjectMethodDef)

Converts an instance of org.fcrepo.server.types.gen.ObjectMethodsDef into an instance of org.fcrepo.server.storage.types.ObjectMethodsDef.

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

convertObjectMethodsDefArrayToGenObjectMethodsDefArray

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

Converts an array of org.fcrepo.server.storage.types.ObjectMethodsDef into an array of org.fcrepo.server.types.gen.ObjectMethodsDef.

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

convertObjectMethodsDefToGenObjectMethodsDef

public static ObjectMethodsDef convertObjectMethodsDefToGenObjectMethodsDef(ObjectMethodsDef objectMethodDef)

Converts an instance of org.fcrepo.server.storage.types.ObjectMethodsDef into an instance of org.fcrepo.server.types.gen.ObjectMethodsDef.

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

convertGenObjectProfileToObjectProfile

public static ObjectProfile convertGenObjectProfileToObjectProfile(ObjectProfile genObjectProfile)

Converts an instance of org.fcrepo.server.types.gen.ObjectProfile into an instance of org.fcrepo.server.access.ObjectProfile.

Parameters:
genObjectProfile - An instance of org.fcrepo.server.types.gen.ObjectProfile.
Returns:
An instance of org.fcrepo.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 org.fcrepo.server.types.gen.Property into an array of org.fcrepo.server.storage.types.Property.

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

convertGenPropertyToProperty

public static Property convertGenPropertyToProperty(Property genProperty)

Converts an instance of org.fcrepo.server.types.gen.Property into an instance of org.fcrepo.server.storage.types.Property.

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

convertPropertyArrayToGenPropertyArray

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

Converts an array of org.fcrepo.server.storage.types.Property into an array of org.fcrepo.server.types.gen.Property.

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

convertPropertyToGenProperty

public static Property convertPropertyToGenProperty(Property property)

Converts an instance of org.fcrepo.server.storage.types.Property into an instance of org.fcrepo.server.types.gen.Property.

Parameters:
property - An instance of org.fcrepo.server.storage.types.Property.
Returns:
An instance of org.fcrepo.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)

convertValidationToGenValidation

public static Validation convertValidationToGenValidation(Validation validation)

convertGenDatastreamDefArrayToDatastreamDefArray

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

main

public static void main(String[] args)


Copyright © 2011 DuraSpace. All Rights Reserved.