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

Class Token

java.lang.Object
  extended bycom.sapportals.portal.prt.service.soap.types.Token

public class Token
extends 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


Constructor Summary
Token()
          Creates a new Token object.
Token(String content)
          Creates a new Token object.
Token(String content, boolean bool)
          Creates a new Token object.
 
Method Summary
 String getContent()
           
 String getContentTokenized()
           
static void main(String[] args)
           
 void setContent(String string)
           
 void setContentTokenized(String string)
           
 String tokenize(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(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(String content)
Creates a new Token object.

Parameters:
content - the string data to be normalized

Token

public Token(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(String s)
                                           throws 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:
IllegalArgumentException - if an illegal character is detected

tokenize

public String tokenize(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(String[] args)

getContent

public String getContent()
Returns:

getContentTokenized

public String getContentTokenized()
Returns:

setContent

public void setContent(String string)
Parameters:
string -

setContentTokenized

public void setContentTokenized(String string)
Parameters:
string -


Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.