notio
Class LiteralDesignator

java.lang.Object
  |
  +--notio.Designator
        |
        +--notio.LiteralDesignator

public class LiteralDesignator
extends Designator
implements java.io.Serializable

Class for literal designators. This is used for references to any Java Object or Object sub-class. This allows for Strings, Integers, Images, or any type of data.

See Also:
Serialized Form

Fields inherited from class notio.Designator
DESIGNATOR_DEFINED, DESIGNATOR_LITERAL, DESIGNATOR_MARKER, DESIGNATOR_NAME
 
Constructor Summary
LiteralDesignator()
          Constructs a new LiteralDesignator unassociated with any literal object.
LiteralDesignator(java.lang.Object newLiteral, MarkerSet markerSet)
          Constructs a new LiteralDesignator with the specified Object.
 
Method Summary
 Designator copy(CopyingScheme copyScheme, java.util.Hashtable substitutionTable)
          Performs a copy operation on this designator according to the the specified CopyingScheme.
 int getDesignatorKind()
          Returns a constant indicating which kind of designator this is.
 java.lang.Object getLiteral()
          Returns the literal object referenced by this designator.
 Marker getMarker()
          Returns the marker associated with this literal designator.
 void setLiteral(java.lang.Object newLiteral, MarkerSet markerSet)
          Sets the literal object referenced by this designator.
 
Methods inherited from class notio.Designator
getCaseSensitiveLabels, getEnclosingReferent, matchDesignators, setCaseSensitiveLabels
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LiteralDesignator

public LiteralDesignator()
Constructs a new LiteralDesignator unassociated with any literal object. A literal may be associated using setLiteral().
See Also:
setLiteral(java.lang.Object, notio.MarkerSet)

LiteralDesignator

public LiteralDesignator(java.lang.Object newLiteral,
                         MarkerSet markerSet)
Constructs a new LiteralDesignator with the specified Object.
Parameters:
newLiteral - the literal object.
markerSet - the marker set associated with this designator.
Method Detail

getDesignatorKind

public int getDesignatorKind()
Returns a constant indicating which kind of designator this is. In this case the constant will be: Designator.DESIGNATOR_LITERAL
Overrides:
getDesignatorKind in class Designator
Returns:
a constant indicating the kind of the designator.

setLiteral

public void setLiteral(java.lang.Object newLiteral,
                       MarkerSet markerSet)
Sets the literal object referenced by this designator. If a literal has already been specified, both the literal and the marker will be replaced by the new values. Calling this method will associate this designator with the marker for the literal object or create one if necessary.
Parameters:
newLiteral - the literal object to be referenced by this designator.
markerSet - the marker set associated with this designator.
Returns:
the literal object referenced by this designator.

getLiteral

public java.lang.Object getLiteral()
Returns the literal object referenced by this designator. This should be the same as the result returned by a getIndividual() call to the marker associated with this designator.
Returns:
the literal object referenced by this designator.

getMarker

public Marker getMarker()
Returns the marker associated with this literal designator.
Returns:
the marker associated with this literal designator.

copy

public Designator copy(CopyingScheme copyScheme,
                       java.util.Hashtable substitutionTable)
Performs a copy operation on this designator according to the the specified CopyingScheme. The result may be a new designator or simply a reference to this designator depending on the scheme. If the a new designator instance is created, the literal is not copied.
Overrides:
copy in class Designator
Parameters:
copyScheme - the copying scheme used to control the copy operation.
substitutionTable - a hashtable containing copied objects available due to earlier copy operations.
Returns:
the result of the copy operation.


Copyright 1998-1999 Finnegan Southey