Package org.opensaml.saml.saml2.core.impl

# Class AttributeImpl

java.lang.Object
org.opensaml.core.xml.AbstractXMLObject
org.opensaml.saml.saml2.core.impl.AttributeImpl

All Implemented Interfaces:
  `AttributeExtensibleXMLObject`, `XMLObject`, `SAMLObject`, `Attribute`

Direct Known Subclasses:
  `RequestedAttributeImpl`

public class AttributeImpl extends AbstractXMLObject implements Attribute
Concrete implementation of `Attribute`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final XMLObjectChildrenList<XMLObject>`
`attributeValues`
List of attribute values for this attribute.
`private String`
`friendlyName`
Human readable name of the attribute.
`private String`
`name`
Name of the attribute.
`private String`
`nameFormat`
Format of the name of the attribute.
`private final AttributeMap`
`unknownAttributes`
"anyAttribute" attributes.

### Fields inherited from interface org.opensaml.saml.saml2.core.Attribute

`BASIC, DEFAULT_ELEMENT_LOCAL_NAME, DEFAULT_ELEMENT_NAME, FRIENDLY_NAME_ATTRIB_NAME, NAME_ATTTRIB_NAME, NAME_FORMAT_ATTRIB_NAME, TYPE_LOCAL_NAME, TYPE_NAME, UNSPECIFIED, URI_REFERENCE`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`AttributeImpl(String namespaceURI, String elementLocalName, String namespacePrefix)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`List<XMLObject>`
`getAttributeValues()`
Gets the list of attribute values for this attribute.
`String`
`getFriendlyName()`
Get the friendly name of this attribute.
`String`
`getName()`
Get the name of this attribute.
`String`
`getNameFormat()`
Get the name format of this attribute.
`List<XMLObject>`
`getOrderedChildren()`
Gets an unmodifiable list of child elements in the order that they will appear in the DOM.
`AttributeMap`
`getUnknownAttributes()`
Gets a mutable map of the attributes.
`void`
`setFriendlyName(String fname)`
Sets the friendly name of this attribute.
`void`
`setName(String n)`
Sets the name of this attribute.
`void`
`setNameFormat(String format)`
Sets the name format of this attribute.

### Methods inherited from class org.opensaml.core.xml.AbstractXMLObject

`detach, ensureDOM, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getObjectMetadata, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, manageQualifiedAttributeNamespace, prepareAttributeValueForAssignment, prepareElementContentForAssignment, prepareForAssignment, prepareForAssignment, prepareForAssignment, registerOwnID, releaseChildrenDOM, releaseDOM, releaseParentDOM, releaseThisAndChildrenDOM, releaseThisandParentDOM, resolveID, resolveIDFromRoot, setDOM, setElementNamespacePrefix, setElementQName, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation, setSchemaType`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.opensaml.core.xml.XMLObject

`detach, ensureDOM, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getObjectMetadata, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, releaseChildrenDOM, releaseDOM, releaseParentDOM, resolveID, resolveIDFromRoot, setDOM, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation`

## Field Details

### name

@Nullable private String name
Name of the attribute.

### nameFormat

@Nullable private String nameFormat
Format of the name of the attribute.

### friendlyName

@Nullable private String friendlyName
Human readable name of the attribute.

### unknownAttributes

@Nonnull private final AttributeMap unknownAttributes
"anyAttribute" attributes.

### attributeValues

@Nonnull private final XMLObjectChildrenList<XMLObject> attributeValues
List of attribute values for this attribute.

## Constructor Details

### AttributeImpl

protected AttributeImpl(@Nullable String namespaceURI, @Nonnull String elementLocalName, @Nullable String namespacePrefix)
Constructor.

Parameters:
  `namespaceURI` - the namespace the element is in
  `elementLocalName` - the local name of the XML element this Object represents
  `namespacePrefix` - the prefix for the given namespace

## Method Details

### getName

@Nullable public String getName()
Get the name of this attribute.

Specified by:
  `getName` in interface `Attribute`
Returns:
  the name of this attribute

### setName

public void setName(@Nullable String n)
Sets the name of this attribute.

Specified by:
  `setName` in interface `Attribute`
Parameters:
  `n` - the name of this attribute

### getNameFormat

@Nullable public String getNameFormat()
Get the name format of this attribute.

Specified by:
  `getNameFormat` in interface `Attribute`
Returns:
  the name format of this attribute

### setNameFormat

public void setNameFormat(@Nullable String format)
Sets the name format of this attribute.

Specified by:
  `setNameFormat` in interface `Attribute`
Parameters:
  `format` - the name format of this attribute

### getFriendlyName

@Nullable public String getFriendlyName()
Get the friendly name of this attribute.

Specified by:
  `getFriendlyName` in interface `Attribute`
Returns:
  the friendly name of this attribute

### setFriendlyName

public void setFriendlyName(@Nullable String fname)
Sets the friendly name of this attribute.

Specified by:
  `setFriendlyName` in interface `Attribute`
Parameters:
  `fname` - the friendly name of this attribute

### getUnknownAttributes

@Nonnull public AttributeMap getUnknownAttributes()
Gets a mutable map of the attributes. The map key is the namespace qualified name of the attribute, the map value is the value of the attribute.

Specified by:
  `getUnknownAttributes` in interface `AttributeExtensibleXMLObject`
Returns:
  a map of the attributes

### getAttributeValues

@Nonnull @Live public List<XMLObject> getAttributeValues()
Gets the list of attribute values for this attribute.

Specified by:
  `getAttributeValues` in interface `Attribute`
Returns:
  the list of attribute values for this attribute

### getOrderedChildren

@Nullable @NotLive @Unmodifiable public List<XMLObject> getOrderedChildren()
Gets an unmodifiable list of child elements in the order that they will appear in the DOM.

Specified by:
  `getOrderedChildren` in interface `XMLObject`
Returns:
  ordered list of child elements