Class DTDElementDecl

All Implemented Interfaces:
DOMRange, Node

public class DTDElementDecl extends DTDDeclNode
DTD Element Declaration <!ELEMENT
  • Field Details

    • category

      public DTDDeclParameter category
      Formats: <!ELEMENT element-name category> or <!ELEMENT element-name (element-content)>
    • content

      public DTDDeclParameter content
  • Constructor Details

    • DTDElementDecl

      public DTDElementDecl(int start, int end)
  • Method Details

    • getNodeName

      public String getNodeName()
      Specified by:
      getNodeName in interface Node
      Overrides:
      getNodeName in class DTDDeclNode
    • getCategory

      public String getCategory()
    • setCategory

      public void setCategory(int start, int end)
    • getContent

      public String getContent()
    • setContent

      public void setContent(int start, int end)
    • getNodeType

      public short getNodeType()
      Specified by:
      getNodeType in interface Node
      Overrides:
      getNodeType in class DTDDeclNode
    • getEndElementTag

      public int getEndElementTag()
      Returns the offset of the end of tag <!ELEMENT
      Returns:
      the offset of the end of tag <!ELEMENT
    • getParameterAt

      public DTDDeclParameter getParameterAt(int offset)
      Returns the parameter (start/end offset) at the given offset and null otherwise.

      <!ELEMENT note (to,from,head|ing,body)> will return (start/end offset) of heading.

      <!ELEMENT n|ote (to,from,heading,body)> will return null.

      Parameters:
      offset - the offset
      Returns:
      the parameter (start/end offset) at the given offset and null otherwise.
    • getReferencedElementNameAt

      public DTDDeclParameter getReferencedElementNameAt(int offset)
      Description copied from class: DTDDeclNode
      Returns the parameter name which references a DTD element declaration (<!ELEMENT) at the given offset and null otherwise.

      <!ATTLIST element-name ... will return position of 'element-name' which references the <!ELEMENT element-name

      Overrides:
      getReferencedElementNameAt in class DTDDeclNode
      Parameters:
      offset - the offset
      Returns:
      the parameter name which references a DTD element declaration (<!ELEMENT) at the given offset and null otherwise.
    • collectParameters

      public void collectParameters(DTDDeclParameter target, BiConsumer<DTDDeclParameter,DTDDeclParameter> collector)
      Collect parameters which matches the given target.
      Parameters:
      target - the target
      collector - the collector to collect parameters.