Data Request Broker
2-3-release

Package fr.gael.drb.impl.sds

Implementation of DRB for the support of binary files heareafter called Structured Data Sources (SDS).

See:
          Description

Class Summary
Length A length.
SdfFactory Factory for Structured Data Files.
SdfSchemaBuilder Factory for SDF/XML-Schema.
SdfViewDescriptor SdfViewDescriptor class.
 

Exception Summary
DynamicException Dynamic exception of the SDF engine during evaluation phase.
StaticException Static exception of an SDF static analysis phase.
 

Package fr.gael.drb.impl.sds Description

Implementation of DRB for the support of binary files heareafter called Structured Data Sources (SDS).

DRB API® SDS implementation is wrapping binary or ASCII file through an access library which is embedded into the API itself. This library gets parameters from an external description of the data structure to retrieve information from the data file. The external description is based on the W3C standard for XML Schema. It includes some extra tags dedicated to binary data representation which are not taken into account in the standard.

When DRB API® points to a data which is associated to a schema, SDS implementation parses the schema and keeps a representation out of it. In some cases, the schema contains instances which value is in the data file itself. The implementation need to browse the file to retrieve them all. This operation time duration is proportional to file volume. Next, SDS implementation gives the associated root node.

Template:

  1. specify the XML_SCHEMA_NAMESPACE
  2. specify the SDF_NAMESPACE
  3. open an element
  4. open an sdf block in an appinfo block
  5. add sdf description

Example:

   <xs:schema xmlns:xs ="http://www.w3.org/2001/XMLSchema"
              xmlns:sdf="http://www.gael.fr/2005/04/drb/sdf"
              elementFormDefault="qualified"
              attributeFormDefault="unqualified">

      <xs:element name="YEAR">
         <xs:simpleType>
            <xs:annotation>
               <xs:appinfo>
                  <sdf:block>
                     <sdf:encoding>BINARY</sdf:encoding>
                     <sdf:length>4</sdf:length>
                  </sdf:block>
               </xs:appinfo>
            </xs:annotation>
            <xs:restriction base="xs:int"/>
         </xs:simpleType>
      </xs:element>
 
   </xs:schema>

The fr.gael.drb.impl.sds package provides all classes necessary to browse an entire binary or ASCII document. It contains SdfFactory class which implements DrbFactoryImpl and DrbUpdateImpl interfaces and fr.gael.drb.impl.sds.SdfNode class which implements DrbNode, DrbNodesChangeListener and DrbNodesChangeProducer interfaces. Moreover, some extra classes are required such as SdfViewDescriptor which call the schema representation.

The supported SDF markups are listed using the following command line:

java -jar [DRB_INSTALLATION_HOME]/lib/java/drb-[M]-[m]-[t].jar --help sdf

This command line also returns the SDF namespace.


Data Request Broker - DRB API®
2-3-release

Copyright© 2001-2009 GAEL Consultant. All rights reserved. Use is subject to license terms .