com.waveset.object
Class AttrParse

java.lang.Object
  extended bycom.waveset.object.PersistentObject
      extended bycom.waveset.object.AttrParse
All Implemented Interfaces:
java.lang.Comparable, javax.naming.Referenceable, XmlObject
Direct Known Subclasses:
AttrParse

public class AttrParse
extends PersistentObject


Nested Class Summary
protected  class AttrParse.AToken
           
protected  class AttrParse.AttrToken
           
protected  class AttrParse.BasicToken
           
protected  class AttrParse.CollectCsvHeaderToken
           
protected  class AttrParse.CollectCsvLinesToken
           
protected  class AttrParse.DateTimeToken
           
protected  class AttrParse.DateToken
           
protected  class AttrParse.FlagToken
           
protected  class AttrParse.IntToken
           
protected  class AttrParse.LoopToken
          This also is kind of a hack right now.
protected  class AttrParse.MultiLineToken
           
protected  class AttrParse.OptionalToken
          This is kind of a hack right now.
protected  class AttrParse.SkipLinesUntilToken
           
protected  class AttrParse.SkipToken
           
protected  class AttrParse.SkipWhitespaceToken
           
protected  class AttrParse.StringToken
           
protected  class AttrParse.TextToken
           
 
Nested classes inherited from class com.waveset.object.PersistentObject
PersistentObject.Comparator, PersistentObject.InitialInstance
 
Field Summary
static java.lang.String code_id
           
protected static java.lang.String EL_ATTRPARSE
           
protected static java.lang.String EL_COLLECT_CSV_HEADER
           
protected static java.lang.String EL_COLLECT_CSV_LINES
           
protected static java.lang.String EL_DATE
           
protected static java.lang.String EL_DATETIME
           
protected static java.lang.String EL_EOL
           
protected static java.lang.String EL_FLAG
           
protected static java.lang.String EL_INT
           
protected static java.lang.String EL_LOOP
           
protected static java.lang.String EL_MULTILINE
           
protected static java.lang.String EL_OPT
           
protected static java.lang.String EL_SKIP
           
protected static java.lang.String EL_SKIP_LINES_UNTIL
           
protected static java.lang.String EL_SKIP_TO_EOL
           
protected static java.lang.String EL_SKIP_WHITESPACE
           
protected static java.lang.String EL_STR
           
protected static java.lang.String EL_TEXT
           
 
Fields inherited from class com.waveset.object.PersistentObject
_trace, trace
 
Constructor Summary
AttrParse()
           
AttrParse(org.w3c.dom.Element e)
           
AttrParse(java.lang.String xml)
           
 
Method Summary
 void addSubclassElements(java.lang.StringBuffer b)
          Each concrete subclass may append to the buffer an XML representation of any fields it adds to PersistentObject (if those field values must persist).
static void addValue(java.util.Map map, java.lang.String name, java.lang.Object value)
           
static void appendValue(java.util.Map map, java.lang.String name, java.lang.String value, java.lang.String separator)
           
protected  AttrParse.AToken createToken(java.lang.String tag, org.w3c.dom.Element elem)
           
 Type getType()
          Returns the associated Type object.
 boolean isTokenPresent(java.lang.String name)
           
 boolean isTokenPresent(java.lang.String name, Syntax type)
          Checks to see if the named token is present with the specified type - note that only INT, BOOLEAN, and STRING types are currently supported for checking by this method.
static void main(java.lang.String[] args)
           
 void parse(ParseStringCharacterIterator cIter, java.util.Map map)
           
 void parse(ParseStringCharacterIterator cIter, java.util.Map map, boolean optional)
          This is a hack to work with the optional token.
 java.util.Map parse(java.lang.String str)
           
 void parse(java.lang.String str, java.util.Map map)
           
protected  void parseSubclassElements(org.w3c.dom.Element e)
          Each concrete subclass should parse from the XML buffer any persisted subclass-specific elements (generally, the same ones that it writes into the buffer).
 
Methods inherited from class com.waveset.object.PersistentObject
addCommonElements, addEndTag, addMemberObjectGroup, addMemberObjectGroup, addPersistentAttributes, addStartTag, addSubclassAttributes, addSummaryAttributes, addXmlHeader, attributesMatch, attributesMatch, attributesMatch, checkReference, checkReferences, clearId, cloneAs, cloneObject, compareTo, create, create, create, create, createLastModItem, createLastModItem, createLastModItemList, directObjectGroupMember, dump, dumpFile, equals, fakeId, getAttribute, getAttributeValues, getAttributeValues, getAuthReferences, getAuthType, getBasicAttributes, getBasicAttributes, getBasicAttributes, getCache, getCounterValue, getCreateDate, getCreator, getDisplayableName, getDisplayName, getElementName, getEncryptedValues, getId, getIdOrName, getInitialInstances, getLastMod, getLastModDate, getLastModifier, getLastModItemId, getLockInfo, getMemberObjectGroupRefs, getMemberObjectGroupRefsUpTo, getMemberObjectGroups, getName, getNameOrId, getProperties, getProperty, getPropertyAsString, getPropertyList, getQueryableAttributes, getReference, getReferences, getRuleDrivenMemberObjectGroupRefs, getRuleDrivenMemberObjectGroupRefsUpTo, getRuleDrivenMemberObjectGroups, getSubtype, getSummaryAttributes, getSummaryString, hasEncryptedData, hashCode, identityEquals, isAlias, isHidden, isId, isProtected, isProtectedFromDelete, isReferencedIn, listOperationalAttributes, listQueryableAttributes, listQueryableReferenceAttributes, listSummaryAttributes, objectGroupMember, objectGroupMemberRef, parseCommonElement, parseCommonElements, parsePersistentAttributes, parseSubclassAttributes, parseXml, parseXml, prepareForSerialization, prepareToSerialize, println, reEncrypt, reEncryptSubclassAttributes, removeMemberObjectGroup, removeProperty, resolve, resolve, resolve, resolveArray, resolveArrayByFetching, resolveObjectReference, resolveObjectReferences, resolveReference, resolveSummaryAttributes, resolveSummaryAttributes, ruleDrivenObjectGroupMemberRef, setAuthType, setAuthType, setCache, setCreateDate, setCreator, setDisplayName, setDisplayName, setHidden, setIsAlias, setLastMod, setLastMod, setLastModDate, setLastModifier, setMemberObjectGroupRef, setMemberObjectGroupRefs, setMemberObjectGroups, setName, setProperties, setProperty, setPropertyList, setProtected, setProtectedFromDelete, setRuleDrivenMembersCache, setSubtype, setTrace, toString, toXml, toXml, toXml, toXmlFile, visit
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values

