eu.cdevreeze.yaidom.core

QName

sealed trait QName extends Immutable with Serializable

Qualified name. See http://www.w3.org/TR/xml-names11/. It is the combination of an optional prefix and a mandatory local part. It is not like a QName in Java, which is more like what yaidom calls an expanded name.

There are 2 types of QNames:

QNames are meaningless outside their scope, which resolves the QName as an eu.cdevreeze.yaidom.core.EName.

Typical usage may lead to an explosion of different QName objects that are equal. Therefore, application code is encouraged to define and use constants for frequently used QNames. For example, for the XML Schema namespace:

val XsPrefix = "xs"

val XsElementQName = QName(XsPrefix, "element")
val XsAttributeQName = QName(XsPrefix, "attribute")
val XsComplexTypeQName = QName(XsPrefix, "complexType")
val XsSimpleTypeQName = QName(XsPrefix, "simpleType")
// ...

In this example, the QName constant names are in upper camel case, starting with the prefix, followed by the local part, and ending with suffix "QName".

Implementation note: It was tried as alternative implementation to define the QName subclasses as (Scala 2.10) value classes. The QName would then wrap the qualified name as string representation (with or without prefix). One cost would be that parsing the (optional) prefix and the local name would occur far more frequently. Another cost would be that the alternative implementation would not directly express that a QName is a combination of an optional prefix and a local part. Therefore that alternative implementation has been abandoned.

Linear Supertypes
Serializable, Serializable, Immutable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. QName
  2. Serializable
  3. Serializable
  4. Immutable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def localPart: String

  2. abstract def prefixOption: Option[String]

  3. abstract def validated: QName

    Partially validates the QName, throwing an exception if found not valid.

    Partially validates the QName, throwing an exception if found not valid. If not found invalid, returns this.

    It is the responsibility of the user of this class to call this method, if needed. Fortunately, this method facilitates method chaining, because the QName itself is returned.

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

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

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

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

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

    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. final def notify(): Unit

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

    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  18. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Immutable

Inherited from AnyRef

Inherited from Any

Ungrouped