xbn.template
Class OGConfig

java.lang.Object
  |
  +--xbn.XBNObject
        |
        +--xbn.template.OGConfig
All Implemented Interfaces:
TFilter
Direct Known Subclasses:
OGCOne, OGCThree, OGCTwo

public class OGConfig
extends XBNObject
implements TFilter

The configuration for a TemplateOrderedGaps. See TemplateOrderedGaps.

Source code:  OGConfig.java.

Specifically, this is used as a TFilter, to enforce which gap names exist in a Template.


Fields inherited from class xbn.XBNObject
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP
 
Constructor Summary
OGConfig(String[] as_uniqueGapNames)
          Create a TemplateOrderedGaps.
OGConfig(String[] as_uniqueGapNames, boolean b_dupGapsAllowed)
          Create a TemplateOrderedGaps.
OGConfig(String[] as_uniqueGapNames, int i_rqdUnqGapCount)
          Create a TemplateOrderedGaps.
OGConfig(String[] as_uniqueGapNames, int i_rqdUnqGapCount, boolean b_dupGapsAllowed)
          Create a TemplateOrderedGaps.
 
Method Summary
 boolean areDupGapsAllowed()
          Are duplicate gaps allowed?
 AOSLHashtable getAOSLHashtable()
           
 AOSLookup getAOSLookup()
          Get the AOSLookup for direct manipulation.
 APString getAPString()
           
 int getArrIdx(String s_tr)
          Get the array index at which the provided string exists.
 int getLength()
          How many strings exist in the string array?
 String getString(int i_dx)
          Get the string existing at the requested array index.
 boolean isTemplateValid(Template t_emplate)
          Is the provided Template legal?
 String toString()
          Get some information about this OGConfig.
 
Methods inherited from class xbn.XBNObject
getXMsgPrefix, sop, sopl, sopl, throwAX, throwAXIfBadStr, throwAXIfNull, throwAXSpoof
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OGConfig

public OGConfig(String[] as_uniqueGapNames)

Create a TemplateOrderedGaps.

Equal to OGConfig(ms_rdrdGaps, -1)


OGConfig

public OGConfig(String[] as_uniqueGapNames,
                int i_rqdUnqGapCount)

Create a TemplateOrderedGaps.

Equal to OGConfig(ms_rdrdGaps, i_rqdUnqGapCount, true)


OGConfig

public OGConfig(String[] as_uniqueGapNames,
                boolean b_dupGapsAllowed)

Create a TemplateOrderedGaps.

Equal to OGConfig(ms_rdrdGaps, -1, b_dupGapsAllowed)


OGConfig

public OGConfig(String[] as_uniqueGapNames,
                int i_rqdUnqGapCount,
                boolean b_dupGapsAllowed)

Create a TemplateOrderedGaps.

Parameters:
as_uniqueGapNames - The list of unique gap names expected to exist in the Template. May not be null.
i_rqdUnqGapCount - The number of gaps expected to be in as_uniqueGapNames. If you don't care how many gaps are in as_uniqueGapNames, set this to -1. Otherwise, this must be greater than zero.
b_dupGapsAllowed - If true, then each unique gap may be duplicated any number of times. If false, then each unique gap must only exist once.
Method Detail

areDupGapsAllowed

public boolean areDupGapsAllowed()

Are duplicate gaps allowed?

Returns:
b_dupGapsAllowed, exactly as provided in the constructor.

getAOSLookup

public final AOSLookup getAOSLookup()

Get the AOSLookup for direct manipulation.


getAOSLHashtable

public final AOSLHashtable getAOSLHashtable()

getAPString

public final APString getAPString()

getString

public String getString(int i_dx)

Get the string existing at the requested array index.

Parameters:
i_dx - The requested array index.

getArrIdx

public int getArrIdx(String s_tr)

Get the array index at which the provided string exists.

Returns:
getAOSLHashtable().getUniqueString(s_tr).getUnqArrIdx()

getLength

public int getLength()

How many strings exist in the string array?


isTemplateValid

public boolean isTemplateValid(Template t_emplate)

Is the provided Template legal?

Specified by:
isTemplateValid in interface TFilter
Parameters:
t_emplate - The Template to analyze. May not be null.
Returns:
true
  • If t_emplate has exactly the same unique gaps as those in this OGConfig (ordering does not matter) and t_emplate.getUSAPAbsolute().getLength() equals t_emplate.getUSAPUnique().getLength().
  • If t_emplate has exactly the same unique gaps as those in this OGConfig and areDupGapsAllowed equals true, and t_emplate.getAbsoluteGapCount does not equal t_emplate.getUniqueGapCount.

false
  • If t_emplate has a different set of unique gaps as exists in this OGConfig.
  • If t_emplate has the exactly the same set of unique gaps, but areDupGapsAllowed is false, and t_emplate.getAbsoluteGapCount does not equal t_emplate.getUniqueGapCount.

toString

public String toString()

Get some information about this OGConfig.

Overrides:
toString in class Object



Copyright 1997-2003, Jeff Epstein, All Rights Reserved. See top of source code files for copyright notice.

 

http://sourceforge.net/projects/xbnjava

 

SourceForge.net Logo