wt.occurrence
Class OccurrenceHelper

java.lang.Object
  extended bywt.occurrence.OccurrenceHelper
All Implemented Interfaces:
Externalizable, Serializable

public class OccurrenceHelper
extends Object
implements Externalizable

This helper is used to access an implementation of OccurrenceService via the static reference OccurrenceHelper.service.

Supported API: true

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
           
static OccurrenceService service
          

Supported API: true
 
Constructor Summary
OccurrenceHelper()
           
 
Method Summary
private static OccurrenceableLinkTerminationDelegate getOccurrenceableLinkTerminationDelegate(OccurrenceableLink occurrenceableLink)
           
static boolean hasTerminalParentPathOccurrence(CombinedPathOccurrence combinedPathOccurrence)
          Tests to see if the given CombinedPathOccurrence has a terminal parent PathOccurrence (one which allows no superPaths).
static boolean isRoot(PathOccurrence pathOccurrence)
          Tests to see if the given PathOccurrence is a root (meaning that it allows no subPath).
static boolean isTerminal(PathOccurrence pathOccurrence)
          Tests to see if the given PathOccurrence is terminal (meaning that it allows no superPaths).
 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(OccurrenceHelper thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
static boolean requiresRootPathOccurrence(OccurrenceableLink occurrenceableLink)
          Tests to see if the given Occurrenceable requires a root PathOccurrence (one which allows no subPath).
static boolean requiresRootPathOccurrence(UsesOccurrence usesOccurrence)
          Tests to see if the given UsesOccurrence requires a root PathOccurrence (one which allows no subPath).
static boolean requiresTerminalPathOccurrence(OccurrenceableLink occurrenceableLink)
          Tests to see if the given OccurrenceableLink requires a terminal PathOccurrence (one which allows no superPaths).
static boolean requiresTerminalPathOccurrence(UsesOccurrence usesOccurrence)
          Tests to see if the given UsesOccurrence requires a terminal PathOccurrence (one which allows no superPaths).
 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

service

public static final OccurrenceService service


Supported API: true


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

OccurrenceHelper

public OccurrenceHelper()
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(OccurrenceHelper 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

isRoot

public static boolean isRoot(PathOccurrence pathOccurrence)
                      throws WTException
Tests to see if the given PathOccurrence is a root (meaning that it allows no subPath).

Supported API: true

Parameters:
pathOccurrence -
Returns:
boolean
Throws:
WTException

isTerminal

public static boolean isTerminal(PathOccurrence pathOccurrence)
                          throws WTException
Tests to see if the given PathOccurrence is terminal (meaning that it allows no superPaths).

Supported API: true

Parameters:
pathOccurrence -
Returns:
boolean
Throws:
WTException

requiresRootPathOccurrence

public static boolean requiresRootPathOccurrence(OccurrenceableLink occurrenceableLink)
                                          throws WTException
Tests to see if the given Occurrenceable requires a root PathOccurrence (one which allows no subPath).

Supported API: true

Parameters:
occurrenceableLink -
Returns:
boolean
Throws:
WTException

requiresRootPathOccurrence

public static boolean requiresRootPathOccurrence(UsesOccurrence usesOccurrence)
                                          throws WTException
Tests to see if the given UsesOccurrence requires a root PathOccurrence (one which allows no subPath).

Supported API: true

Parameters:
usesOccurrence -
Returns:
boolean
Throws:
WTException

requiresTerminalPathOccurrence

public static boolean requiresTerminalPathOccurrence(OccurrenceableLink occurrenceableLink)
                                              throws WTException
Tests to see if the given OccurrenceableLink requires a terminal PathOccurrence (one which allows no superPaths).

Supported API: true

Parameters:
occurrenceableLink -
Returns:
boolean
Throws:
WTException

requiresTerminalPathOccurrence

public static boolean requiresTerminalPathOccurrence(UsesOccurrence usesOccurrence)
                                              throws WTException
Tests to see if the given UsesOccurrence requires a terminal PathOccurrence (one which allows no superPaths).

Supported API: true

Parameters:
usesOccurrence -
Returns:
boolean
Throws:
WTException

hasTerminalParentPathOccurrence

public static boolean hasTerminalParentPathOccurrence(CombinedPathOccurrence combinedPathOccurrence)
                                               throws WTException
Tests to see if the given CombinedPathOccurrence has a terminal parent PathOccurrence (one which allows no superPaths).

Supported API: true

Parameters:
combinedPathOccurrence -
Returns:
boolean
Throws:
WTException

getOccurrenceableLinkTerminationDelegate

private static OccurrenceableLinkTerminationDelegate getOccurrenceableLinkTerminationDelegate(OccurrenceableLink occurrenceableLink)
                                                                                       throws WTException
Throws:
WTException