| java.lang.Object org.griphyn.vdl.util.SequenceMapping
SequenceMapping | public class SequenceMapping (Code) | | This class maps back and forth between a short identifier, and
some unique, abstract identifier that is generated by a sequence.
Instantiated with the default constructor, the generated
identifiers will satisfy NMTOKEN.
author: Jens-S. Vöckler author: Yong Zhao version: $Revision: 50 $ |
Constructor Summary | |
public | SequenceMapping() C'tor: This will generate an instance that generated IDxxxxx
symbols. | public | SequenceMapping(String prefix) C'tor: Instances from this contructor will generate ${prefix}xxxxx.
Please note that multiple instances of this class with the same
prefix will produce the same sequences!
Parameters: prefix - is a prefix to the generated sequence. |
Method Summary | |
public String | forward(String id) Creates and caches a unique id for a given short identifier.
Parameters: id - is the external identifier which needs to be forward mapped. | public String | get(String shortid) Obtains existing mapping without producing a new one. |
SequenceMapping | public SequenceMapping()(Code) | | C'tor: This will generate an instance that generated IDxxxxx
symbols. Please note that multiple instances of this class will
produce the same sequences!
|
SequenceMapping | public SequenceMapping(String prefix)(Code) | | C'tor: Instances from this contructor will generate ${prefix}xxxxx.
Please note that multiple instances of this class with the same
prefix will produce the same sequences!
Parameters: prefix - is a prefix to the generated sequence. |
forward | public String forward(String id)(Code) | | Creates and caches a unique id for a given short identifier.
Parameters: id - is the external identifier which needs to be forward mapped. a sequence-generated identifier to use instead. |
get | public String get(String shortid)(Code) | | Obtains existing mapping without producing a new one. May return
null if no mapping exists.
Parameters: shortid - is the external identifier to check fwd mapping for null, if no such mapping exists. |
|
|