eu.cdevreeze.yaidom.dom

DomElem

final class DomElem extends DomParentNode with ElemLike[DomElem] with HasParent[DomElem] with HasQName with HasText

Wrapper around org.w3c.dom.Element, conforming to the eu.cdevreeze.yaidom.ElemLike API.

See the documentation of the mixed-in query API trait(s) for more details on the uniform query API offered by this class.

Self Type
DomElem
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DomElem
  2. HasText
  3. HasQName
  4. HasParent
  5. ElemLike
  6. ElemApi
  7. ParentElemLike
  8. ParentElemApi
  9. DomParentNode
  10. DomNode
  11. AnyRef
  12. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DomElem(wrappedNode: Element)

Type Members

  1. type DomType = Element

    Definition Classes
    DomElem → DomNode

Value Members

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

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

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

    Definition Classes
    AnyRef → Any
  4. final def \(expandedName: EName): IndexedSeq[DomElem]

    Shorthand for filterChildElems(expandedName).

    Shorthand for filterChildElems(expandedName).

    Definition Classes
    ElemLike → ElemApi
  5. final def \(p: (DomElem) ⇒ Boolean): IndexedSeq[DomElem]

    Shorthand for filterChildElems(p).

    Shorthand for filterChildElems(p). Use this shorthand only if the predicate is a short expression.

    Definition Classes
    ParentElemLike → ParentElemApi
  6. final def \@(expandedName: EName): Option[String]

    Shorthand for attributeOption(expandedName)

    Shorthand for attributeOption(expandedName)

    Definition Classes
    ElemLike → ElemApi
  7. final def \\(expandedName: EName): IndexedSeq[DomElem]

    Shorthand for filterElemsOrSelf(expandedName).

    Shorthand for filterElemsOrSelf(expandedName).

    Definition Classes
    ElemLike → ElemApi
  8. final def \\(p: (DomElem) ⇒ Boolean): IndexedSeq[DomElem]

    Shorthand for filterElemsOrSelf(p).

    Shorthand for filterElemsOrSelf(p). Use this shorthand only if the predicate is a short expression.

    Definition Classes
    ParentElemLike → ParentElemApi
  9. final def \\!(expandedName: EName): IndexedSeq[DomElem]

    Shorthand for findTopmostElemsOrSelf(expandedName).

    Shorthand for findTopmostElemsOrSelf(expandedName).

    Definition Classes
    ElemLike → ElemApi
  10. final def \\!(p: (DomElem) ⇒ Boolean): IndexedSeq[DomElem]

    Shorthand for findTopmostElemsOrSelf(p).

    Shorthand for findTopmostElemsOrSelf(p). Use this shorthand only if the predicate is a short expression.

    Definition Classes
    ParentElemLike → ParentElemApi
  11. final def ancestors: IndexedSeq[DomElem]

    Returns ancestorsOrSelf.drop(1)

    Returns ancestorsOrSelf.drop(1)

    Definition Classes
    HasParent
  12. final def ancestorsOrSelf: IndexedSeq[DomElem]

    Returns all ancestor elements or self

    Returns all ancestor elements or self

    Definition Classes
    HasParent
  13. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  14. final def attribute(expandedName: EName): String

    Returns the value of the attribute with the given expanded name, and throws an exception otherwise.

    Returns the value of the attribute with the given expanded name, and throws an exception otherwise.

    Definition Classes
    ElemLike → ElemApi
  15. final def attributeOption(expandedName: EName): Option[String]

    Returns the value of the attribute with the given expanded name, if any, wrapped in an Option.

    Returns the value of the attribute with the given expanded name, if any, wrapped in an Option.

    Definition Classes
    ElemLike → ElemApi
  16. def attributeScope: Scope

    The attribute Scope, which is the same Scope but without the default namespace (which is not used for attributes)

  17. def attributes: IndexedSeq[(QName, String)]

    The attributes of the element as mapping from QNames to values

    The attributes of the element as mapping from QNames to values

    Definition Classes
    DomElem → HasQName
  18. final def children: IndexedSeq[DomNode]

    Definition Classes
    DomParentNode
  19. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. def commentChildren: IndexedSeq[DomComment]

    Returns the comment children

  21. def declarations: Declarations

  22. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  24. final def filterChildElems(expandedName: EName): IndexedSeq[DomElem]

    Returns the child elements with the given expanded name

    Returns the child elements with the given expanded name

    Definition Classes
    ElemLike → ElemApi
  25. final def filterChildElems(p: (DomElem) ⇒ Boolean): IndexedSeq[DomElem]

    Returns the child elements obeying the given predicate.

    Returns the child elements obeying the given predicate. This method could be defined as:

    def filterChildElems(p: E => Boolean): immutable.IndexedSeq[E] =
    this.findAllChildElems.filter(p)
    Definition Classes
    ParentElemLike → ParentElemApi
  26. final def filterElems(expandedName: EName): IndexedSeq[DomElem]

    Returns the descendant elements with the given expanded name

    Returns the descendant elements with the given expanded name

    Definition Classes
    ElemLike → ElemApi
  27. final def filterElems(p: (DomElem) ⇒ Boolean): IndexedSeq[DomElem]

    Returns the descendant elements obeying the given predicate.

    Returns the descendant elements obeying the given predicate. This method could be defined as:

    this.findAllChildElems flatMap (_.filterElemsOrSelf(p))
    Definition Classes
    ParentElemLike → ParentElemApi
  28. final def filterElemsOrSelf(expandedName: EName): IndexedSeq[DomElem]

    Returns the descendant-or-self elements that have the given expanded name

    Returns the descendant-or-self elements that have the given expanded name

    Definition Classes
    ElemLike → ElemApi
  29. final def filterElemsOrSelf(p: (DomElem) ⇒ Boolean): IndexedSeq[DomElem]

    Returns the descendant-or-self elements obeying the given predicate.

    Returns the descendant-or-self elements obeying the given predicate. This method could be defined as:

    def filterElemsOrSelf(p: E => Boolean): immutable.IndexedSeq[E] =
    Vector(this).filter(p) ++ (this.findAllChildElems flatMap (_.filterElemsOrSelf(p)))

    It can be proven that the result is equivalent to findAllElemsOrSelf filter p.

    Definition Classes
    ParentElemLike → ParentElemApi
  30. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  31. def findAllChildElems: IndexedSeq[DomElem]

    Returns the element children

    Returns the element children

    Definition Classes
    DomElem → ParentElemLike → ParentElemApi
  32. final def findAllElems: IndexedSeq[DomElem]

    Returns all descendant elements (not including this element).

    Returns all descendant elements (not including this element). This method could be defined as filterElems { e => true }. Equivalent to findAllElemsOrSelf.drop(1).

    Definition Classes
    ParentElemLike → ParentElemApi
  33. final def findAllElemsOrSelf: IndexedSeq[DomElem]

    Returns this element followed by all descendant elements (that is, the descendant-or-self elements).

    Returns this element followed by all descendant elements (that is, the descendant-or-self elements). This method could be defined as filterElemsOrSelf { e => true }.

    Definition Classes
    ParentElemLike → ParentElemApi
  34. final def findAncestor(p: (DomElem) ⇒ Boolean): Option[DomElem]

    Returns the first found ancestor element obeying the given predicate, if any, wrapped in an Option

    Returns the first found ancestor element obeying the given predicate, if any, wrapped in an Option

    Definition Classes
    HasParent
  35. final def findAncestorOrSelf(p: (DomElem) ⇒ Boolean): Option[DomElem]

    Returns the first found ancestor-or-self element obeying the given predicate, if any, wrapped in an Option

    Returns the first found ancestor-or-self element obeying the given predicate, if any, wrapped in an Option

    Definition Classes
    HasParent
    Annotations
    @tailrec()
  36. final def findAttributeByLocalName(localName: String): Option[String]

    Returns the first found attribute value of an attribute with the given local name, if any, wrapped in an Option.

    Returns the first found attribute value of an attribute with the given local name, if any, wrapped in an Option. Because of differing namespaces, it is possible that more than one such attribute exists, although this is not often the case.

    Definition Classes
    ElemLike → ElemApi
  37. final def findChildElem(expandedName: EName): Option[DomElem]

    Returns the first found child element with the given expanded name, if any, wrapped in an Option

    Returns the first found child element with the given expanded name, if any, wrapped in an Option

    Definition Classes
    ElemLike → ElemApi
  38. final def findChildElem(p: (DomElem) ⇒ Boolean): Option[DomElem]

    Returns the first found child element obeying the given predicate, if any, wrapped in an Option.

    Returns the first found child element obeying the given predicate, if any, wrapped in an Option. This method could be defined as filterChildElems(p).headOption.

    Definition Classes
    ParentElemLike → ParentElemApi
  39. final def findElem(expandedName: EName): Option[DomElem]

    Returns the first found (topmost) descendant element with the given expanded name, if any, wrapped in an Option

    Returns the first found (topmost) descendant element with the given expanded name, if any, wrapped in an Option

    Definition Classes
    ElemLike → ElemApi
  40. final def findElem(p: (DomElem) ⇒ Boolean): Option[DomElem]

    Returns the first found (topmost) descendant element obeying the given predicate, if any, wrapped in an Option.

    Returns the first found (topmost) descendant element obeying the given predicate, if any, wrapped in an Option. This method could be defined as filterElems(p).headOption.

    Definition Classes
    ParentElemLike → ParentElemApi
  41. final def findElemOrSelf(expandedName: EName): Option[DomElem]

    Returns the first found (topmost) descendant-or-self element with the given expanded name, if any, wrapped in an Option

    Returns the first found (topmost) descendant-or-self element with the given expanded name, if any, wrapped in an Option

    Definition Classes
    ElemLike → ElemApi
  42. final def findElemOrSelf(p: (DomElem) ⇒ Boolean): Option[DomElem]

    Returns the first found (topmost) descendant-or-self element obeying the given predicate, if any, wrapped in an Option.

    Returns the first found (topmost) descendant-or-self element obeying the given predicate, if any, wrapped in an Option. This method could be defined as filterElemsOrSelf(p).headOption.

    Definition Classes
    ParentElemLike → ParentElemApi
  43. final def findTopmostElems(expandedName: EName): IndexedSeq[DomElem]

    Returns the descendant elements with the given expanded name that have no ancestor with the same name

    Returns the descendant elements with the given expanded name that have no ancestor with the same name

    Definition Classes
    ElemLike → ElemApi
  44. final def findTopmostElems(p: (DomElem) ⇒ Boolean): IndexedSeq[DomElem]

    Returns the descendant elements obeying the given predicate that have no ancestor obeying the predicate.

    Returns the descendant elements obeying the given predicate that have no ancestor obeying the predicate. This method could be defined as:

    this.findAllChildElems flatMap (_.findTopmostElemsOrSelf(p))
    Definition Classes
    ParentElemLike → ParentElemApi
  45. final def findTopmostElemsOrSelf(expandedName: EName): IndexedSeq[DomElem]

    Returns the descendant-or-self elements with the given expanded name that have no ancestor with the same name

    Returns the descendant-or-self elements with the given expanded name that have no ancestor with the same name

    Definition Classes
    ElemLike → ElemApi
  46. final def findTopmostElemsOrSelf(p: (DomElem) ⇒ Boolean): IndexedSeq[DomElem]

    Returns the descendant-or-self elements obeying the given predicate, such that no ancestor obeys the predicate.

    Returns the descendant-or-self elements obeying the given predicate, such that no ancestor obeys the predicate. This method could be defined as:

    def findTopmostElemsOrSelf(p: E => Boolean): immutable.IndexedSeq[E] =
    if (p(this)) Vector(this)
    else (this.findAllChildElems flatMap (_.findTopmostElemsOrSelf(p)))
    Definition Classes
    ParentElemLike → ParentElemApi
  47. final def getChildElem(expandedName: EName): DomElem

    Returns the single child element with the given expanded name, and throws an exception otherwise

    Returns the single child element with the given expanded name, and throws an exception otherwise

    Definition Classes
    ElemLike → ElemApi
  48. final def getChildElem(p: (DomElem) ⇒ Boolean): DomElem

    Returns the single child element obeying the given predicate, and throws an exception otherwise.

    Returns the single child element obeying the given predicate, and throws an exception otherwise. This method could be defined as findChildElem(p).get.

    Definition Classes
    ParentElemLike → ParentElemApi
  49. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  50. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  51. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  52. final def localName: String

    The local name (or local part).

    The local name (or local part). Convenience method.

    Definition Classes
    ElemLike → ElemApi
  53. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  54. final def normalizedText: String

    Returns XmlStringUtils.normalizeString(text).

    Returns XmlStringUtils.normalizeString(text).

    Definition Classes
    HasText
  55. final def notify(): Unit

    Definition Classes
    AnyRef
  56. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  57. final def parent: DomElem

    Returns the equivalent parentOption.get, throwing an exception if this is the root element

    Returns the equivalent parentOption.get, throwing an exception if this is the root element

    Definition Classes
    HasParent
  58. def parentOption: Option[DomElem]

    Returns the parent element, if any, wrapped in an Option

    Returns the parent element, if any, wrapped in an Option

    Definition Classes
    DomElem → HasParent
  59. def qname: QName

    The QName of the element

    The QName of the element

    Definition Classes
    DomElem → HasQName
  60. def resolvedAttributes: IndexedSeq[(EName, String)]

    The attributes as an ordered mapping from ENames (instead of QNames) to values, obtained by resolving attribute QNames against the attribute scope

    The attributes as an ordered mapping from ENames (instead of QNames) to values, obtained by resolving attribute QNames against the attribute scope

    Definition Classes
    DomElem → ElemLike → ElemApi
  61. def resolvedName: EName

    Resolved name of the element, as EName

    Resolved name of the element, as EName

    Definition Classes
    DomElem → ElemLike → ElemApi
  62. def scope: Scope

  63. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  64. def text: String

    Returns the concatenation of the texts of text children, including whitespace and CData.

    Returns the concatenation of the texts of text children, including whitespace and CData. Non-text children are ignored. If there are no text children, the empty string is returned.

    Definition Classes
    DomElem → HasText
  65. def textChildren: IndexedSeq[DomText]

    Returns the text children

  66. final def toString(): String

    Definition Classes
    DomNode → AnyRef → Any
  67. final def trimmedText: String

    Returns text.trim.

    Returns text.trim.

    Definition Classes
    HasText
  68. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  69. final def wait(arg0: Long, arg1: Int): Unit

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  71. val wrappedNode: Element

    Definition Classes
    DomElem → DomNode

Inherited from HasText

Inherited from HasQName

Inherited from HasParent[DomElem]

Inherited from ElemLike[DomElem]

Inherited from ElemApi[DomElem]

Inherited from ParentElemLike[DomElem]

Inherited from ParentElemApi[DomElem]

Inherited from DomParentNode

Inherited from DomNode

Inherited from AnyRef

Inherited from Any

Ungrouped