wt.graph
Class ObjectGraphUtilities

java.lang.Object
  extended bywt.graph.ObjectGraphUtilities
All Implemented Interfaces:
Externalizable, Serializable

public final class ObjectGraphUtilities
extends Object
implements Externalizable



Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
 
Constructor Summary
ObjectGraphUtilities()
           
 
Method Summary
static ObjectGraphEdge copyOf(ObjectGraphEdge edge)
          

Supported API: false
static ObjectGraphNode copyOf(ObjectGraphNode node)
          

Supported API: false
static ObjectGraphEdge getEdge(String id, ObjectGraphEdge[] edgeList)
          

Supported API: false
static ObjectGraphEdge getEdge(String id, Vector edgeList)
          

Supported API: false
static ObjectGraphEdge[] getEdgeArrayFrom(Vector vector)
          Converts the given vector into a new array that is sized from the vector, which is trimmed.
static Vector getEdgeVectorFrom(ObjectGraphEdge[] array)
          Converts the given array into a new vector that is trimmed to the size of the array.
static ObjectGraphTemplate[] getFragArrayFrom(Vector vector)
          Converts the given vector into a new array that is sized from the vector, which is trimmed.
static Vector getFragVectorFrom(ObjectGraphTemplate[] array)
          Converts the given array into a new vector that is trimmed to the size of the array.
static ObjectGraphNode getNode(String id, ObjectGraphNode[] nodeList)
          

Supported API: false
static ObjectGraphNode getNode(String id, Vector nodeList)
          

Supported API: false
static ObjectGraphNode[] getNodeArrayFrom(Vector vector)
          Converts the given vector into a new array that is sized from the vector, which is trimmed.
static Vector getNodeVectorFrom(ObjectGraphNode[] array)
          Converts the given array into a new vector that is trimmed to the size of the array.
static String[] getStringArrayFrom(Vector vector)
          Converts the given vector into a new array that is sized from the vector, which is trimmed.
static String newId()
          

Supported API: false
static Object newInstance(Class type)
          

Supported API: false
static Object newInstance(String typename)
          

Supported API: false
private static Object newObject(Object object)
           
static void print(ObjectGraphEdge[] edgeList)
          

Supported API: false
static void print(ObjectGraphEdge edge, String header)
          

Supported API: false
static void print(ObjectGraphNode[] nodeList)
          

Supported API: false
static void print(ObjectGraphNode node, String header)
          

Supported API: false
static void print(ObjectGraph graph, String header, String trailer)
          

Supported API: false
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(ObjectGraphUtilities thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values
Constructor Detail

ObjectGraphUtilities

public ObjectGraphUtilities()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(ObjectGraphUtilities thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

newId

public static String newId()
                    throws ObjectGraphException


Supported API: false

Returns:
String
Throws:
ObjectGraphException

newInstance

public static Object newInstance(String typename)
                          throws ObjectGraphException


Supported API: false

Parameters:
typename -
Returns:
Object
Throws:
ObjectGraphException

newInstance

public static Object newInstance(Class type)
                          throws ObjectGraphException


Supported API: false

Parameters:
type -
Returns:
Object
Throws:
ObjectGraphException

copyOf

public static ObjectGraphNode copyOf(ObjectGraphNode node)
                              throws ObjectGraphException


Supported API: false

Parameters:
node -
Returns:
ObjectGraphNode
Throws:
ObjectGraphException

copyOf

public static ObjectGraphEdge copyOf(ObjectGraphEdge edge)
                              throws ObjectGraphException


Supported API: false

Parameters:
edge -
Returns:
ObjectGraphEdge
Throws:
ObjectGraphException

getNodeArrayFrom

public static ObjectGraphNode[] getNodeArrayFrom(Vector vector)
Converts the given vector into a new array that is sized from the vector, which is trimmed.

Supported API: false

Parameters:
vector -
Returns:
ObjectGraphNode[]

getNodeVectorFrom

public static Vector getNodeVectorFrom(ObjectGraphNode[] array)
Converts the given array into a new vector that is trimmed to the size of the array.

Supported API: false

Parameters:
array -
Returns:
Vector

getEdgeArrayFrom

public static ObjectGraphEdge[] getEdgeArrayFrom(Vector vector)
Converts the given vector into a new array that is sized from the vector, which is trimmed.

Supported API: false

Parameters:
vector -
Returns:
ObjectGraphEdge[]

getEdgeVectorFrom

public static Vector getEdgeVectorFrom(ObjectGraphEdge[] array)
Converts the given array into a new vector that is trimmed to the size of the array.

Supported API: false

Parameters:
array -
Returns:
Vector

getFragArrayFrom

public static ObjectGraphTemplate[] getFragArrayFrom(Vector vector)
Converts the given vector into a new array that is sized from the vector, which is trimmed.

Supported API: false

Parameters:
vector -
Returns:
ObjectGraphTemplate[]

getFragVectorFrom

public static Vector getFragVectorFrom(ObjectGraphTemplate[] array)
Converts the given array into a new vector that is trimmed to the size of the array.

Supported API: false

Parameters:
array -
Returns:
Vector

getStringArrayFrom

public static String[] getStringArrayFrom(Vector vector)
Converts the given vector into a new array that is sized from the vector, which is trimmed.

Supported API: false

Parameters:
vector -
Returns:
String[]

getNode

public static ObjectGraphNode getNode(String id,
                                      ObjectGraphNode[] nodeList)


Supported API: false

Parameters:
id -
nodeList -
Returns:
ObjectGraphNode

getNode

public static ObjectGraphNode getNode(String id,
                                      Vector nodeList)


Supported API: false

Parameters:
id -
nodeList -
Returns:
ObjectGraphNode

getEdge

public static ObjectGraphEdge getEdge(String id,
                                      ObjectGraphEdge[] edgeList)


Supported API: false

Parameters:
id -
edgeList -
Returns:
ObjectGraphEdge

getEdge

public static ObjectGraphEdge getEdge(String id,
                                      Vector edgeList)


Supported API: false

Parameters:
id -
edgeList -
Returns:
ObjectGraphEdge

print

public static void print(ObjectGraph graph,
                         String header,
                         String trailer)


Supported API: false

Parameters:
graph -
header -
trailer -

print

public static void print(ObjectGraphNode[] nodeList)


Supported API: false

Parameters:
nodeList -

print

public static void print(ObjectGraphEdge[] edgeList)


Supported API: false

Parameters:
edgeList -

print

public static void print(ObjectGraphNode node,
                         String header)


Supported API: false

Parameters:
node -
header -

print

public static void print(ObjectGraphEdge edge,
                         String header)


Supported API: false

Parameters:
edge -
header -

newObject

private static Object newObject(Object object)
                         throws ObjectGraphException
Throws:
ObjectGraphException