public class Attribute extends Object
| Constructor and Description |
|---|
Attribute(URI id,
String issuer,
DateTimeAttribute issueInstant,
AttributeValue value)
Creates a new
Attribute of the type specified in the
given AttributeValue. |
Attribute(URI id,
URI type,
String issuer,
DateTimeAttribute issueInstant,
AttributeValue value)
Deprecated.
As of version 1.1, replaced by
Attribute(URI,String,DateTimeAttribute,AttributeValue).
This constructor has some ambiguity in that it allows a
specified datatype and a value that already has some
associated datatype. The new constructor clarifies this
issue by removing the datatype parameter and using the
datatype specified by the given value. |
Attribute(URI id,
URI type,
String issuer,
DateTimeAttribute issueInstant,
List<AttributeValue> values) |
Attribute(URI id,
URI type,
String issuer,
DateTimeAttribute issueInstant,
Set<AttributeValue> values) |
| Modifier and Type | Method and Description |
|---|---|
String |
encode()
Simple encoding method that returns the text-encoded version of
this attribute with no formatting.
|
void |
encode(OutputStream output)
Encodes this attribute into its XML representation and writes
this encoding to the given
OutputStream with no
indentation. |
void |
encode(OutputStream output,
Indenter indenter)
Encodes this attribute into its XML representation and writes
this encoding to the given
OutputStream with
indentation. |
boolean |
equals(Object obj) |
URI |
getId()
Returns the id of this attribute
|
static Attribute |
getInstance(Node root)
Creates an instance of an
Attribute based on the root DOM
node of the XML data. |
DateTimeAttribute |
getIssueInstant()
Returns the moment at which the attribute was issued, or null if no
issue time was provided
|
String |
getIssuer()
Returns the issuer of this attribute, or null if no issuer was named
|
URI |
getType()
Returns the data type of this attribute
|
AttributeValue |
getValue()
The value of this attribute, or null if no value was included
|
List<AttributeValue> |
getValues()
Return all the values
|
int |
hashCode() |
public Attribute(URI id, String issuer, DateTimeAttribute issueInstant, AttributeValue value)
Attribute of the type specified in the
given AttributeValue.id - the id of the attributeissuer - the attribute's issuer or null if there is noneissueInstant - the moment when the attribute was issued, or null
if it's unspecifiedvalue - the actual value associated with the attribute meta-datapublic Attribute(URI id, URI type, String issuer, DateTimeAttribute issueInstant, Set<AttributeValue> values)
public Attribute(URI id, URI type, String issuer, DateTimeAttribute issueInstant, List<AttributeValue> values)
public Attribute(URI id, URI type, String issuer, DateTimeAttribute issueInstant, AttributeValue value)
Attribute(URI,String,DateTimeAttribute,AttributeValue).
This constructor has some ambiguity in that it allows a
specified datatype and a value that already has some
associated datatype. The new constructor clarifies this
issue by removing the datatype parameter and using the
datatype specified by the given value.Attributeid - the id of the attributetype - the type of the attributeissuer - the attribute's issuer or null if there is noneissueInstant - the moment when the attribute was issued, or null
if it's unspecifiedvalue - the actual value associated with the attribute meta-datapublic static Attribute getInstance(Node root) throws ParsingException
Attribute based on the root DOM
node of the XML data.root - the DOM root of the AttributeType XML typeParsingExceptionpublic URI getId()
public URI getType()
public String getIssuer()
public DateTimeAttribute getIssueInstant()
public List<AttributeValue> getValues()
public AttributeValue getValue()
public void encode(OutputStream output)
OutputStream with no
indentation.output - a stream into which the XML-encoded data is writtenpublic void encode(OutputStream output, Indenter indenter)
OutputStream with
indentation.output - a stream into which the XML-encoded data is writtenindenter - an object that creates indentation stringspublic String encode()
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.