org.ceryle.xtm
Class XtmMember

java.lang.Object
  extended by org.ceryle.xtm.XtmNode
      extended by org.ceryle.xtm.XtmMember
All Implemented Interfaces:
Iterator, Constants

public class XtmMember
extends XtmNode

Defines a topic association member, such that instances of this class are objects representing members of XTM associations, designed to assist in building in-memory representations via the XtmProcessor class. XtmMembers do not represent of XTM <member> Elements.

Note that the XTM 1.0 Specification allows member to be optional.

Since:
JDK1.3
Version:
$Id: XtmMember.java,v 3.4 2007-06-15 12:10:35 altheim Exp $
Author:
Murray Altheim
See Also:
XtmNode

Field Summary
 
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
 
Fields inherited from interface org.ceryle.util.Constants
Amp, AMP, Apos, APOS, APP_NAME, APP_VERSION_NAME, APP_VERSION_NUMBER, AT, BANG, BAR, BIT_dev, BIT_http, BIT_ignoreCom, BIT_merge, BIT_none, BIT_noPreload, BIT_simple, BIT_ui, BIT_unused1, BIT_unused2, BIT_unused3, BIT_validating, BIT_verbose, BIT_xcatalog, BIT_xlink, BIT_xmlnsAware, BIT_xsd, BROKB, BSlash, BSLASH, CERYLE_CREDITS_FILE, CERYLE_DATA_DIR, CERYLE_HIST_FILE, CERYLE_LICENSE_FILE, CERYLE_PREF_FILE, CERYLE_PROP, CERYLE_PROP_BASE, CERYLE_PROP_FILE, CERYLE_RSRC_DIR, CERYLE_THANKS_FILE, CFLEX, Colon, COLON, Comma, COMMA, CR, CRet, Dash, DASH, DEFAULT_DIRECTORY, DEVELOPER, DOLR, Dot, DOT, EIGHT, Ellip, EOF, EqQuot, EQUAL, Equals, False, FALSE, FileProt, Filesep, FileURL, Five, FIVE, FONTSIZES, Four, FOUR, FSchar, GCOL_PROP, GRAPH_PROP, GRAVE, GT, Hash, HASH, HOME_DIRECTORY, HOME_DIRECTORY_PATH, HOME_DIRECTORY_URL, HTML, HttpProt, HttpURL, INDENT, INDENT_0, INDENT_1, INDENT_10, INDENT_2, INDENT_3, INDENT_4, INDENT_5, INDENT_6, INDENT_7, INDENT_8, INDENT_9, INIT, LCURL, LCurly, LF, LFS, Localhost, LPAR, LParen, LS, LSBrkt, LSBrkt2, LSQB, LT, MT, NBSP, NEL, NINE, NL, NL20x, NLchar, No, Null, NULL, NULL_STATE, NumParams, One, ONE, Pathsep, Percent, PERO, PLUS, Prcnt, PS, QMark, QMARK, Quot, QUOT, RCURL, RCurly, RESOURCE_BUNDLE, RPAR, RParen, RSBrkt, RSBrkt2, RSQB, Semi, SEMI, SEVEN, SIX, Slash, SLASH, SP, SPACE, Stago, Star, STAR, Tab, TAB, Tee, Three, THREE, Tilde, TILDE, TM_PROP, True, TRUE, Two, TWO, Under, UNDER, URI, URL, VBar, WIKI_PROP, XNodePfx, XNodeURL, XtmExt, Yes, Zero, ZERO
 
Constructor Summary
XtmMember()
          Default constructor.
XtmMember(String id)
          XtmMember constructor with a provided ID.
XtmMember(String id, XtmReference roleSpec, XtmReference member)
          XtmMember constructor with provided ID, and XtmReferences for role and member.
XtmMember(XtmReference member)
          XtmMember constructor with XtmReference for member.
XtmMember(XtmReference roleSpec, XtmReference member)
          XtmMember constructor with XtmReferences for role and member.
XtmMember(XtmReference roleSpec, XtmTopic member)
          XtmMember constructor with XtmReference for role and an XtmTopic as member.
 
Method Summary
 void addMember(XtmReference member)
          Adds the XtmReference member to the member topics of this XtmMember.
 String getHash()
          Returns a String that identifies this XtmMember by all of its characteristics.
 Iterator getMembers()
          Returns an Iterator containing the XtmReference objects contained within this XtmMember, null if undefined.
 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.
 XtmReference getRoleSpec()
          Returns the XtmReference object indicating the role specification of this XtmMember, null if undefined.
 void setRoleSpec(XtmReference roleSpec)
          Sets the role specification of this XtmMember to the XtmReference roleSpec.
 
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
 

Constructor Detail

XtmMember

public XtmMember()
          throws XtmException
Default constructor.

Throws:
XtmException

XtmMember

public XtmMember(String id)
          throws XtmException
XtmMember constructor with a provided ID.

Parameters:
id - the ID of the XtmMember.
Throws:
XtmException - if the provided ID is invalid.

XtmMember

public XtmMember(XtmReference member)
          throws XtmException
XtmMember constructor with XtmReference for member. Note that late changes to the XTM 1.0 Specification now allow member to be optional.

Parameters:
member - the XtmReference serving as the association member.
Throws:
XtmException - if the provided ID is invalid.

XtmMember

public XtmMember(XtmReference roleSpec,
                 XtmReference member)
          throws XtmException
XtmMember constructor with XtmReferences for role and member. Note that late changes to the XTM 1.0 Specification now allow member to be optional.

Parameters:
roleSpec - the XtmReference serving as the role specification.
member - the XtmReference serving as the association member.
Throws:
XtmException - if the provided ID is invalid.

XtmMember

public XtmMember(XtmReference roleSpec,
                 XtmTopic member)
          throws XtmException
XtmMember constructor with XtmReference for role and an XtmTopic as member. The ID of the provided XtmTopic will be used to create an XtmReference.

Parameters:
roleSpec - the XtmReference serving as the role specification.
member - the XtmTopic serving as the association member.
Throws:
XtmException - if the provided ID is invalid.

XtmMember

public XtmMember(String id,
                 XtmReference roleSpec,
                 XtmReference member)
          throws XtmException
XtmMember constructor with provided ID, and XtmReferences for role and member.

Parameters:
id - the ID of the XtmMember.
roleSpec - the XtmReference serving as the role specification.
member - the XtmReference serving as the association member.
Throws:
XtmException - if the provided ID is invalid.
Method Detail

getName

public String getName()
Returns a String containing the name of this XTM element type.

Overrides:
getName in class XtmNode

getNodeType

public short getNodeType()
A short integer indicating what type of node this is. The named constants for this value are defined in the org.ceryle.XtmNode class.

Overrides:
getNodeType in class XtmNode

setRoleSpec

public void setRoleSpec(XtmReference roleSpec)
Sets the role specification of this XtmMember to the XtmReference roleSpec.


getRoleSpec

public XtmReference getRoleSpec()
Returns the XtmReference object indicating the role specification of this XtmMember, null if undefined.


addMember

public void addMember(XtmReference member)
               throws XtmException
Adds the XtmReference member to the member topics of this XtmMember.

Throws:
XtmException - if the provided ID is invalid.

getMembers

public Iterator getMembers()
Returns an Iterator containing the XtmReference objects contained within this XtmMember, null if undefined.


getHash

public String getHash()
Returns a String that identifies this XtmMember by all of its characteristics. Two XtmMembers having the same characteristics will have the same hash value.



The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.