Class AttributeDeclaration

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

public class AttributeDeclaration extends Object
Attribute declaration.
  • Constructor Details

  • Method Details

    • 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.