EL_ATTRPARSE

protected static final java.lang.String EL_ATTRPARSE
See Also:
Constant Field Values

EL_TEXT

protected static final java.lang.String EL_TEXT
See Also:
Constant Field Values

EL_INT

protected static final java.lang.String EL_INT
See Also:
Constant Field Values

EL_STR

protected static final java.lang.String EL_STR
See Also:
Constant Field Values

EL_DATE

protected static final java.lang.String EL_DATE
See Also:
Constant Field Values

EL_DATETIME

protected static final java.lang.String EL_DATETIME
See Also:
Constant Field Values

EL_EOL

protected static final java.lang.String EL_EOL
See Also:
Constant Field Values

EL_MULTILINE

protected static final java.lang.String EL_MULTILINE
See Also:
Constant Field Values

EL_OPT

protected static final java.lang.String EL_OPT
See Also:
Constant Field Values

EL_SKIP

protected static final java.lang.String EL_SKIP
See Also:
Constant Field Values

EL_SKIP_TO_EOL

protected static final java.lang.String EL_SKIP_TO_EOL
See Also:
Constant Field Values

EL_SKIP_WHITESPACE

protected static final java.lang.String EL_SKIP_WHITESPACE
See Also:
Constant Field Values

EL_FLAG

protected static final java.lang.String EL_FLAG
See Also:
Constant Field Values

EL_SKIP_LINES_UNTIL

protected static final java.lang.String EL_SKIP_LINES_UNTIL
See Also:
Constant Field Values

EL_COLLECT_CSV_HEADER

protected static final java.lang.String EL_COLLECT_CSV_HEADER
See Also:
Constant Field Values

EL_COLLECT_CSV_LINES

protected static final java.lang.String EL_COLLECT_CSV_LINES
See Also:
Constant Field Values

EL_LOOP

protected static final java.lang.String EL_LOOP
See Also:
Constant Field Values
Constructor Detail

AttrParse

public AttrParse()

AttrParse

public AttrParse(java.lang.String xml)
          throws WavesetException

AttrParse

public AttrParse(org.w3c.dom.Element e)
          throws WavesetException
Method Detail

getType

public Type getType()
Returns the associated Type object.

Specified by:
getType in class PersistentObject

parseSubclassElements

protected void parseSubclassElements(org.w3c.dom.Element e)
                              throws WavesetException
Description copied from class: PersistentObject
Each concrete subclass should parse from the XML buffer any persisted subclass-specific elements (generally, the same ones that it writes into the buffer).

Overrides:
parseSubclassElements in class PersistentObject
Throws:
WavesetException
See Also:

PersistentObject's default implementation is a no-op.

, PersistentObject.parseXml(Element)

createToken

protected AttrParse.AToken createToken(java.lang.String tag,
                                       org.w3c.dom.Element elem)
                                throws WavesetException
Throws:
WavesetException

addSubclassElements

public void addSubclassElements(java.lang.StringBuffer b)
Description copied from class: PersistentObject
Each concrete subclass may append to the buffer an XML representation of any fields it adds to PersistentObject (if those field values must persist). PersistentObject's default implementation is a no-op.

NOTE: Any subclass that overrides this method must similarly override parseSubclassElements() so that the subclass elements are restored.

Overrides:
addSubclassElements in class PersistentObject
See Also:


parse

public java.util.Map parse(java.lang.String str)
                    throws WavesetException
Throws:
WavesetException

parse

public void parse(java.lang.String str,
                  java.util.Map map)
           throws WavesetException
Throws:
WavesetException

parse

public void parse(ParseStringCharacterIterator cIter,
                  java.util.Map map)
           throws WavesetException
Throws:
WavesetException

parse

public void parse(ParseStringCharacterIterator cIter,
                  java.util.Map map,
                  boolean optional)
           throws WavesetException
This is a hack to work with the optional token. Needs to be generalized if possible.

Throws:
WavesetException

addValue

public static void addValue(java.util.Map map,
                            java.lang.String name,
                            java.lang.Object value)
                     throws WavesetException
Throws:
WavesetException

appendValue

public static void appendValue(java.util.Map map,
                               java.lang.String name,
                               java.lang.String value,
                               java.lang.String separator)
                        throws WavesetException
Throws:
WavesetException

isTokenPresent

public boolean isTokenPresent(java.lang.String name)

isTokenPresent

public boolean isTokenPresent(java.lang.String name,
                              Syntax type)
Checks to see if the named token is present with the specified type - note that only INT, BOOLEAN, and STRING types are currently supported for checking by this method.

Parameters:
name -
type -
Returns:

main

public static void main(java.lang.String[] args)