com.facetmap.simple
Class RefCodec.IdList

java.lang.Object
  extended by com.facetmap.simple.RefCodec.IdList
All Implemented Interfaces:
RefCodec
Enclosing interface:
RefCodec

public static class RefCodec.IdList
extends java.lang.Object
implements RefCodec

RefCodec that stores Heading IDs as serial human-readable values in the ref string. Easy to use and debug, but can generate some potentially long ref strings.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.facetmap.simple.RefCodec
RefCodec.IdList
 
Field Summary
static java.lang.String FACET_DELIM
           
protected  Facetmap facetmap
           
static java.lang.String HEADING_DELIM
           
static java.lang.String TYPE_DELIM
           
 
Constructor Summary
RefCodec.IdList(Facetmap facetmap)
           
 
Method Summary
 Heading decodeHeading(Facet facet, java.lang.String headingRef)
           
 Heading[] decodeRef(java.lang.String refCode)
          Returns Headings that correspond to a given selection reference string.
 java.lang.String encodeHeading(Heading heading)
           
 java.lang.String encodeRef(Heading[] headings)
          Presently requires headings to be in facet order; multiple headings in a facet are okay, but must be consecutive in the input array.
 Facetmap getFacetmap()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FACET_DELIM

public static final java.lang.String FACET_DELIM
See Also:
Constant Field Values

HEADING_DELIM

public static final java.lang.String HEADING_DELIM
See Also:
Constant Field Values

TYPE_DELIM

public static final java.lang.String TYPE_DELIM
See Also:
Constant Field Values

facetmap

protected Facetmap facetmap
Constructor Detail

RefCodec.IdList

public RefCodec.IdList(Facetmap facetmap)
Method Detail

getFacetmap

public Facetmap getFacetmap()

decodeRef

public Heading[] decodeRef(java.lang.String refCode)
                    throws UnknownReferenceException
Description copied from interface: RefCodec
Returns Headings that correspond to a given selection reference string.

Specified by:
decodeRef in interface RefCodec
Throws:
UnknownReferenceException

encodeRef

public java.lang.String encodeRef(Heading[] headings)
Presently requires headings to be in facet order; multiple headings in a facet are okay, but must be consecutive in the input array.

Specified by:
encodeRef in interface RefCodec

encodeHeading

public java.lang.String encodeHeading(Heading heading)

decodeHeading

public Heading decodeHeading(Facet facet,
                             java.lang.String headingRef)
                      throws UnknownReferenceException
Throws:
UnknownReferenceException