Package org.eclipse.lemminx.extensions.generators

## Class AttributeDeclaration

- java.lang.Object
- - org.eclipse.lemminx.extensions.generators.AttributeDeclaration

    public class AttributeDeclaration
    extends Object

Attribute declaration.

### Nested Class Summary

Nested Classes
`static class` `AttributeDeclaration.DataType`

### Constructor Summary

Constructors
`AttributeDeclaration​(String name, ElementDeclaration ownerElementDecl)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addValue​(String value)`
`AttributeDeclaration.DataType` `getDataType()` Returns the attribute data type.
`String` `getName()` Returns the attribute name.
`int` `getOccurrences()` Returns the occurrences of DOM attribute.
`SortedSet<String>` `getValues()` Returns the all distinct attribute values.
`void` `incrementOccurrences()` Increment the DOM attributes occurrence.
`boolean` `isAllNames()`
`boolean` `isAllNMTOKENs()`
`boolean` `isEnums​(FileContentGeneratorSettings settings)` Returns true if attributes have values enumeration and false otherwise.
`boolean` `isFixedValue​(FileContentGeneratorSettings settings)` Returns true if all values of the attribute are fixed with a given value and false otherwise.
`boolean` `isID​(FileContentGeneratorSettings settings)` Returns true if the attribute is an ID and false otherwise.
`boolean` `isRequired()` Returns true if the attribute declaration is required and false otherwise.
`boolean` `isUnique()`

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

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

### Constructor Detail

#### AttributeDeclaration

    public AttributeDeclaration​(String name,
                                ElementDeclaration ownerElementDecl)

### Method Detail

#### getName

    public String getName()

Returns the attribute name.

Returns:
  the attribute name.

#### incrementOccurrences

    public void incrementOccurrences()

Increment the DOM attributes occurrence.

#### addValue

    public void addValue​(String value)

#### getOccurrences

    public int getOccurrences()

Returns the occurrences of DOM attribute.

Returns:
  the occurrences of DOM attribute.

#### isID

    public boolean isID​(FileContentGeneratorSettings settings)

Returns true if the attribute is an ID and false otherwise.

Parameters:
  `settings` - the generator settings.
Returns:
  true if the attribute is an ID and false otherwise.

#### isRequired

    public boolean isRequired()

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

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

#### isUnique

    public boolean isUnique()

#### isAllNames

    public boolean isAllNames()

#### isAllNMTOKENs

    public boolean isAllNMTOKENs()

#### getValues

    public SortedSet<String> getValues()

Returns the all distinct attribute values.

Returns:
  the all distinct attribute values.

#### isFixedValue

    public boolean isFixedValue​(FileContentGeneratorSettings settings)

Returns true if all values of the attribute are fixed with a given value and false otherwise.

Parameters:
  `settings` - the generator settings.
Returns:
  true if all values of the attribute are fixed with a given value and false otherwise.

#### isEnums

    public boolean isEnums​(FileContentGeneratorSettings settings)

Returns true if attributes have values enumeration and false otherwise.

Parameters:
  `settings` - the generator settings.
Returns:
  true if attributes have values enumeration and false otherwise.

#### getDataType

    public AttributeDeclaration.DataType getDataType()

Returns the attribute data type.

Returns:
  the attribute data type.