Trait

org.apache.daffodil.oolag.OOLAG

OOLAGHost

Related Doc: package OOLAG

Permalink

trait OOLAGHost extends Logging with WithDiagnostics with NamedMixinBase

An OOLAGHost, or OOLAG for short, is a collection of OOLAGValues or LVs for short.

The way these are generally used now is like this

def foo = LV('foo) {...calculation...}.value

or, if you would like a slot to show up in the debugger so you can more easily see the value of the LV then you can

lazy val foo = LV('foo){...calculation...}.value

Why scala needs 'real' Lisp-style macros: Well wouldn't it be nicer if I could write:

defAttribute foo {... calculation ...}

and have that be equivalent the more verbose stuff above it? But I digress...

OOLAGHosts support a feature called requiredEvaluations. This is a lazy function the arguments to which are only evaluated when the isError summary operation is invoked.

The requiredEvaluations function takes any number of arguments, they are of type Any. Suppose we have the LV named 'foo' from above. If we want to say that our particular OOLAGHost-derived class must evaluate the 'foo' LV otherwise we don't know if it has errors or not, then we write:

requiredEvaluations(foo)

This goes at the top of the class definition. When isError is invoked the value of 'foo' will be computed if it has not been attempted already. This insures that the value exists for 'foo', or any errors/warnings to be determined by its calculation have been recorded.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. OOLAGHost
  2. NamedMixinBase
  3. WithDiagnostics
  4. Logging
  5. Identity
  6. AnyRef
  7. 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 LV[T](sym: Symbol)(body: ⇒ T): OOLAGValue[T]

    Permalink

    The factory for OOLAGValues is LV.

    The factory for OOLAGValues is LV.

    Attributes
    protected
  5. final def areLogging(lvl: Type): Boolean

    Permalink
    Definition Classes
    Logging
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. final def assuming(pred: Boolean): Unit

    Permalink

    Used to check things that OOLAG doesn't protect against such as index out of bounds.

    Used to check things that OOLAG doesn't protect against such as index out of bounds.

    When we rationalized some of the try/catches so they catch less-broad catagories of exceptions, well now some things are ambiguous failures. If lazy val foo = schemas(0).schemaDocs(0) fails with index-out-of-range, is that a programmer error, or just the computation failing because there aren't any schemas, so the lazy val foo should fail, causing an OOLAG capture of the error.

    In the past, OOLAG would have caught this indexing exception, converted it to an SDE, and in the case where it was a programmer mistake, it would have masked that mistake.

    Now we've flipped it. Now OOLAG won't catch this, but we need a way to say explicitly, that we're assuming there are schemas, so schema(0) should work, and if it doesn't, OOLAG should catch this and abandon computing whatever attribute we were trying to compute, and put that attribute in the 'already been tried' state.

  8. final def checkErrors: Unit

    Permalink
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. final var currentOVList: Seq[OOLAGValueBase]

    Permalink

    Detect circular relationships among LVs.

  11. lazy val diagnosticDebugName: String

    Permalink

    For diagnostics/trace/debug purposes

    For diagnostics/trace/debug purposes

    Definition Classes
    NamedMixinBase
  12. def diagnostics: Seq[Diagnostic]

    Permalink
  13. def doLogging(lvl: Type, msg: String, args: Seq[Any]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  14. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  16. def error(th: Diagnostic): Unit

    Permalink
  17. final def errors: Seq[Diagnostic]

    Permalink
  18. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  20. def getDiagnostics: Seq[Diagnostic]

    Permalink

    If multiple diagnostic messages can be created by an action, then this returns a sequence of multiple diagnostic objects.

    If multiple diagnostic messages can be created by an action, then this returns a sequence of multiple diagnostic objects. If the message is a fatal runtime issue, then this might be a singleton list, or it could be a bunch of warnings followed by a fatal runtime error.

    The order of the sequence is important. When the diagnostics are about a file of text, then diagnostics that are about lines earlier in the file are earlier in the list.

    Definition Classes
    OOLAGHostWithDiagnostics
  21. def getLogWriter(): LogWriter

    Permalink
    Definition Classes
    Logging
  22. final def getLoggingLevel(): Type

    Permalink
    Definition Classes
    Logging
  23. final def hasOOLAGRootSetup: Boolean

    Permalink
  24. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  25. def isError: Boolean

    Permalink

    Currently we depend on being able to evaluate these repeatedly, and get different answers.

    Currently we depend on being able to evaluate these repeatedly, and get different answers.

    because it forces evaluation of all the requiredEvaluations(...) on all objects first, but that is only for the objects that have been created at the time this is called.

    Definition Classes
    OOLAGHostWithDiagnostics
  26. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  27. final macro def log(lvl: Type, msg: String, args: Any*): Unit

    Permalink
    Definition Classes
    Logging
  28. lazy val logID: String

    Permalink
    Definition Classes
    LoggingIdentity
  29. var logLevel: Maybe[Type]

    Permalink
    Definition Classes
    Logging
  30. var logWriter: Maybe[LogWriter]

    Permalink
    Definition Classes
    Logging
  31. def nArgs: Args

    Permalink
    Attributes
    protected
  32. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  35. final lazy val oolagContext: OOLAGHost

    Permalink
  36. def oolagContextViaArgs: Option[OOLAGHost]

    Permalink
    Attributes
    protected
  37. def oolagError(th: Diagnostic): Unit

    Permalink
    Attributes
    protected
  38. final def oolagParent: OOLAGHost

    Permalink

    My parent, unless I am the root and have no parent.

    My parent, unless I am the root and have no parent. In that case this aborts with a usage error. Programmer should have called isOOLAGRoot first.

    Attributes
    protected
  39. def oolagWarn(th: Diagnostic): Unit

    Permalink

    Implementor of OOLAGHost constructs Diagnostic objects because it has other context (schema components) needed in order to provide a good diagnostic.

    Implementor of OOLAGHost constructs Diagnostic objects because it has other context (schema components) needed in order to provide a good diagnostic.

    So we have this abstract method that is implemented by things that can actually construct Diagnostic objects (Anything that ThrowsSDE)

    Attributes
    protected
  40. final lazy val optOolagContext: Option[OOLAGHost]

    Permalink

    Either we were called with a constructor arg that provides the oolagContext, or we were constructed with no args, and in that case someone must call setOOLAGContext before we access the oolagContext.

  41. lazy val path: String

    Permalink
  42. final def requiredEvaluations(lv: OOLAGValueBase): Unit

    Permalink
    Attributes
    protected
  43. final def requiredEvaluations(arg: ⇒ Any): Unit

    Permalink
    Attributes
    protected
  44. def setLogWriter(lw: LogWriter): Unit

    Permalink
    Definition Classes
    Logging
  45. def setLoggingLevel(level: Type): Unit

    Permalink
    Definition Classes
    Logging
  46. final def setOOLAGContext(oolagContextArg: OOLAGHost): Unit

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. def warn(th: Diagnostic): Unit

    Permalink
  53. final def warnings: Seq[Diagnostic]

    Permalink
  54. macro def withLoggingLevel[S](newLevel: Type = getLoggingLevel)(body: ⇒ S): Unit

    Permalink

    Use to make debug printing over small code regions convenient.

    Use to make debug printing over small code regions convenient. Turns on your logging level of choice over a lexical region of code. Makes sure it is reset to whatever it was on the exit, even if it throws.

    Call with no log level argument to turn it off (when done debugging). That way you can leave it sitting there.

    Definition Classes
    Logging

Inherited from NamedMixinBase

Inherited from WithDiagnostics

Inherited from Logging

Inherited from Identity

Inherited from AnyRef

Inherited from Any

Ungrouped