|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.tools.symbology.milStd2525.CodePosition com.bbn.openmap.tools.symbology.milStd2525.CodeScheme
public class CodeScheme
The CodeScheme represents the options presented in the first character of the 15 character symbol code. This character represents the scheme, or symbology set, of the top-most branches of the MIL-STD-2525B symbol tree. The layout and meaning of the 15 characters depend on the scheme, and the CodeScheme can figure out some of them when it parses the position properties to see what other CodePositions are fundamental for a particular instance of a CodeScheme. There are other CodePositions that present choices for a particular scheme type, and the CodeScheme needs to be told what those options are. The CodePositionTree handles setting up the CodeScheme with its optional CodePositions.
Field Summary | |
---|---|
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. |
Fields inherited from class com.bbn.openmap.tools.symbology.milStd2525.CodePosition |
---|
choices, DEBUG, endIndex, hierarchyNumber, id, NameProperty, nextPosition, NextProperty, NO_CHAR, NO_NUMBER, prettyName, startIndex, symbolPart |
Constructor Summary | |
---|---|
CodeScheme()
|
Method Summary | |
---|---|
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. |
Methods inherited from class com.bbn.openmap.tools.symbology.milStd2525.CodePosition |
---|
addPositionChoice, codeMatches, getEndIndex, getFromChoices, getHierarchyNumber, getHierarchyNumberString, getID, getNextPosition, getNULLCodePosition, getPositionChoices, getPrettyName, getStartIndex, getSymbolPart, parsePositions, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public CodeScheme()
Method Detail |
---|
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |