Class/Object

eu.cdevreeze.tqa.base.dom

TaxonomyBase

Related Docs: object TaxonomyBase | package dom

Permalink

final class TaxonomyBase extends AnyRef

Very limited notion of a taxonomy, as a collection of taxonomy documents. It contains a map from URIs (with fragments) to taxonomy documents, for quick element lookups based on URIs with fragments. It also contains a map from ENames (names with target namespace) of global element declarations and named type definitions.

It does not understand (resolved) relationships, and it has no taxonomy query API, but it supports creation of such a taxonomy that does know about relationships and does have a taxonomy query API. In that sense, the reason for this class to exist is mainly its role in creating rich taxonomy objects.

Not only does this class not understand (resolved) relationships, it also does not know about substitution groups and therefore it does not know about concept declarations (unless all substitution groups are in the taxonomy base and we are prepared to follow them all).

This object is rather expensive to create (through the build method), building the maps that support fast querying based on URI (with fragment) or "target EName".

TaxonomyBase creation should never fail, if correct URIs are passed. Even the instance methods are very lenient and should never fail. Typically, a taxonomy instantiated as an object of this class has not yet been validated.

For the taxonomyDocUriMap and elemUriMap, we have that data is silently lost in those maps if there are any duplicate IDs (per document). In a valid taxonomy (as XML document set) this duplication is not allowed.

For the globalElementDeclarationMap, namedTypeDefinitionMap, etc., we also have that data is silently lost if there is more than 1 global element declaration (or named type definition) with the same "target EName". In a valid taxonomy (as XML schema) this duplication is not allowed.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TaxonomyBase
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def computeDerivedSubstitutionGroupMap: SubstitutionGroupMap

    Permalink

    Returns the SubstitutionGroupMap that can be derived from this taxonomy base alone.

    Returns the SubstitutionGroupMap that can be derived from this taxonomy base alone. This is an expensive operation that should be performed only once, if possible.

  7. val elemUriMap: Map[URI, TaxonomyElem]

    Permalink
  8. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  10. def filteringDocumentUris(docUris: Set[URI]): TaxonomyBase

    Permalink

    Creates a "sub-taxonomy" in which only the given document URIs occur.

    Creates a "sub-taxonomy" in which only the given document URIs occur. It can be used for a specific entry point DTS, or to make query methods (not taking an EName) cheaper.

  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def findAllDuplicateGlobalElementDeclarationENames: Set[EName]

    Permalink

    Returns all duplicate global element declaration "target ENames" over all DOM trees combined.

    Returns all duplicate global element declaration "target ENames" over all DOM trees combined. If the result is non-empty, the taxonomy is incorrect, and the map from ENames to global element declarations loses data.

  13. def findAllDuplicateIds(rootElem: TaxonomyElem): Set[String]

    Permalink

    Returns all duplicate ID attributes in the DOM tree with the given root element.

    Returns all duplicate ID attributes in the DOM tree with the given root element. If the result is non-empty, the taxonomy is incorrect, and the map from URIs to elements loses data.

    The type of the ID attributes is not taken into account, although strictly speaking that is incorrect.

  14. def findAllDuplicateNamedTypeDefinitionENames: Set[EName]

    Permalink

    Returns all duplicate named type definition "target ENames" over all DOM trees combined.

    Returns all duplicate named type definition "target ENames" over all DOM trees combined. If the result is non-empty, the taxonomy is incorrect, and the map from ENames to named type definitions loses data.

  15. def findBaseTypeOrSelfUntil(typeEName: EName, p: (EName) ⇒ Boolean): Option[EName]

    Permalink

    If the given type obeys the type predicate, returns it, wrapped in an Option.

    If the given type obeys the type predicate, returns it, wrapped in an Option. Otherwise, returns the optional base type if that type obeys the type predicate, and so on, until either the predicate holds or no further base type can be found in the taxonomy.

  16. def findElemByUri(elemUri: URI): Option[TaxonomyElem]

    Permalink

    Finds the (first) optional element with the given URI.

    Finds the (first) optional element with the given URI. The fragment, if any, must be an XPointer or sequence thereof. Only shorthand pointers or non-empty sequences of element scheme XPointers are accepted. If there is no fragment, the first root element with the given document URI is searched for.

    This is a quick operation for shorthand pointers, which are the most commonly used XPointers in URI fragments anyway.

    The schema type of the ID attributes is not taken into account, although strictly speaking that is incorrect.

  17. def findGlobalAttributeDeclarationByEName(targetEName: EName): Option[GlobalAttributeDeclaration]

    Permalink

    Finds the (first) optional global attribute declaration with the given target EName (name with target namespace).

    Finds the (first) optional global attribute declaration with the given target EName (name with target namespace).

    This is a quick operation.

  18. def findGlobalElementDeclarationByEName(targetEName: EName): Option[GlobalElementDeclaration]

    Permalink

    Finds the (first) optional global element declaration with the given target EName (name with target namespace).

    Finds the (first) optional global element declaration with the given target EName (name with target namespace).

    This is a quick operation.

  19. def findNamedTypeDefinitionByEName(targetEName: EName): Option[NamedTypeDefinition]

    Permalink

    Finds the (first) optional named type definition with the given target EName (name with target namespace).

    Finds the (first) optional named type definition with the given target EName (name with target namespace).

    This is a quick operation.

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

    Permalink
    Definition Classes
    AnyRef → Any
  21. val globalAttributeDeclarationMap: Map[EName, GlobalAttributeDeclaration]

    Permalink
  22. val globalElementDeclarationMap: Map[EName, GlobalElementDeclaration]

    Permalink
  23. def guessedScope: Scope

    Permalink

    Returns the "guessed Scope" from the documents in the taxonomy.

    Returns the "guessed Scope" from the documents in the taxonomy. This can be handy for finding prefixes for namespace names, or for generating ENames from QNames.

    The resulting Scope is taken from the Scopes of the root elements, ignoring the default namespace, if any. If different root element Scopes are conflicting, it is undetermined which one wins.

  24. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  26. val namedTypeDefinitionMap: Map[EName, NamedTypeDefinition]

    Permalink
  27. final def ne(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. def rootElemUriMap: Map[URI, TaxonomyElem]

    Permalink
  31. def rootElems: IndexedSeq[TaxonomyElem]

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

    Permalink
    Definition Classes
    AnyRef
  33. val taxonomyDocUriMap: Map[URI, TaxonomyDocument]

    Permalink
  34. val taxonomyDocs: IndexedSeq[TaxonomyDocument]

    Permalink
  35. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  36. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped