Class ElementDeclaration

java.lang.Object
org.eclipse.lemminx.extensions.generators.ContainerDeclaration
org.eclipse.lemminx.extensions.generators.ElementDeclaration

public class ElementDeclaration extends ContainerDeclaration
Element information.
  • Constructor Details

    • ElementDeclaration

      public ElementDeclaration(String name)
  • Method Details

    • getName

      public String getName()
      Returns the element name.
      Returns:
      the element name.
    • getAttribute

      public AttributeDeclaration getAttribute(String name)
      Returns the attribute information for the given name and create it if not found.
      Parameters:
      name - the attribute name
      Returns:
      the attribute information for the given name and create it if not found.
    • getAttributes

      public Collection<AttributeDeclaration> getAttributes()
    • hasCharacterContent

      public boolean hasCharacterContent()
      Returns true if element has character content and false otherwise.
      Returns:
      true if element has character content and false otherwise.
    • addElement

      public void addElement(ElementDeclaration element)
      Overrides:
      addElement in class ContainerDeclaration
    • getParent

      public ElementDeclaration getParent()
    • addChildHierarchy

      public void addChildHierarchy(List<String> tags)
    • getChildrenProperties

      public ChildrenProperties getChildrenProperties()
    • incrementOccurrences

      public void incrementOccurrences()
      Increment the DOM element occurrence.
    • getOccurrences

      public int getOccurrences()
      Returns the occurrences of DOM element.
      Returns:
      the occurrences of DOM element.
    • hasAttributeId

      public boolean hasAttributeId()
      Returns true if the element have an attribute ID and false otherwise.
      Returns:
      true if the element have an attribute ID and false otherwise.