|
|||||||||
Home >> All >> com >> sun >> xacml >> [ attr overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
com.sun.xacml.attr
Class StringAttribute

java.lang.Objectcom.sun.xacml.attr.AttributeValue
com.sun.xacml.attr.StringAttribute
- All Implemented Interfaces:
- com.sun.xacml.cond.Evaluatable
- public class StringAttribute
- extends AttributeValue
Representation of an xs:string value. This class supports parsing xs:string values. All objects of this class are immutable and all methods of the class are thread-safe.
Note that there is currently some confusion in the XACML specification about whether this datatype should be able to handle XML elements (ie, whether <AttributeValue DataType="...string"><foo/> </AttributeValue> is valid). Until that is clarified the strict definition of the string datatype is used in this code, which means that elements are not valid.
- Since:
- 1.0
Field Summary | |
private static java.lang.RuntimeException |
earlyException
RuntimeException that wraps an Exception thrown during the creation of identifierURI, null if none. |
static java.lang.String |
identifier
Official name of this type |
private static java.net.URI |
identifierURI
URI version of name for this type |
private java.lang.String |
value
The actual String value that this object represents. |
Fields inherited from class com.sun.xacml.attr.AttributeValue |
|
Constructor Summary | |
StringAttribute(java.lang.String value)
Creates a new StringAttribute that represents
the String value supplied. |
Method Summary | |
java.lang.String |
encode()
Encodes the value in a form suitable for including in XML data like a request or an obligation. |
boolean |
equals(java.lang.Object o)
Returns true if the input is an instance of this class and if its value equals the value contained in this class. |
static StringAttribute |
getInstance(org.w3c.dom.Node root)
Returns a new StringAttribute that represents
the xs:string at a particular DOM node. |
static StringAttribute |
getInstance(java.lang.String value)
Returns a new StringAttribute that represents
the xs:string value indicated by the String provided. |
java.lang.String |
getValue()
Returns the String value represented by this object. |
int |
hashCode()
Returns the hashcode value used to index and compare this object with others of the same type. |
java.lang.String |
toString()
Converts to a String representation. |
Methods inherited from class com.sun.xacml.attr.AttributeValue |
encode, encode, encodeWithTags, evaluate, evaluatesToBag, getChildren, getType, isBag |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
identifier
public static final java.lang.String identifier
- Official name of this type
- See Also:
- Constant Field Values
identifierURI
private static java.net.URI identifierURI
- URI version of name for this type
This field is initialized by a static initializer so that we can catch any exceptions thrown by URI(String) and transform them into a RuntimeException, since this should never happen but should be reported properly if it ever does.
earlyException
private static java.lang.RuntimeException earlyException
- RuntimeException that wraps an Exception thrown during the
creation of identifierURI, null if none.
value
private java.lang.String value
- The actual String value that this object represents.
Constructor Detail |
StringAttribute
public StringAttribute(java.lang.String value)
- Creates a new
StringAttribute
that represents the String value supplied.
Method Detail |
getInstance
public static StringAttribute getInstance(org.w3c.dom.Node root)
- Returns a new
StringAttribute
that represents the xs:string at a particular DOM node.
getInstance
public static StringAttribute getInstance(java.lang.String value)
- Returns a new
StringAttribute
that represents the xs:string value indicated by theString
provided.
getValue
public java.lang.String getValue()
- Returns the
String
value represented by this object.
equals
public boolean equals(java.lang.Object o)
- Returns true if the input is an instance of this class and if its
value equals the value contained in this class.
hashCode
public int hashCode()
- Returns the hashcode value used to index and compare this object with
others of the same type. Typically this is the hashcode of the backing
data object.
toString
public java.lang.String toString()
- Converts to a String representation.
encode
public java.lang.String encode()
- Description copied from class:
AttributeValue
- Encodes the value in a form suitable for including in XML data like
a request or an obligation. This must return a value that could in
turn be used by the factory to create a new instance with the same
value.
- Specified by:
encode
in classAttributeValue
|
|||||||||
Home >> All >> com >> sun >> xacml >> [ attr overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |