Object

org.apache.daffodil.dpath

NodeInfo

Related Doc: package dpath

Permalink

object NodeInfo extends Enum

A NodeInfo.Kind describes what kind of result we want from the expression. E.g., a + b we want numbers from both a and b expressions. In /a/b we want a "complex" node from the expression a, and a value from the expression b. But fn:exists(../a/b) we need complex node a so that we can test if b exists. In case of a[b] for b we need a value, but furthermore an array index, so 1..n.

Functions motivate some of the options here. e.g., fn:nilled( exp ) is the test for a nilled value. There we want an expression to something that is nillable.

This same Kind is also used to describe the inherent value (bottom up) of an expression. So a literal "foo" is of string kind, whereas 5.0 is Numeric

The nested objects here allow one to write NodeInfo.Kind (type of any of these enums) NodeInfo.Number.Kind (type of just the number variants) NodeInfo.Value.Kind (type of just the value variants) The enums themselves are just NodeInfo.Decimal (for example)

Note that you can talk about types using type node objects: E.g., NodeInfo.Number. But you can also use Scala typing to ask whether a particular type object is a subtype of another: e.g.

val x = NodeInfo.String
val aa = NodeInfo.AnyAtomic
x.isSubTypeOf(aa) // true. Ordinary way to check. Navigates our data structure.
x.isInstanceOf[NodeInfo.AnyAtomic.Kind] // true. Uses scala type checking
So each NodeInfo object has a corresponding class (named with .Kind suffix) which is actually a super-type (in Scala sense) of the enums for the types beneath.

The primary advantage of the latter is that this is a big bunch of sealed traits/classes, so if you have a match-case analysis by type, scala's compiler can tell you if your match-case exhausts all possibilities and warn you if it does not.

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

