|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ceryle.xtm.XtmNode
org.ceryle.xtm.XtmBaseName
public class XtmBaseName
Defines a topic base name, such that instances of this class are objects containing the base names of XTM topics, designed to assist in building representations via the XtmProcessor class. XtmBaseName objects are not representations of XTM <baseName> Elements.
Note that display names in XTM can be represented as variants on a specific base name, using a "display" PSI as the parameter of a basename variant. The setting and getting of such display names here allows both an addDisplayName() and setDisplayName() method. The latter eliminates any other display name variants and sets a single display name.
| Field Summary | |
|---|---|
protected String |
baseNameString
The String containing the base name string of this XtmBaseName. |
protected String |
baseNameStringId
The String containing this XtmBaseName's base name string ID. |
static boolean |
caseSensitive
When true, hash-based comparisons of base name values are case sensitive. |
protected XtmScope |
scope
The XtmScope object establishing the scope for this XtmBaseName. |
protected TreeSet |
variants
The TreeSet containing the variants of this XtmBaseName, comprising zero or more XtmVariant objects. |
| Fields inherited from class org.ceryle.xtm.XtmNode |
|---|
ASSOCIATION_NODE, BASENAME_NODE, BASENAMESTRING_NODE, COMMENT_NODE, DOCUMENT_NODE, GrpSep, GRPSEP, id, INSTANCEOF_NODE, MEMBER_NODE, MERGEMAP_NODE, NODE, NonType, NONTYPE, OCCURRENCE_NODE, PARAMETERS_NODE, PROCESSING_INSTRUCTION_NODE, RecSep, RECSEP, REFERENCE_NODE, RESOURCEDATA_NODE, RESOURCEREF_NODE, ROLESPEC_NODE, SCOPE_NODE, SUBJECTIDENTITY_NODE, SUBJECTINDICATORREF_NODE, TOPIC_NODE, TOPICMAP_NODE, TOPICREF_NODE, VARIANT_NODE, VARIANTNAME_NODE |
| Constructor Summary | |
|---|---|
XtmBaseName()
XtmBaseName constructor. |
|
XtmBaseName(String id)
XtmBaseName constructor with String id. |
|
XtmBaseName(String id,
XtmScope scopeRef,
String baseNameString)
XtmBaseName constructor with ID, scope and baseNameString. |
|
XtmBaseName(XtmScope scopeRef,
String baseNameString)
XtmBaseName constructor with scope and baseNameString. |
|
| Method Summary | |
|---|---|
void |
addDisplayName(String name)
Add a display name whose value is name as a variant of this XtmBaseName. |
void |
addSortName(String name)
Add a sort name whose value is name as a variant of this XtmBaseName. |
void |
addVariant(XtmVariant variant)
Add an XtmVariant variant as a variant of this XtmBaseName. |
int |
compareTo(Object o)
Compares the hash of this XtmBaseName with the provided Object (which should be another XtmBaseName) for order. |
String |
getBaseNameString()
Return a String representing the base name string of this XtmBaseName. |
String |
getBaseNameStringId()
Return a String containing the baseNameString ID. |
String |
getHash()
Return a coded String that is a hashed version of this XtmBaseName. |
String |
getName()
Returns a String containing the name of this XTM element type. |
short |
getNodeType()
A short integer indicating what type of node this is. |
XtmScope |
getScope()
Returns the scope of this XtmBaseName, null if not set. |
Iterator |
getVariants()
Returns any XtmVariants of this XtmBaseName, null if none have been defined. |
boolean |
removeVariant(XtmVariant variant)
Remove an XtmVariant variant from this XtmBaseName. |
void |
setBaseNameString(String baseNameString)
Set the value of this XtmBaseName's base name string to the String baseNameString. |
void |
setBaseNameStringId(String id)
Set the value of the baseNameString ID to the String id. |
void |
setDisplayName(String name)
Sets the display name whose value is name as the sole display
variant of this XtmBaseName, removing any other display variants. |
void |
setScope(XtmScope scopeRef)
Set the scope of this XtmBaseName to the XtmScope scopeRef. |
| Methods inherited from class org.ceryle.xtm.XtmNode |
|---|
addPI, getID, getPI, getPIs, hasNext, next, remove, removePI, setID |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean caseSensitive
protected XtmScope scope
protected TreeSet variants
protected String baseNameString
protected String baseNameStringId
| Constructor Detail |
|---|
public XtmBaseName()
throws XtmException
XtmException
public XtmBaseName(String id)
throws XtmException
XtmException
public XtmBaseName(XtmScope scopeRef,
String baseNameString)
throws XtmException
XtmException
public XtmBaseName(String id,
XtmScope scopeRef,
String baseNameString)
throws XtmException
XtmException| Method Detail |
|---|
public String getName()
getName in class XtmNodepublic short getNodeType()
getNodeType in class XtmNodepublic void setBaseNameString(String baseNameString)
baseNameString - The String to be used an the baseNameString value.public String getBaseNameString()
public void setBaseNameStringId(String id)
id - The String to be used an the baseNameString ID value.public String getBaseNameStringId()
public void setScope(XtmScope scopeRef)
throws XtmException
scopeRef.
scopeRef - The XtmScope to be set for this XtmBaseName.
XtmException - if the scope has already been set.public XtmScope getScope()
public void addVariant(XtmVariant variant)
variant as a variant of this XtmBaseName.
variant - The XtmVariant to be added as a variant of this XtmBaseNamepublic boolean removeVariant(XtmVariant variant)
variant from this XtmBaseName. Returns
true if the variant was a member of the set of variants, false otherwise.
variant - the XtmVariant to be removed from this XtmBaseName
public Iterator getVariants()
public void addSortName(String name)
throws XtmException
name as a variant of this XtmBaseName.
This is a convenience method.
name - A String containing a sort name to be added as an XtmVariant to this XtmBaseName.
XtmException
public void addDisplayName(String name)
throws XtmException
name as a variant of this XtmBaseName.
This is a convenience method.
name - A String containing a display name to be added as an XtmVariant to this XtmBaseName.
XtmException
public void setDisplayName(String name)
throws XtmException
name as the sole display
variant of this XtmBaseName, removing any other display variants.
This is a convenience method.
name - the display name as a String
XtmExceptionpublic int compareTo(Object o)
compareTo in interface Comparablepublic String getHash()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||