eu.cdevreeze.yaidom

EName

final case class EName(namespaceUriOption: Option[String], localPart: String) extends Immutable with Product with Serializable

Expanded name. See http://www.w3.org/TR/xml-names11/. It has a localPart and an optional namespace URI. Semantically like a QName in Java, but not keeping the prefix.

To get an eu.cdevreeze.yaidom.EName from a eu.cdevreeze.yaidom.QName, the latter needs to be resolved against a eu.cdevreeze.yaidom.Scope.

The short class name illustrates that expanded names are at least as important as qualified names, and should be equally easy to construct (using the companion object).

Typical usage may lead to an explosion of different EName objects that are equal. Therefore, application code is encouraged to define and use constants for frequently used ENames. For example, for the XML Schema namespace (and analogous to the XLink constants in yaidom):

val XsNamespace = "http://www.w3.org/2001/XMLSchema"

val XsElementEName = EName(XsNamespace, "element")
val XsAttributeEName = EName(XsNamespace, "attribute")
val XsComplexTypeEName = EName(XsNamespace, "complexType")
val XsSimpleTypeEName = EName(XsNamespace, "simpleType")
// ...

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

Implementation note: It was tried as alternative implementation to define EName as (Scala 2.10) value class. The EName would then wrap the expanded name as string representation (in James Clark notation). One cost would be that parsing the (optional) namespace URI and the local name would occur far more frequently. Another cost would be that the alternative implementation would not directly express that an EName is a combination of an optional namespace URI and a local part. Therefore that alternative implementation has been abandoned.

Linear Supertypes
Serializable, Serializable, Product, Equals, Immutable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. EName
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Immutable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new EName(namespaceUriOption: Option[String], localPart: String)

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 finalize(): Unit

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

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

    Definition Classes
    Any
  12. val localPart: String

  13. val namespaceUriOption: Option[String]

  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 toJavaQName(prefixOption: Option[String]): javax.xml.namespace.QName

    Given an optional prefix, creates a javax.xml.namespace.QName from this EName

  19. def toQName(prefixOption: Option[String]): QName

    Given an optional prefix, creates a QName from this EName

  20. def toString(): String

    The String representation, in the format of the javax.xml.namespace.QName.toString method

    The String representation, in the format of the javax.xml.namespace.QName.toString method

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Immutable

Inherited from AnyRef

Inherited from Any

Ungrouped