class DataProcessor extends WithDiagnostics with Serializable
Compiled version of a DFDL Schema, used to parse data and get the DFDL infoset
- Alphabetic
- By Inheritance
- DataProcessor
- WithDiagnostics
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getDiagnostics: Seq[Diagnostic]
Get the list of Diagnostic's created during the construction of the parent object
Get the list of Diagnostic's created during the construction of the parent object
- returns
list of Diagnostic's. May contain errors or warnings, and so may be non-empty even if WithDiagnostics.isError is false.
- Definition Classes
- WithDiagnostics
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
isError(): Boolean
Determine if any errors occurred in the creation of the parent object.
Determine if any errors occurred in the creation of the parent object.
- returns
true if no errors occurred, false otherwise
- Definition Classes
- WithDiagnostics
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
newContentHandlerInstance(output: WritableByteChannel): DaffodilUnparseContentHandler
Obtain a new DaffodilUnparseContentHandler from the current DataProcessor.
-
def
newXMLReaderInstance(): DaffodilParseXMLReader
Obtain a new DaffodilParseXMLReader from the current DataProcessor.
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
parse(input: InputSourceDataInputStream, output: InfosetOutputter): ParseResult
Parse input data from an InputSourceDataInputStream and output the infoset to an InfosetOutputter
Parse input data from an InputSourceDataInputStream and output the infoset to an InfosetOutputter
- input
data to be parsed
- output
the InfosetOutputter that will be used to output the infoset
- returns
an object which contains the result, and/or diagnostic information.
-
def
save(output: WritableByteChannel): Unit
Save the DataProcessor
Save the DataProcessor
The resulting output can be reloaded by Compiler.reload.
- output
the byte channel to write the DataProcessor to. Note that external variable settings are not saved.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
unparse(input: InfosetInputter, output: WritableByteChannel): UnparseResult
Unparse an InfosetInputter
Unparse an InfosetInputter
- input
the infoset inputter to use for unparsing
- output
the byte channel to write the data to
- returns
an object with contains diagnostic information
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
withDebugger(dbg: Debugger): DataProcessor
Obtain a new DataProcessor with a specified debugger.
Obtain a new DataProcessor with a specified debugger.
- dbg
debugger
-
def
withDebuggerRunner(dr: DebuggerRunner): DataProcessor
Obtain a new DataProcessor with a specified debugger runner.
Obtain a new DataProcessor with a specified debugger runner.
- dr
debugger runner
-
def
withDebugging(flag: Boolean): DataProcessor
Obtain a new DataProcessor instance with debugging enabled or disabled.
Obtain a new DataProcessor instance with debugging enabled or disabled.
Before enabling, DataProcessor#withDebugger or DataProcessor#withDebuggerRunner must be called to obtain a DataProcessor with a non-null debugger.
- flag
true to enable debugging, false to disabled
-
def
withExternalVariables(extVars: Map[String, String]): DataProcessor
Obtain a new DataProcessor with multiple DFDL variables set.
Obtain a new DataProcessor with multiple DFDL variables set.
- extVars
a map of key/value pairs, where the key is the variable name, and the value is the value of the variable. The key may be preceded by a string of the form "{namespace}" to define a namespace for the variable. If preceded with "{}", then no namespace is used. If not preceded by anything, then Daffodil will figure out the namespace.
-
def
withExternalVariables(extVars: File): DataProcessor
Obtain a new DataProcessor with external variables read from a Daffodil configuration file
Obtain a new DataProcessor with external variables read from a Daffodil configuration file
- extVars
file to read DFDL variables from.
- See also
Daffodil Configuration File - Daffodil configuration file format
-
def
withValidationMode(mode: ValidationMode): DataProcessor
Obtain a new DataProcessor having a specific validation mode
Obtain a new DataProcessor having a specific validation mode
- mode
mode to control validation
- Annotations
- @throws( classOf[InvalidUsageException] )
- Exceptions thrown
InvalidUsageException
if mode is not a valid ValidateMode value
- def withValidator(validator: Validator): DataProcessor
Deprecated Value Members
-
def
canProceed(): Boolean
Determine if this object can be used in any future parse activities
Determine if this object can be used in any future parse activities
- returns
true it is safe to proceed, false otherwise
- Definition Classes
- WithDiagnostics
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) Use !isError() to determine if it is safe to proceed
-
def
parse(input: ReadableByteChannel, output: InfosetOutputter): ParseResult
Parse input data without specifying a length
Parse input data without specifying a length
Use this when you don't know how big the data is.
- input
data to be parsed
- output
the InfosetOutputter that will be used to output the infoset
- returns
an object which contains the result, and/or diagnostic information.
- Annotations
- @deprecated
- Deprecated
(Since version 2.2.0) Use parse(InputSourceDataInputStream, InfosetOutputter) to parse the data and get the infoset representation from the InfosetOutputter instead of ParseResult.result()
-
def
parse(input: ReadableByteChannel, output: InfosetOutputter, lengthLimitInBits: Long): ParseResult
Parse input data with a specified length
Parse input data with a specified length
- input
data to be parsed
- output
the InfosetOutputter that will be used to output the infoset
- lengthLimitInBits
the length of the input data in bits, or -1 if no limit
- returns
an object which contains the result, and/or diagnostic information.
- Annotations
- @deprecated
- Deprecated
(Since version 2.2.0) Use parse(InputSourceDataInputStream, InfosetOutputter) to parse the data and get the infoset representation from the InfosetOutputter instead of ParseResult.result()
-
def
parse(input: ReadableByteChannel): ParseResult
Parse input data without specifying a length
Parse input data without specifying a length
- input
data to be parsed
- returns
an object which contains the result, and/or diagnostic information.
- Annotations
- @deprecated
- Deprecated
(Since version 2.2.0) Use parse(InputSourceDataInputStream, InfosetOutputter) to parse the data and get the infoset representation from the InfosetOutputter instead of ParseResult.result()
-
def
parse(input: ReadableByteChannel, lengthLimitInBits: Long): ParseResult
Parse input data with a specified length
Parse input data with a specified length
- input
data to be parsed
- lengthLimitInBits
the length of the input data in bits, or -1 if no limit
- returns
an object which contains the result, and/or diagnostic information.
- Annotations
- @deprecated
- Deprecated
(Since version 2.2.0) Use parse(InputSourceDataInputStream, InfosetOutputter) to parse the data and get the infoset representation from the InfosetOutputter instead of ParseResult.result()
-
def
setDebugger(dr: DebuggerRunner): Unit
Set the debugger runner
Set the debugger runner
- dr
debugger runner
- Annotations
- @deprecated
- Deprecated
(Since version 2.6.0) Use withDebuggerRunner.
-
def
setDebugging(flag: Boolean): Unit
Enable/disable debugging.
Enable/disable debugging.
Before enabling, DataProcessor#withDebugger or DataProcessor#withDebuggerRunner must be called with a non-null debugger.
- flag
true to enable debugging, false to disabled
- Annotations
- @deprecated
- Deprecated
(Since version 2.6.0) Use withDebugging.
-
def
setExternalVariables(extVars: Map[String, String]): Unit
Set the value of multiple DFDL variables
Set the value of multiple DFDL variables
- extVars
a map of key/value pairs, where the key is the variable name, and the value is the value of the variable. The key may be preceded by a string of the form "{namespace}" to define a namespace for the variable. If preceded with "{}", then no namespace is used. If not preceded by anything, then Daffodil will figure out the namespace.
- Annotations
- @deprecated
- Deprecated
(Since version 2.6.0) Use withExternalVariables.
-
def
setExternalVariables(extVars: File): Unit
Read external variables from a Daffodil configuration file
Read external variables from a Daffodil configuration file
- extVars
file to read DFDL variables from.
- Annotations
- @deprecated
- Deprecated
(Since version 2.6.0) Use withExternalVariables.
- See also
Daffodil Configuration File - Daffodil configuration file format
-
def
setValidationMode(mode: ValidationMode): Unit
Set validation mode
Set validation mode
- mode
mode to control validation
- Annotations
- @deprecated @throws( classOf[InvalidUsageException] )
- Deprecated
(Since version 2.6.0) Use withValidationMode.
- Exceptions thrown
InvalidUsageException
if mode is not a valid ValidateMode value
-
def
unparse(output: WritableByteChannel, infoset: Node): UnparseResult
Unparse a scala.xml.Node infoset
Unparse a scala.xml.Node infoset
- output
the byte channel to write the data to
- infoset
the infoset to unparse, as a scala xml Node
- returns
an object with contains the result and/or diagnostic information
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) Use unparse(InfosetInputter, WritableByteChannel)
This is the documentation for the Apache Daffodil Scala API.
Package structure
org.apache.daffodil.sapi - Provides the classes necessary to compile DFDL schemas, parse and unparse files using the compiled objects, and retrieve results and parsing diagnostics
org.apache.daffodil.udf - Provides the classes necessary to create User Defined Functions to extend the DFDL expression language