|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.datamodel.record.dom.RecordParser
public class RecordParser
Utility class for creating SMILA records from DOM elements.
| Field Summary | |
|---|---|
static java.lang.String |
ATTRIBUTE_NAME
attribute name of name attribute: "n". |
static java.lang.String |
ATTRIBUTE_SEMANTICTYPE
attribute name of semantic type attribute: "st". |
static java.lang.String |
ATTRIBUTE_TYPE
attribute name of type attribute: "type". |
static java.lang.String |
ATTRIBUTE_VERSION
attribute name of version attribute: "version". |
static java.lang.String |
NAMESPACE_RECORD
SMILA Record XML namespace URI, "http://www.eclipse.org/smila/record". |
static java.lang.String |
TAG_ANNOTATION
local name of Annotation element: "An". |
static java.lang.String |
TAG_ATTACHMENT
local name of Attachment element: "Attachment". |
static java.lang.String |
TAG_ATTRIBUTE
local name of Attribute element: "A". |
static java.lang.String |
TAG_LITERAL
local name of Value element: "L". |
static java.lang.String |
TAG_OBJECT
local name of Value element: "O". |
static java.lang.String |
TAG_RECORD
local name of Record element: "Record". |
static java.lang.String |
TAG_RECORDLIST
local name of RecordList element: "RecordList". |
static java.lang.String |
TAG_VALUE
local name of Value element: "V". |
| Constructor Summary | |
|---|---|
RecordParser()
Create parser using default factories for records and IDs. |
|
RecordParser(RecordFactory recordFactory,
IdFactory idFactory)
Create parser with custom factories for records and IDs. |
|
| Method Summary | |
|---|---|
void |
parseAnnotation(Annotatable annotatable,
org.w3c.dom.Element annotationElement)
parse an rec:Annotation element and create an Annotation object. |
Record |
parseRecordFrom(org.w3c.dom.Element recordElement)
create a record from a rec:Record element. |
Record |
parseRecordIn(org.w3c.dom.Element parentElement)
find the first child rec:Record element the specified parent element and create a Record from it. |
java.util.List<Record> |
parseRecordsIn(org.w3c.dom.Element parentElement)
Find all child rec:Record elements that are child of this specified element and parse the record it describes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String NAMESPACE_RECORD
public static final java.lang.String TAG_RECORD
public static final java.lang.String TAG_RECORDLIST
public static final java.lang.String TAG_ATTRIBUTE
public static final java.lang.String TAG_ANNOTATION
public static final java.lang.String TAG_LITERAL
public static final java.lang.String TAG_OBJECT
public static final java.lang.String TAG_VALUE
public static final java.lang.String TAG_ATTACHMENT
public static final java.lang.String ATTRIBUTE_VERSION
public static final java.lang.String ATTRIBUTE_NAME
public static final java.lang.String ATTRIBUTE_TYPE
public static final java.lang.String ATTRIBUTE_SEMANTICTYPE
| Constructor Detail |
|---|
public RecordParser()
public RecordParser(RecordFactory recordFactory,
IdFactory idFactory)
recordFactory - custom record factory.idFactory - custom id factory.| Method Detail |
|---|
public Record parseRecordIn(org.w3c.dom.Element parentElement)
parentElement - parent element of rec:Record
public java.util.List<Record> parseRecordsIn(org.w3c.dom.Element parentElement)
parentElement - the element under which to search for recordss
public Record parseRecordFrom(org.w3c.dom.Element recordElement)
recordElement - an rec:Record element.
public void parseAnnotation(Annotatable annotatable,
org.w3c.dom.Element annotationElement)
annotatable - object to annotate.annotationElement - the element to parse
|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||