|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ElementDef
Encapsulates metadata for a SIF element or attribute.
The ElementDef interface is fundamental to programming with the ADK. It's primarily used internally for parsing and rendering of SIF Data Objects across all versions of the SIF Specification, but is also used by in ADK programming to uniquely identify SIF Data Objects, elements, and attributes.
An instance of ElementDef captures the following characteristics of each XML element and attribute in the SIF data model:
| Method Summary | |
|---|---|
void |
defineVersionInfo(SIFVersion version,
java.lang.String tag,
int sequence,
int flags)
Add a version-specific definition of the tag to this ElementDef. |
java.util.List<ElementDef> |
getChildren()
Gets all of metadata objects defined as children of this metadata object |
java.lang.String |
getClassName()
The name of the class that encapsulates elements of this type. |
SIFVersion |
getEarliestVersion()
Gets the earliest version of SIF that supports the element or attribute described by this metadata |
java.lang.String |
getFQClassName()
Gets the fully-qualified Java class name of the class that encapsulates elements of this type. |
SIFVersion |
getLatestVersion()
Gets the latest version of SIF that supports the element or attribute described by this metadata |
java.lang.String |
getPackage()
Gets the package of the class that encapsulates elements of this type. |
ElementDef |
getParent()
Gets the parent metadata object, or null if this metadata describes a root-level SIF Data Object element |
ElementDef |
getRoot()
Gets the root metadata object |
java.lang.String |
getSDOPath()
Constructs a path to this ElementDef object, comprised of the names of its ancestry delimited by an underscore. |
int |
getSequence(SIFVersion version)
Gets the element sequence number |
java.lang.String |
getSQPPath(SIFVersion version)
Constructs a path to this element/attribute in the SIF Query Pattern format. |
SIFTypeConverter |
getTypeConverter()
Returns the type converter suitable for parsing the SIF XML value into the proper datatype |
ElementVersionInfo |
getVersionInfo(SIFVersion version)
Gets version-specific information for this element |
boolean |
hasSimpleContent()
Returns true if the element referenced contains simple content, such as a string or int |
boolean |
isAttribute(SIFVersion version)
Determines if this metadata describes an XML attribute |
boolean |
isCollapsed(SIFVersion version)
Determines if this element should not be written in this version of SIF, but that rather it's children should be written in it's place. |
boolean |
isDeprecated(SIFVersion version)
Determines if this metadata describes a deprecated element or attribute in this version of SIF |
boolean |
isDoNotEncode()
Determines if the content of this element can be automatically encoded when written to an output stream by the SIFWriter class when automatic encoding is enabled (the default behavior in ADK 1.5.1.0 and later). |
boolean |
isField()
Determines if this metadata describes a SIF field; that is, an element that has no children |
boolean |
isObject()
Determines if this metadata describes a root-level SIF Data Object |
boolean |
isRepeatable(SIFVersion version)
Determines if this metadata describes a repeatable element in this version of SIF |
boolean |
isSupported(SIFVersion version)
Determines if this metadata describes an element that is contained in the specified version of SIF. |
java.lang.String |
name()
Gets the version-independent name of this element or attribute. |
int |
sequence(SIFVersion version)
Gets the sequence number |
java.lang.String |
tag(SIFVersion version)
Gets the tag name |
| Method Detail |
|---|
java.lang.String name()
tag
method.
tag(com.edustructures.sifworks.SIFVersion)SIFTypeConverter getTypeConverter()
ElementVersionInfo getVersionInfo(SIFVersion version)
version - Identifies the version of SIF to return the version information for
java.lang.String tag(SIFVersion version)
version - Identifies the version of SIF to return the tag name for
int sequence(SIFVersion version)
version - Identifies the version of SIF to return the sequence number for
java.lang.String getSDOPath()
SIFDTD.lookupMetaData method.
Note the strings used in the path generated by this method are not
necessarily the same as the element or attribute tag names used in SIF
XML messages. Rather, they are version-independent names typically equal
to the tag name of the element in SIF 1.0r1.
java.lang.String getSQPPath(SIFVersion version)
version - Identifies the version of SIF to return the path for
ElementDef getParent()
java.util.List<ElementDef> getChildren()
ElementDef getRoot()
java.lang.String getClassName()
getFQClassName()java.lang.String getFQClassName()
getClassName(),
getPackage()java.lang.String getPackage()
getFQClassName()int getSequence(SIFVersion version)
version - The SIF Version to retrieve the sequence number for
boolean isAttribute(SIFVersion version)
version - The SIFVersion to use when checking if this object is an attribute
boolean isField()
boolean isObject()
boolean isSupported(SIFVersion version)
version - The version of the SIF Specification
TRUE if the metadata is included in the specified version of SIFboolean isDeprecated(SIFVersion version)
version - The SIFVersion to check
boolean isRepeatable(SIFVersion version)
version - The SIF version to check
boolean isCollapsed(SIFVersion version)
version -
boolean isDoNotEncode()
SIFVersion getEarliestVersion()
SIFVersion getLatestVersion()
void defineVersionInfo(SIFVersion version,
java.lang.String tag,
int sequence,
int flags)
version - A SIFVersion constant (other than SIF10r1, which is
implicitly defined by all ElementDef class constructors)tag - The element tag name for this version of SIFsequence - The sequence number for this version of SIFflags - One or more flags such as FD_DEPRECATEDboolean hasSimpleContent()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||