Type Members

  1. sealed trait AnyAtomicKind extends NodeInfo.AnySimpleType.Kind

    Permalink
    Attributes
    protected
  2. sealed trait AnyDateTimeKind extends AnyAtomicKind

    Permalink
    Attributes
    protected
  3. sealed trait AnySimpleExistsKind extends NodeInfo.AnySimpleType.Kind with NodeInfo.Exists.Kind

    Permalink

    Combines the constraint of Exists with AnySimpleType.

    Combines the constraint of Exists with AnySimpleType. I.e, must be an element that exists and is of simple type.

    This is intended to express the type that must be a path to a simple type element. That is, /foo/bar where bar is an element of simple type, but not "foobar" which is a string literal of simple type. The path /foo/bar might be to an element bar with string value "foobar", but we want to distinguish between a string like "foobar" the value and /foo/bar a path to an element of type string.

    Intended for use in dfdl:valueLength, which takes a path, but only to a simple element.

    Attributes
    protected
  4. sealed trait AnySimpleTypeKind extends NodeInfo.Nillable.Kind

    Permalink

    It might be possible to combine AnySimpleType and AnyAtomic, but both terminologies are used.

    It might be possible to combine AnySimpleType and AnyAtomic, but both terminologies are used. In DFDL we don't talk of Atomic's much, but lots of XPath and XML Schema materials do, so we have these two types that are very similar really.

    There is a type union feature in DFDL, and perhaps the difference between AnyAtomic and AnySimpleType is that AnySimpleType admits XSD unions and list types, where AnyAtomic does not?

    Attributes
    protected
  5. sealed trait AnyTypeKind extends Kind

    Permalink

    AnyType is the Top of the type lattice.

    AnyType is the Top of the type lattice. It is the super type of all data types except some special singleton types like ArrayType.

    Attributes
    protected
  6. sealed trait ArrayIndexKind extends NodeInfo.PrimType.UnsignedInt.Kind

    Permalink
    Attributes
    protected
  7. sealed trait ArrayKind extends Kind

    Permalink

    An isolated singleton "type" which is used as a target type for the indexing operation.

    An isolated singleton "type" which is used as a target type for the indexing operation.

    Attributes
    protected
  8. sealed trait ComplexKind extends NodeInfo.AnyType.Kind

    Permalink

    All complex types are represented by this one type object.

    All complex types are represented by this one type object.

    Attributes
    protected
  9. trait EnumValueType extends AnyRef

    Permalink
    Attributes
    protected
    Definition Classes
    Enum
  10. sealed trait ExistsKind extends NodeInfo.AnyType.Kind

    Permalink

    For things like fn:exists, fn:empty, dfdl:contenLength

    For things like fn:exists, fn:empty, dfdl:contenLength

    Attributes
    protected
  11. sealed trait Kind extends EnumValueType

    Permalink
  12. sealed trait NillableKind extends NodeInfo.AnyType.Kind

    Permalink

    There is nothing corresponding to NillableKind in the DFDL/XML Schema type hierarchy.

    There is nothing corresponding to NillableKind in the DFDL/XML Schema type hierarchy. We have it as a parent of both complex type and simple type since both of them can be nillable.

    Attributes
    protected
  13. sealed trait NonEmptyStringKind extends NodeInfo.PrimType.String.Kind

    Permalink

    NonEmptyString is used for the special case where DFDL properties can have expressions that compute their values which are strings, but those strings aren't allowed to be empty strings.

    NonEmptyString is used for the special case where DFDL properties can have expressions that compute their values which are strings, but those strings aren't allowed to be empty strings. Also for properties that simply arent allowed to be empty strings (e.g. padChar).

    Attributes
    protected
  14. sealed trait NumericKind extends NodeInfo.AnyAtomic.Kind

    Permalink
    Attributes
    protected
  15. sealed trait OpaqueKind extends NodeInfo.AnyAtomic.Kind

    Permalink
    Attributes
    protected
  16. sealed trait PrimType extends NodeInfo.AnyAtomic.Kind

    Permalink
  17. sealed trait SignedIntegerKind extends NodeInfo.SignedNumeric.Kind

    Permalink
    Attributes
    protected
  18. sealed trait SignedNumericKind extends NodeInfo.Numeric.Kind

    Permalink
    Attributes
    protected
  19. abstract type Type <: EnumValueType

    Permalink
    Definition Classes
    Enum
  20. sealed trait UnsignedNumericKind extends NodeInfo.Numeric.Kind

    Permalink
    Attributes
    protected

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. object AnyAtomic extends TypeNode with AnyAtomicKind with Product with Serializable

    Permalink
  5. object AnyDateTime extends TypeNode with AnyDateTimeKind with Product with Serializable

    Permalink
  6. object AnySimpleExists extends TypeNode with AnySimpleExistsKind with Product with Serializable

    Permalink
  7. object AnySimpleType extends TypeNode with AnySimpleTypeKind with Product with Serializable

    Permalink
  8. object AnyType extends TypeNode with AnyTypeKind with Product with Serializable

    Permalink
  9. object Array extends TypeNode with ArrayKind with Product with Serializable

    Permalink
  10. object ArrayIndex extends TypeNode with ArrayIndexKind with Product with Serializable

    Permalink
  11. val Boolean: NodeInfo.PrimType.Boolean.type

    Permalink
  12. val Byte: NodeInfo.PrimType.Byte.type

    Permalink
  13. object Complex extends TypeNode with ComplexKind with Product with Serializable

    Permalink
  14. val Date: NodeInfo.PrimType.Date.type

    Permalink
  15. val DateTime: NodeInfo.PrimType.DateTime.type

    Permalink
  16. val Decimal: NodeInfo.PrimType.Decimal.type

    Permalink
  17. val Double: NodeInfo.PrimType.Double.type

    Permalink
  18. object Exists extends TypeNode with NillableKind with Product with Serializable

    Permalink
  19. val Float: NodeInfo.PrimType.Float.type

    Permalink
  20. val HexBinary: NodeInfo.PrimType.HexBinary.type

    Permalink
  21. val Int: NodeInfo.PrimType.Int.type

    Permalink
  22. val Integer: NodeInfo.PrimType.Integer.type

    Permalink
  23. val Long: NodeInfo.PrimType.Long.type

    Permalink
  24. object Nillable extends TypeNode with NillableKind with Product with Serializable

    Permalink
  25. object NonEmptyString extends TypeNode with NonEmptyStringKind with Product with Serializable

    Permalink
  26. val NonNegativeInteger: NodeInfo.PrimType.NonNegativeInteger.type

    Permalink
  27. object Nothing extends TypeNode with NodeInfo.PrimType.Boolean.Kind with NodeInfo.Complex.Kind with NodeInfo.Nillable.Kind with NodeInfo.Array.Kind with NodeInfo.ArrayIndex.Kind with NodeInfo.PrimType.Double.Kind with NodeInfo.PrimType.Float.Kind with NodeInfo.PrimType.Date.Kind with NodeInfo.PrimType.Time.Kind with NodeInfo.PrimType.DateTime.Kind with NodeInfo.PrimType.UnsignedByte.Kind with NodeInfo.PrimType.Byte.Kind with NodeInfo.PrimType.HexBinary.Kind with NodeInfo.NonEmptyString.Kind with Product with Serializable

    Permalink

    Nothing is the bottom of the type lattice.

    Nothing is the bottom of the type lattice.

    It is the return type of the daf:error() function. It's a subtype of every type (except some special singletons like ArrayType).

  28. object Numeric extends TypeNode with NumericKind with Product with Serializable

    Permalink
  29. object Opaque extends TypeNode with OpaqueKind with Product with Serializable

    Permalink
  30. object PrimType

    Permalink

    The PrimType objects are a child enum within the overall NodeInfo enum.

  31. val Short: NodeInfo.PrimType.Short.type

    Permalink
  32. object SignedInteger extends TypeNode with SignedIntegerKind with Product with Serializable

    Permalink
  33. object SignedNumeric extends TypeNode with SignedNumericKind with Product with Serializable

    Permalink
  34. val String: NodeInfo.PrimType.String.type

    Permalink
  35. val Time: NodeInfo.PrimType.Time.type

    Permalink
  36. val UnsignedByte: NodeInfo.PrimType.UnsignedByte.type

    Permalink
  37. val UnsignedInt: NodeInfo.PrimType.UnsignedInt.type

    Permalink
  38. val UnsignedLong: NodeInfo.PrimType.UnsignedLong.type

    Permalink
  39. object UnsignedNumeric extends TypeNode with UnsignedNumericKind with Product with Serializable

    Permalink
  40. val UnsignedShort: NodeInfo.PrimType.UnsignedShort.type

    Permalink
  41. val allPrims: List[PrimTypeNode with Product]

    Permalink
  42. lazy val allTypes: List[TypeNode with AnyTypeKind with Product]

    Permalink
  43. final def asInstanceOf[T0]: T0

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

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  48. def fromObject(a: Any): PrimTypeNode with Product

    Permalink
  49. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  52. def isXDerivedFromY(nameX: String, nameY: String): Boolean

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  57. def toString(): String

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

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

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

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

Inherited from Enum

Inherited from AnyRef

Inherited from Any

Ungrouped