TaxonomyPackageElem

sealed abstract class TaxonomyPackageElem extends CanBeTaxonomyPackageDocumentChild with Elem with ScopedElemLike with SubtypeAwareElemLike

XML element inside a taxonomy package XML tree. This API is immutable, provided the backing element is immutable.

XML element inside a taxonomy package XML tree. This API is immutable, provided the backing element is immutable.

The yaidom SubtypeAwareElemApi and ScopedElemApi query API is offered.

Note that the package-private constructor contains redundant data, in order to speed up (yaidom-based) querying.

It is not required that the taxonomy package elements are schema-valid. Construction of a taxonomy package element is indeed quite lenient.

Note that the backing element implementation can be any implementation of yaidom query API trait BackingNodes.Elem.

This class hierarchy depends on Java 8 or later, due to the use of Java 8 time API.

Creation of TaxonomyPackageElem objects is designed not to fail, even if the XML element is not taxonomy package element content. Of course, after creation many query methods may fail in such cases. It is also possible to use these data classes for taxonomy package elements embedded in other XML elements, or only for parts of taxonomy package elements.

Authors

Chris de Vreeze

Companion
object
trait SubtypeAwareElemLike
trait SubtypeAwareElemApi
trait ScopedElemLike
trait ClarkElemLike
trait IsNavigable
trait ElemLike
trait Elem
trait ScopedElemApi
trait HasScopeApi
trait HasQNameApi
trait Elem
trait HasChildNodesApi
trait AnyElemNodeApi
trait ClarkElemApi
trait IsNavigableApi
trait ElemApi
trait AnyElemApi
trait Elem
trait CanBeDocumentChild
trait CanBeDocumentChild
trait CanBeDocumentChild
trait Node
trait Node
trait Node
class Object
trait Matchable
class Any

Value members

Concrete methods

final def attributes: Iterable[(QName, String)]
final def children: IndexedSeq[ThisNode]
final override def equals(other: Any): Boolean
Definition Classes
Any
final def findAllChildElems: IndexedSeq[TaxonomyPackageElem]

Very fast implementation of findAllChildElems, for fast querying

Very fast implementation of findAllChildElems, for fast querying

final override def hashCode: Int
Definition Classes
Any
final def qname: QName
final def relativePathOption: Option[Path]

Returns the optional relative path to the (optional) taxonomy package root element path.

Returns the optional relative path to the (optional) taxonomy package root element path.

final def resolvedAttributes: Iterable[(EName, String)]
final def resolvedName: EName
final def scope: Scope
final def taxonomyPackageRootElemPathOption: Option[Path]

Returns the optional path of the ancestor-or-self taxonomy package root element.

Returns the optional path of the ancestor-or-self taxonomy package root element.

final def text: String
final def thisElem: ThisElem

Inherited methods

def \(p: ThisElem => Boolean): IndexedSeq[ThisElem]
Inherited from
ElemLike
def \@(expandedName: EName): Option[String]

Shorthand for attributeOption(expandedName).

Shorthand for attributeOption(expandedName).

Inherited from
ClarkElemLike
def \\(p: ThisElem => Boolean): IndexedSeq[ThisElem]
Inherited from
ElemLike
def \\!(p: ThisElem => Boolean): IndexedSeq[ThisElem]
Inherited from
ElemLike
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.

Inherited from
ClarkElemLike
def attributeAsQName(expandedName: EName): QName
Inherited from
ScopedElemLike
def attributeAsQNameOption(expandedName: EName): Option[QName]
Inherited from
ScopedElemLike
def attributeAsResolvedQName(expandedName: EName): EName
Inherited from
ScopedElemLike
def attributeAsResolvedQNameOption(expandedName: EName): Option[EName]
Inherited from
ScopedElemLike
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.

Note that this method can be far more expensive than a custom implementation for a specific element implementation. Therefore this method is non-final and can be overridden.

Inherited from
ClarkElemLike
def filterChildElems(p: ThisElem => Boolean): IndexedSeq[ThisElem]
Inherited from
ElemLike
def filterChildElemsOfType[B <: ThisElem](subType: ClassTag[B])(p: B => Boolean): IndexedSeq[B]
Inherited from
SubtypeAwareElemLike
def filterElems(p: ThisElem => Boolean): IndexedSeq[ThisElem]
Inherited from
ElemLike
def filterElemsOfType[B <: ThisElem](subType: ClassTag[B])(p: B => Boolean): IndexedSeq[B]
Inherited from
SubtypeAwareElemLike
def filterElemsOrSelf(p: ThisElem => Boolean): IndexedSeq[ThisElem]
Inherited from
ElemLike
def filterElemsOrSelfOfType[B <: ThisElem](subType: ClassTag[B])(p: B => Boolean): IndexedSeq[B]
Inherited from
SubtypeAwareElemLike
def findAllChildElemsOfType[B <: ThisElem](subType: ClassTag[B]): IndexedSeq[B]
Inherited from
SubtypeAwareElemLike
override def findAllChildElemsWithPathEntries: IndexedSeq[(ThisElem, Entry)]

