public class AttributeDeclaration extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AttributeDeclaration.DataType |
Constructor and Description |
---|
AttributeDeclaration(String name,
ElementDeclaration ownerElementDecl) |
Modifier and Type | Method and Description |
---|---|
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() |
public AttributeDeclaration(String name, ElementDeclaration ownerElementDecl)
public String getName()
public void incrementOccurrences()
public void addValue(String value)
public int getOccurrences()
public boolean isID(FileContentGeneratorSettings settings)
settings
- the generator settings.public boolean isRequired()
public boolean isUnique()
public boolean isAllNames()
public boolean isAllNMTOKENs()
public SortedSet<String> getValues()
public boolean isFixedValue(FileContentGeneratorSettings settings)
settings
- the generator settings.public boolean isEnums(FileContentGeneratorSettings settings)
settings
- the generator settings.public AttributeDeclaration.DataType getDataType()
Copyright © 2021. All rights reserved.