Class MetadataHandler

java.lang.Object
org.apache.daffodil.api.metadata.MetadataHandler

public abstract class MetadataHandler extends Object
Base class used by clients who want to walk the runtime1 metadata information.

Metadata is the aspects of the DFDL schema information that are needed at runtime.

Interfacing Daffodil to other data handling systems requires both a metadata bridge be built that takes Daffodil metadata into that system's metadata, and a data bridge that takes Daffodil data to that system's data.

Bridging this library to other data handling software is most easily done directly from metadata and data structures. (The Daffodil Schema Compiler's walkers are an alternative, but are more for interfacing the Daffodil schema compiler data structures to other compiler backends.)

This walker/handler works on the pre-compiled binary schema just as well as if the schema was just compiled. This bypasses the need for Daffodil's schema compiler to be involved at all in interfacing to say, Apache Drill or other data fabrics. A pre-compiled DFDL schema is all that is needed.

  • Constructor Details

    • MetadataHandler

      public MetadataHandler()
  • Method Details

    • simpleElementMetadata

      public abstract void simpleElementMetadata(SimpleElementMetadata m)
      Called for simple type element metadata (for declarations or references)

      There are no separate start/end methods for simple element declarations.

      Parameters:
      m - the simple element metadata for the element declaration.
    • startComplexElementMetadata

      public abstract void startComplexElementMetadata(ComplexElementMetadata m)
      Called for complex type element metadata (for declarations or references)

      Subsequent calls will be for the model group making up the content of the element.

      Parameters:
      m - the complex element metadata for the element declaration that is starting
    • endComplexElementMetadata

      public abstract void endComplexElementMetadata(ComplexElementMetadata m)
      Called for complex type element metadata (for declarations or references)

      This is called after all the calls corresponding to the content of the complex type element.

      Parameters:
      m - the complex element metadata for the element declaration that is ending
    • startSequenceMetadata

      public abstract void startSequenceMetadata(SequenceMetadata m)
      Called for sequence group definitions.

      Subsequent calls will be for the content of the sequence.

      Parameters:
      m - the sequence metadata for the sequence definition that is starting
    • endSequenceMetadata

      public abstract void endSequenceMetadata(SequenceMetadata m)
      Called for sequence group definitions.

      This is called after all the calls corresponding to the content of the sequence group.

      Parameters:
      m - the sequence metadata for the sequence definition that is ending
    • startChoiceMetadata

      public abstract void startChoiceMetadata(ChoiceMetadata m)
      Called for choice group definitions.

      Subsequent calls will be for the content of the choice.

      Parameters:
      m - the choice metadata for the choice definition that is starting
    • endChoiceMetadata

      public abstract void endChoiceMetadata(ChoiceMetadata m)
      Called for choice group definitions.

      This is called after all the calls corresponding to the content of the choice group.

      Parameters:
      m - the choice metadata for the choice definition that is ending