Returns all child elements paired with their path entries.

Returns all child elements paired with their path entries.

This method is final, so more efficient implementations for sub-types are not supported. This implementation is only efficient if finding all child elements as well as computing their resolved names is efficient. That is not the case for DOM wrappers or Scala XML Elem wrappers (due to their expensive Scope computations). On the other hand, those wrapper element implementations are convenient, but not intended for heavy use in production. Hence, this method should typically be fast enough.

Definition Classes
ClarkElemLike -> IsNavigable -> IsNavigableApi
Inherited from
ClarkElemLike
def findAllElems: IndexedSeq[ThisElem]
Inherited from
ElemLike
def findAllElemsOfType[B <: ThisElem](subType: ClassTag[B]): IndexedSeq[B]
Inherited from
SubtypeAwareElemLike
def findAllElemsOrSelf: IndexedSeq[ThisElem]
Inherited from
ElemLike
def findAllElemsOrSelfOfType[B <: ThisElem](subType: ClassTag[B]): IndexedSeq[B]
Inherited from
SubtypeAwareElemLike
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. Because of differing namespaces, it is possible that more than one such attribute exists, although this is not often the case.

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.

Note that this method can be far more expensive than a custom implementation for a specific element implementation. Therefore this method is non-final and can be overridden.

Inherited from
ClarkElemLike
def findChildElem(p: ThisElem => Boolean): Option[ThisElem]
Inherited from
ElemLike
override def findChildElemByPathEntry(entry: Entry): Option[ThisElem]

Finds the child element with the given Path.Entry (where this element is the root), if any, wrapped in an Option.

Finds the child element with the given Path.Entry (where this element is the root), if any, wrapped in an Option.

This method is final, so more efficient implementations for sub-types are not supported. This implementation is only efficient if finding all child elements as well as computing their resolved names is efficient. That is not the case for DOM wrappers or Scala XML Elem wrappers (due to their expensive Scope computations). On the other hand, those wrapper element implementations are convenient, but not intended for heavy use in production. Hence, this method should typically be fast enough.

Definition Classes
ClarkElemLike -> IsNavigable -> IsNavigableApi
Inherited from
ClarkElemLike
def findChildElemOfType[B <: ThisElem](subType: ClassTag[B])(p: B => Boolean): Option[B]
Inherited from
SubtypeAwareElemLike
def findElem(p: ThisElem => Boolean): Option[ThisElem]
Inherited from
ElemLike
def findElemOfType[B <: ThisElem](subType: ClassTag[B])(p: B => Boolean): Option[B]
Inherited from
SubtypeAwareElemLike
def findElemOrSelf(p: ThisElem => Boolean): Option[ThisElem]
Inherited from
ElemLike
def findElemOrSelfByPath(path: Path): Option[ThisElem]
Inherited from
IsNavigable
def findElemOrSelfOfType[B <: ThisElem](subType: ClassTag[B])(p: B => Boolean): Option[B]
Inherited from
SubtypeAwareElemLike
def findReverseAncestryOrSelfByPath(path: Path): Option[IndexedSeq[ThisElem]]
Inherited from
IsNavigable
def findTopmostElems(p: ThisElem => Boolean): IndexedSeq[ThisElem]
Inherited from
ElemLike
def findTopmostElemsOfType[B <: ThisElem](subType: ClassTag[B])(p: B => Boolean): IndexedSeq[B]
Inherited from
SubtypeAwareElemLike
def findTopmostElemsOrSelf(p: ThisElem => Boolean): IndexedSeq[ThisElem]
Inherited from
ElemLike
def findTopmostElemsOrSelfOfType[B <: ThisElem](subType: ClassTag[B])(p: B => Boolean): IndexedSeq[B]
Inherited from
SubtypeAwareElemLike
def getChildElem(p: ThisElem => Boolean): ThisElem
Inherited from
ElemLike
def getChildElemByPathEntry(entry: Entry): ThisElem
Inherited from
IsNavigable
def getChildElemOfType[B <: ThisElem](subType: ClassTag[B])(p: B => Boolean): B
Inherited from
SubtypeAwareElemLike
def getElemOrSelfByPath(path: Path): ThisElem
Inherited from
IsNavigable
def getReverseAncestryOrSelfByPath(path: Path): IndexedSeq[ThisElem]
Inherited from
IsNavigable
def localName: String

The local name, that is, the local part of the EName

The local name, that is, the local part of the EName

Inherited from
ClarkElemLike
final def nodeKind: NodeKind
Inherited from
Elem
def normalizedText: String

Returns XmlStringUtils.normalizeString(text).

Returns XmlStringUtils.normalizeString(text).

Inherited from
ClarkElemLike
def textAsQName: QName
Inherited from
ScopedElemLike
Inherited from
ScopedElemLike
def trimmedText: String

Returns text.trim.

Returns text.trim.

Inherited from
ClarkElemLike

Concrete fields

val backingElem: Elem