Package org.eclipse.lemminx.extensions.contentmodel.model

## Interface CMAttributeDeclaration

All Known Implementing Classes:
  `CMDTDAttributeDeclaration`, `CMRelaxNGAttributeDeclaration`, `CMXSDAttributeDeclaration`

    public interface CMAttributeDeclaration

Content model element which abstracts attribute declaration from a given grammar (XML Schema, DTD, RelaxNG).

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`String` `getAttributeNameDocumentation​(ISharedSettingsRequest request)` Returns formatted documentation of the declared attribute according to settings defined in `request`
`String` `getAttributeValueDocumentation​(String value, ISharedSettingsRequest request)` Returns formatted documentation about `value`, according to settings defined in `request`
`String` `getDefaultValue()` Returns the default value of the declared attribute and null otherwise.
`Collection<String>` `getEnumerationValues()` Returns enumeration values of the declared attribute and empty collection otherwise.
`String` `getLocalName()` Returns the declared attribute local name.
`default String` `getName​(String prefix)` Returns the declared attribute name with the given prefix.
`default String` `getName​(Map<String,​String> prefixes)` Returns the declared attribute name with the proper prefix mapped with the attribute namespace and the local name otherwise.
`String` `getNamespace()` Returns the target namespace and null otherwise.
`CMElementDeclaration` `getOwnerElementDeclaration()` Returns the owner element declaration.
`String` `getPrefix()`
`boolean` `isRequired()` Returns true if the attribute is required and false otherwise.

### Method Detail

#### getPrefix

    String getPrefix()

#### getLocalName

    String getLocalName()

Returns the declared attribute local name.

Returns:
  the declared attribute local name.

#### getNamespace

    String getNamespace()

Returns the target namespace and null otherwise.

Returns:
  the target namespace and null otherwise.

#### getOwnerElementDeclaration

    CMElementDeclaration getOwnerElementDeclaration()

Returns the owner element declaration.

Returns:
  the owner element declaration.

#### getName

    default String getName​(String prefix)

Returns the declared attribute name with the given prefix.

Returns:
  the declared attribute name with the given prefix.

#### getName

    default String getName​(Map<String,​String> prefixes)

Returns the declared attribute name with the proper prefix mapped with the attribute namespace and the local name otherwise.

Parameters:
  `prefixes` - map which contains namespace as key and prefix as value.
Returns:
  the declared attribute name with the proper prefix mapped with the attribute namespace and the local name otherwise.

#### getDefaultValue

    String getDefaultValue()

Returns the default value of the declared attribute and null otherwise.

Returns:
  the default value of the declared attribute and null otherwise.

#### getEnumerationValues

    Collection<String> getEnumerationValues()

Returns enumeration values of the declared attribute and empty collection otherwise.

Returns:
  enumeration values of the declared attribute and empty collection otherwise.

#### getAttributeNameDocumentation

    String getAttributeNameDocumentation​(ISharedSettingsRequest request)

Returns formatted documentation of the declared attribute according to settings defined in `request`

Parameters:
  `request` - the request that contains settings
Returns:
  formatted documentation of the declared attribute according to settings defined in `request`

#### getAttributeValueDocumentation

    String getAttributeValueDocumentation​(String value,
                                          ISharedSettingsRequest request)

Returns formatted documentation about `value`, according to settings defined in `request`

Parameters:
  `value` - the attribute value to find documentation for
  `request` - the request containing settings
Returns:
  formatted documentation about `value`, according to settings defined in `request`

#### isRequired

    boolean isRequired()

Returns true if the attribute is required and false otherwise.

Returns:
  true if the attribute is required and false otherwise.