com.sapportals.portal.prt.service.soap.types
Class Token

java.lang.Object
  |
  +--com.sapportals.portal.prt.service.soap.types.Token

public class Token
extends java.lang.Object

Description : Class that represents a string that does not contain line feeds, tabs, leading or trailing spaces, or multiple spaces. For further information, please see: http://www.w3.org/TR/2001/WD-xquery-operators-20010827/ Project : soap FileName : Token.java Copyright : SAP Copyright (c) Company : SAP GBU IP

Version:
2 juil. 03

Constructor Summary
Token()
          Creates a new Token object.
Token(java.lang.String content)
          Creates a new Token object.
Token(java.lang.String content, boolean bool)
          Creates a new Token object.
 
Method Summary
 java.lang.String getContent()
           
 java.lang.String getContentTokenized()
           
static void main(java.lang.String[] args)
           
 void setContent(java.lang.String string)
           
 void setContentTokenized(java.lang.String string)
           
 java.lang.String tokenize(java.lang.String s)
          tokenizes the string s: eliminates the leading and trailing spaces and replaces the internal sequence of two or more white space by a single one
static boolean validateTokenRepresentation(java.lang.String s)
          validates the lexical representation of s : illegal characters are "line feed", "tab", leading or trailing spaces, internal sequence of two or more spaces.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Token

public Token()
Creates a new Token object.

Token

public Token(java.lang.String content)
Creates a new Token object.
Parameters:
content - the string data to be normalized

Token

public Token(java.lang.String content,
             boolean bool)
Creates a new Token object.
Parameters:
content - the string data to be normalized
bool - a validation parameter: if bool is true, checks the lexical representation of content (illegal characters as Line feed,Tab, leading or trailing spaces, internal sequences of two or more spaces are not allowed) if bool is false and if the lexical representation has mistakes, illegal characters will be skipped
Method Detail

validateTokenRepresentation

public static boolean validateTokenRepresentation(java.lang.String s)
                                           throws java.lang.IllegalArgumentException
validates the lexical representation of s : illegal characters are "line feed", "tab", leading or trailing spaces, internal sequence of two or more spaces.
Parameters:
s -  
Throws:
java.lang.IllegalArgumentException - if an illegal character is detected

tokenize

public java.lang.String tokenize(java.lang.String s)
tokenizes the string s: eliminates the leading and trailing spaces and replaces the internal sequence of two or more white space by a single one
Parameters:
s -  
Returns:
the tokenized string

main

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

getContent

public java.lang.String getContent()
Returns:
 

getContentTokenized

public java.lang.String getContentTokenized()
Returns:
 

setContent

public void setContent(java.lang.String string)
Parameters:
string -  

setContentTokenized

public void setContentTokenized(java.lang.String string)
Parameters:
string -