Trait

org.dfasdl.utils

DocumentHelpers

Related Doc: package utils

Permalink

trait DocumentHelpers extends ElementHelpers

Useful functions for handling DFASDL documents.

Annotations
@SuppressWarnings()
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DocumentHelpers
  2. ElementHelpers
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class DataElementFilter extends NodeFilter

    Permalink

    This is a simple implementation of a NodeFilter that can be used to traverse only data elements in a dfasdl xml tree.

    This is a simple implementation of a NodeFilter that can be used to traverse only data elements in a dfasdl xml tree.

    Definition Classes
    ElementHelpers

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def analyzeChoice(choice: Element): Map[Element, List[Element]]

    Permalink

    Analyze the given choice and return it's branches and their data elements.

    Analyze the given choice and return it's branches and their data elements. Only the first level(!) of the choice is used to determine the branches. If there is only one celem beneath the choice then it will only count as one branch!

    choice

    The choice to be analyzed.

    returns

    A map containing the data elements mapped to their top branch element.

  5. final def analyzeChoiceBranch(branch: Node): List[Element]

    Permalink

    Return the list of child data elements if the given node is a choice element.

    Return the list of child data elements if the given node is a choice element.

    branch

    The node to be analyzed.

    returns

    A list of child data elements.

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. val binaryDataElements: List[String]

    Permalink
    Definition Classes
    ElementHelpers
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  9. def createDocumentBuilder(useSchema: Boolean = true, schemaDefinition: String = "/org/dfasdl/dfasdl.xsd"): DocumentBuilder

    Permalink

    Creates a DOM document builder specific for our DFASDL schema.

    Creates a DOM document builder specific for our DFASDL schema.

    useSchema

    Determines if we want to to create a document builder using the DFASDL schema.

    schemaDefinition

    The schema definition, e.g. the XSD file to load.

    returns

    A document builder using the DFASDL schema.

    Annotations
    @SuppressWarnings()
  10. def createNormalizedDocument(xml: String, useSchema: Boolean = true): Document

    Permalink

    Create an xml document that is normalized and uses the DFASDL schema per default.

    Create an xml document that is normalized and uses the DFASDL schema per default.

    xml

    A string containing the xml.

    useSchema

    Indicate if the DFASDL schema has to be used (defaults to true).

    returns

    A DOM xml document tree.

    Annotations
    @SuppressWarnings()
  11. val dataElements: List[String]

    Permalink
    Definition Classes
    ElementHelpers
  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. val expressionElements: List[String]

    Permalink
    Definition Classes
    ElementHelpers
  15. def getChildDataElements(treeWalker: TreeWalker): List[Element]

    Permalink

    Get the data elements that are child elements of the given treewalker.

    Get the data elements that are child elements of the given treewalker.

    treeWalker

    The starting point of the recursion.

    returns

    A list of elements that are DataElements of the treewalker.

    Annotations
    @SuppressWarnings()
  16. def getChildDataElementsFromElement(e: Element): List[Element]

    Permalink

    Get the data elements that are child elements of the given element.

    Get the data elements that are child elements of the given element.

    e

    The parent element of the data elements.

    returns

    A list of data elements that are child elements.

  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  18. def getDataElementType(tagName: String): DataElementType

    Permalink

    Analyze the given DataElement and return the type.

    Analyze the given DataElement and return the type. If the type is not known an UnknownElement type is returned.

    tagName

    The tag name of the element.

    returns

    The data element type or UnknownElement

    Definition Classes
    ElementHelpers
  19. def getElementType(tagName: String): ElementType

    Permalink

    Analyze the given tag name and return the DFASDL element type.

    Analyze the given tag name and return the DFASDL element type. If the type is not known an UnknownElement type is returned.

    tagName

    The tag name of the element.

    returns

    The element type or UnknownElement.

    Definition Classes
    ElementHelpers
  20. final def getParentChoice(n: Node): Option[Element]

    Permalink

    Walk up the tree until we find the parent choice of the given node.

    Walk up the tree until we find the parent choice of the given node.

    n

    The start node.

    returns

    An option to the parent choice element if it exists.

    Definition Classes
    ElementHelpers
    Annotations
    @SuppressWarnings() @tailrec()
  21. final def getParentSequence(n: Node): Option[Element]

    Permalink

    Walk up the tree until we find the parent sequence of the given node.

    Walk up the tree until we find the parent sequence of the given node.

    n

    The start node.

    returns

    An option to the parent sequence element if it exists.

    Definition Classes
    ElementHelpers
    Annotations
    @SuppressWarnings() @tailrec()
  22. def getSortedIdList(doc: Document): Vector[String]

    Permalink

    Traverse the given xml document and return the list of ids in the apropriate order.

    Traverse the given xml document and return the list of ids in the apropriate order.

    doc

    A xml document.

    returns

    A list of ids that may be empty.

    Annotations
    @SuppressWarnings()
  23. def getSortedIdList(dfasdl: String): Vector[String]

    Permalink

    Convert the given dfasdl into an xml document, traverse it and return the list of ids in the apropriate order.

    Convert the given dfasdl into an xml document, traverse it and return the list of ids in the apropriate order.

    dfasdl

    A string containing a dfasdl.

    returns

    A list of ids that may be empty.

  24. def getStructureElementType(tagName: String): StructureElementType

    Permalink

    Analyze the given structural element name and return it's type.

    Analyze the given structural element name and return it's type. If the type is not known an Unknownelement type is returned.

    tagName

    The tag name of the element.

    returns

    The structural element type or UnknownElement.

    Definition Classes
    ElementHelpers
  25. def getUniqueDataElements(doc: Document): Set[Element]

    Permalink

    Return all data elements from the given dfasdl document that have the unique attribute set to true.

    Return all data elements from the given dfasdl document that have the unique attribute set to true.

    doc

    A dfasdl xml document.

    returns

    A set of elements.

  26. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  27. def isBinaryDataElement(tagName: String): Boolean

    Permalink
    Definition Classes
    ElementHelpers
  28. def isDataElement(tagName: String): Boolean

    Permalink
    Definition Classes
    ElementHelpers
  29. def isExpressionElement(tagName: String): Boolean

    Permalink
    Definition Classes
    ElementHelpers
  30. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  31. def isStringDataElement(tagName: String): Boolean

    Permalink
    Definition Classes
    ElementHelpers
  32. def isStructuralElement(tagName: String): Boolean

    Permalink
    Definition Classes
    ElementHelpers
  33. def isUniqueDataElement(e: Element): Boolean

    Permalink
    Definition Classes
    ElementHelpers
  34. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  35. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  36. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  37. val stringDataElements: List[String]

    Permalink
    Definition Classes
    ElementHelpers
  38. val structElements: List[String]

    Permalink
    Definition Classes
    ElementHelpers
  39. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  40. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  41. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from ElementHelpers

Inherited from AnyRef

Inherited from Any

Ungrouped