public class Attributes extends Object
| Constructor and Description |
|---|
Attributes(URI category,
Node content,
Set<Attribute> attributes,
String id)
Constructor that creates a new
Attributes based on
the given elements. |
Attributes(URI category,
Set<Attribute> attributes)
Constructor that creates a new
Attributes based on
the given elements. |
| Modifier and Type | Method and Description |
|---|---|
String |
encode()
Encodes this
Attributes into its XML form |
void |
encode(StringBuilder builder)
Encodes this
Attributes into its XML form and writes this out to the provided
StringBuilder |
Set<Attribute> |
getAttributes()
Returns list of attribute that contains in the attributes element
|
URI |
getCategory()
Returns the category of this attributes
|
Node |
getContent()
Returns the content of this attributes, or null if no content was included
|
String |
getId()
Returns the id of this attributes, or null if it was not included
|
static Attributes |
getInstance(Node root) |
public Attributes(URI category, Set<Attribute> attributes)
Attributes based on
the given elements.category - category of the Attributes element whether it is subject, action and etcattributes - a Set of Attribute
that contains in Attributespublic Attributes(URI category, Node content, Set<Attribute> attributes, String id)
Attributes based on
the given elements.category - category of the Attributes element whether it is subject, action and etccontent - content of the Attributes element that can be a XML dataattributes - a Set of Attribute
that contains in Attributesid - id of the Attribute elementpublic static Attributes getInstance(Node root) throws ParsingException
root - ParsingExceptionpublic URI getCategory()
URIpublic Node getContent()
Node or nullpublic Set<Attribute> getAttributes()
Attributepublic String getId()
String or nullpublic String encode()
Attributes into its XML formStringpublic void encode(StringBuilder builder)
Attributes into its XML form and writes this out to the provided
StringBuilderbuilder - string stream into which the XML-encoded data is writtenCopyright © 2021 WSO2. All rights reserved.