org.mmbase.remote
Class StringTagger

java.lang.Object
  |
  +--org.mmbase.remote.StringTagger

public class StringTagger
extends java.lang.Object

StringTagger, Creates a object with tags and fields from a String its ideal for name value pairs and name value pairs with multi values. It also provides support for quoted values.


Constructor Summary
StringTagger(java.lang.String line)
          creates a default tagger, with ' ','=',',','"' as inputs.
StringTagger(java.lang.String line, char TagStart, char TagSeperator, char FieldSeperator, char QuoteChar)
          Creates a StringTag for the given line.
 
Method Summary
 boolean containsKey(java.lang.Object ob)
           
 java.util.Enumeration elements()
          returns a Enumeration of the values without multisplit
 java.lang.Object get(java.lang.Object ob)
           
 java.util.Enumeration keys()
          returns a Enumeration of the name keys
 java.util.Enumeration multiElements(java.lang.String token)
          returns a Enumeration of the values as Vectors that contain the seperated values
 void setValue(java.lang.String token, java.lang.String val)
          returns the value (first) as string
 java.lang.String toString()
          toString
 java.lang.String Value(java.lang.String token)
          returns the value (first) as string
 java.util.Vector Values(java.lang.String token)
          returns the values as Vectors that contain the seperated values
 java.lang.String ValuesString(java.lang.String token)
          returns the values as String that contain the orig.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringTagger

public StringTagger(java.lang.String line,
                    char TagStart,
                    char TagSeperator,
                    char FieldSeperator,
                    char QuoteChar)
Creates a StringTag for the given line.
Parameters:
line - : to be tagged line
TagStart - : Seperator for the Tags
TagSeperator - : Seperator inside the Tag (between name and value)
FieldSeperator - : Seperator inside the value
QuoteChar - : Char used if a quoted value Example : StringTagger("cmd=lookup names='Daniel Ockeloen, Rico Jansen'",' ','=',','\'')

StringTagger

public StringTagger(java.lang.String line)
creates a default tagger, with ' ','=',',','"' as inputs.
Method Detail

keys

public java.util.Enumeration keys()
returns a Enumeration of the name keys

toString

public java.lang.String toString()
toString
Overrides:
toString in class java.lang.Object

elements

public java.util.Enumeration elements()
returns a Enumeration of the values without multisplit

multiElements

public java.util.Enumeration multiElements(java.lang.String token)
returns a Enumeration of the values as Vectors that contain the seperated values

containsKey

public boolean containsKey(java.lang.Object ob)

get

public java.lang.Object get(java.lang.Object ob)

Values

public java.util.Vector Values(java.lang.String token)
returns the values as Vectors that contain the seperated values

ValuesString

public java.lang.String ValuesString(java.lang.String token)
returns the values as String that contain the orig. String

Value

public java.lang.String Value(java.lang.String token)
returns the value (first) as string

setValue

public void setValue(java.lang.String token,
                     java.lang.String val)
returns the value (first) as string


MMBase 2001