public class CodeScheme extends CodePosition
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
defaultSymbolCode
The base 15 character code for a symbol under a scheme.
|
static java.lang.String |
DefaultSymbolCodeProperty
Property keyword for the default symbol code
'defaultSymbolCode'.
|
protected java.lang.String |
hierarchyAddition
For parsing the hierarchy, most schemes have some characters
added to their hierarchy index number.
|
static java.lang.String |
HierarchyCodeAdditionProperty
Property keyword for the hierarchy addition string
'hierarchyCodeAddition'.
|
protected CodeOptions |
options
A set of CodePostitions that can be set with on this scheme.
|
choices, DEBUG, endIndex, hierarchyNumber, id, NameProperty, nextPosition, NextProperty, NO_CHAR, NO_NUMBER, prettyName, startIndex, symbolPart
Constructor and Description |
---|
CodeScheme() |
Modifier and Type | Method and Description |
---|---|
CodePosition |
addPositionChoice(int index,
java.lang.String entry,
java.lang.String prefix,
java.util.Properties props)
The method needs more information from the properties than the
CodePosition version of this method provides, like getting the
base symbol code for the scheme and the hierarchy addition.
|
CodeOptions |
getCodeOptions()
Get the code options set for this scheme.
|
CodeOptions |
getCodeOptions(SymbolPart sp)
Get the code options for the scheme as it relates to the symbol
part.
|
java.lang.StringBuffer |
getDefaultSymbolCode()
Return the default 15 character symbol code for this instance
of a scheme.
|
SymbolPart |
parseHierarchy(java.util.Properties props,
SymbolPart parent)
Parse the hierarchy properties to create SymbolParts for those
parts under a particular scheme represented by this instance of
CodeScheme.
|
void |
parseHierarchy(java.lang.String hCode,
java.util.Properties props,
SymbolPart parent)
Parse the hierarchy properties to create SymbolParts for those
parts under a particular scheme represented by this instance of
CodeScheme.
|
void |
setCodeOptions(CodeOptions co)
Set the code options for this scheme.
|
addPositionChoice, codeMatches, getEndIndex, getFromChoices, getHierarchyNumber, getHierarchyNumberString, getID, getNextPosition, getNULLCodePosition, getPositionChoices, getPrettyName, getStartIndex, getSymbolPart, parsePositions, toString
protected java.lang.String defaultSymbolCode
protected java.lang.String hierarchyAddition
public static final java.lang.String DefaultSymbolCodeProperty
public static final java.lang.String HierarchyCodeAdditionProperty
protected CodeOptions options
public CodePosition addPositionChoice(int index, java.lang.String entry, java.lang.String prefix, java.util.Properties props)
addPositionChoice
in class CodePosition
index
- the hierarchical index for this position choice.
This really only becomes important for those
CodePositions which are used for interpreting the
hierarchy properties. Other positions can use them for
convenience, and this value will probably be just an
ordering number for this choice out of all the other
choices for the position.entry
- this should be character or characters used in the
symbol code for this particular position choice.prefix
- the scoping property prefix used for all the
properties. The entry is discovered by looking in the
properties for this 'prefix.index'. Then other
properties are discovered by looking for
'prefix.entry.propertyKey' properties.props
- the position properties.public SymbolPart parseHierarchy(java.util.Properties props, SymbolPart parent)
props
- the hierarchy properties.parent
- the SymbolPart parent that the new SymbolPart
tree falls under.public void parseHierarchy(java.lang.String hCode, java.util.Properties props, SymbolPart parent)
parseHierarchy
in class CodePosition
hCode
- the hierarchy code of this scheme, used to grow
the tree for subsequent generations.props
- the hierarchy properties.parent
- the SymbolPart parent that the new SymbolPart
tree falls under.public java.lang.StringBuffer getDefaultSymbolCode()
public void setCodeOptions(CodeOptions co)
public CodeOptions getCodeOptions()
public CodeOptions getCodeOptions(SymbolPart sp)
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details