com.edustructures.sifworks.tools.metadata
Class ADKMetadata

java.lang.Object
  extended by com.edustructures.sifworks.tools.metadata.ADKMetadata

public class ADKMetadata
extends java.lang.Object


Field Summary
static byte MD_REPEATABLE
          Metadata flag: Identifies a repeatable element
 
Method Summary
 ElementDef defineAttribute(ElementDef parent, java.lang.String name, int sequence, SIFVersion earliestVersion)
          Define an attribute of a SIF Data Object.
 ElementDef defineChildElement(ElementDef parent, ElementDef element, int sequence, byte flags, SIFVersion earliestVersion)
          Define a complex child element of a SIF Data Object.
 ElementDef defineDataObject(java.lang.String name, SIFVersion earliestVersion)
          Define a top-level SIF Data Object.
 ElementDef defineElement(java.lang.String name, SIFVersion earliestVersion)
          Define a complex element.
 ElementDef defineField(ElementDef parent, java.lang.String name, int sequence, byte flags, SIFVersion earliestVersion)
          Define a field of a SIF Data Object.
static ADKMetadata getInstance()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MD_REPEATABLE

public static final byte MD_REPEATABLE
Metadata flag: Identifies a repeatable element

See Also:
Constant Field Values
Method Detail

getInstance

public static ADKMetadata getInstance()

defineDataObject

public ElementDef defineDataObject(java.lang.String name,
                                   SIFVersion earliestVersion)
Define a top-level SIF Data Object.

Parameters:
name - The tag name of the data object
earliestVersion - The earliest version of the specification this object should be recognized in
Returns:
An ElementDef instance encapsulating metadata for this data object

defineElement

public ElementDef defineElement(java.lang.String name,
                                SIFVersion earliestVersion)
Define a complex element.

A complex element has attributes and/or elements of its own and is represented by its own class. Complex elements must be defined with this method, and then added as a child element to a SIF Data Object by calling defineChildElement(com.edustructures.sifworks.ElementDef, com.edustructures.sifworks.ElementDef, int, byte, com.edustructures.sifworks.SIFVersion).

Parameters:
name - The tag name of the element
earliestVersion - The earliest version of the specification this element should be recognized in
Returns:
An ElementDef instance encapsulating metadata for this element

defineAttribute

public ElementDef defineAttribute(ElementDef parent,
                                  java.lang.String name,
                                  int sequence,
                                  SIFVersion earliestVersion)
Define an attribute of a SIF Data Object.

Parameters:
parent - The ElementDef constant identifying the parent data object
name - The tag name of the attribute
sequence - The zero-based sequence number of the attribute
earliestVersion - The earliest version of the specification this attribute should be recognized in
Returns:
An ElementDef instance encapsulating metadata for this attribute

defineField

public ElementDef defineField(ElementDef parent,
                              java.lang.String name,
                              int sequence,
                              byte flags,
                              SIFVersion earliestVersion)
Define a field of a SIF Data Object.

A field is a simple child element that has no attributes or elements of its own and is not represented by its own class. For example, the <LocalId> common element in SIF 1.5. Internally, the ADK stores fields more efficiently than complex elements.

Parameters:
parent - The ElementDef constant identifying the parent data object or element
name - The tag name of the element
sequence - The zero-based sequence number of the element
flags - Optional flags for this field (e.g. MD_REPEATABLE), or zero if no flags are applicable
earliestVersion - The earliest version of the specification this element should be recognized in
Returns:
An ElementDef instance encapsulating metadata for this element

defineChildElement

public ElementDef defineChildElement(ElementDef parent,
                                     ElementDef element,
                                     int sequence,
                                     byte flags,
                                     SIFVersion earliestVersion)
Define a complex child element of a SIF Data Object.

The child element must be an existing element, such as a Common Element (e.g. SIFDTD.NAME)

Parameters:
parent - The ElementDef constant identifying the parent data object or element
element - The ElementDef constant of an existing element, such as a Common Element (e.g. SIFDTD.NAME)
sequence - The zero-based sequence number of the element
flags - Optional flags for this field (e.g. MD_REPEATABLE), or zero if no flags are applicable
earliestVersion - The earliest version of the specification this element should be recognized in
Returns:
An ElementDef instance encapsulating metadata for this element


Copyright © 2001-2007 Edustructures LLC. All Rights Reserved. SIFWorks® and ADK® are registered trademarks of Edustructures LLC. SIF™ and Schools Interoperability Framework are trademarks of the Schools Interoperability Framework Association.