org.sblim.slp
Class ServiceLocationAttribute
java.lang.Object
org.sblim.slp.ServiceLocationAttribute
- Serializable
public class ServiceLocationAttribute
extends java.lang.Object
implements Serializable
Service location attribute
boolean | equals(Object obj)
|
static String | escapeId(String pId) - Returns an escaped version of the id parameter, suitable for inclusion in
a query.
|
static String | escapeValue(Object pValue) - Returns a String containing the escaped value parameter as a string,
suitable for inclusion in a query.
|
String | getId() - Returns the attribute's name.
|
Vector | getValues() - Returns a cloned vector of attribute values, or null if the attribute is
a keyword attribute.
|
int | hashCode()
|
static void | main(String[] args)
|
String | serialize() - Returns the attribute serialized (as comma separated list)
|
String | toString()
|
ServiceLocationAttribute
public ServiceLocationAttribute(String pString)
throws ServiceLocationException
Construct a service location attribute from a String.
pString
- The string to parse
ServiceLocationAttribute
public ServiceLocationAttribute(String pId,
Vector pValues)
Construct a service location attribute. Errors in the id or values vector
result in an IllegalArgumentException.
pId
- The attribute name. The String can consist of any Unicode
character.pValues
- A Vector of one or more attribute values. Vector contents must
be uniform in type and one of Integer, String, Boolean, or
byte[]. If the attribute is a keyword attribute, then the
parameter should be null. String values can consist of any
Unicode character.
equals
public boolean equals(Object obj)
escapeId
public static String escapeId(String pId)
Returns an escaped version of the id parameter, suitable for inclusion in
a query. Any reserved characters as specified in [7] are escaped using
UTF-8 encoding. If any characters in the tag are illegal, throws
IllegalArgumentException.
pId
- The attribute id to escape. ServiceLocationException is thrown
if any characters are illegal for an attribute tag.
escapeValue
public static String escapeValue(Object pValue)
Returns a String containing the escaped value parameter as a string,
suitable for inclusion in a query. If the parameter is a string, any
reserved characters as specified in [7] are escaped using UTF-8 encoding.
If the parameter is a byte array, then the escaped string begins with the
nonUTF-8 sequence `\ff` and the rest of the string consists of the
escaped bytes, which is the encoding for opaques. If the value parameter
is a Boolean or Integer, then the returned string contains the object
converted into a string. If the value is any type other than String,
Integer, Boolean or byte[], an IllegalArgumentException is thrown.
pValue
- The attribute value to be converted into a string and escaped.
getId
public String getId()
Returns the attribute's name.
getValues
public Vector getValues()
Returns a cloned vector of attribute values, or null if the attribute is
a keyword attribute. If the attribute is single-valued, then the vector
contains only one object.
hashCode
public int hashCode()
main
public static void main(String[] args)
serialize
public String serialize()
throws ServiceLocationException
Returns the attribute serialized (as comma separated list)
toString
public String toString()
Copyright © 2005, 2007 IBM Corporation. All Rights Reserved.