|
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.id.dom.IdParser
public class IdParser
Utility class for creating SMILA record Ids from DOM elements.
| Field Summary | |
|---|---|
static java.lang.String |
ATTRIBUTE_NAME
attribute name of key name attribtue: "name". |
static java.lang.String |
ATTRIBUTE_VERSION
attribute name of version attribtue: "version". |
static java.lang.String |
NAMESPACE_ID
SMILA Id XML namespace URI, "http://www.eclipse.org/smila/id". |
static java.lang.String |
TAG_ELEMENT
local tag name of container element elements: "Element". |
static java.lang.String |
TAG_FRAGMENT
local tag name of fragment elements: "Fragment". |
static java.lang.String |
TAG_ID
lcoal tag name of Id elements: "Id". |
static java.lang.String |
TAG_IDLIST
local tag name of Id list elements: "IdList". |
static java.lang.String |
TAG_KEY
local tag name of key elements: "Key". |
static java.lang.String |
TAG_SOURCE
local tag name of source elements: "Source". |
| Constructor Summary | |
|---|---|
IdParser()
create IdParser with default Id factory. |
|
IdParser(IdFactory customFactory)
create IdParser with a given Id factory. |
|
| Method Summary | |
|---|---|
Id |
parseIdFrom(org.w3c.dom.Element idElement)
Expects a valid id:Id element and creates an Id object from it. |
Id |
parseIdFrom(java.lang.String xmlString)
Creates an Id object by parsing an Id xml representation. |
Id |
parseIdIn(org.w3c.dom.Element parentElement)
Find the first child Id element and parse the Id it describes. |
java.util.List<Id> |
parseIdsIn(org.w3c.dom.Element parentElement)
Find all child Id elements and parse the Id 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_ID
public static final java.lang.String TAG_ID
public static final java.lang.String TAG_IDLIST
public static final java.lang.String TAG_SOURCE
public static final java.lang.String TAG_KEY
public static final java.lang.String TAG_ELEMENT
public static final java.lang.String TAG_FRAGMENT
public static final java.lang.String ATTRIBUTE_VERSION
public static final java.lang.String ATTRIBUTE_NAME
| Constructor Detail |
|---|
public IdParser()
public IdParser(IdFactory customFactory)
customFactory - the Id factory to use for creating the Id object.| Method Detail |
|---|
public Id parseIdIn(org.w3c.dom.Element parentElement)
parentElement - the element under which to search for Ids
public java.util.List<Id> parseIdsIn(org.w3c.dom.Element parentElement)
parentElement - the element under which to search for Ids
public Id parseIdFrom(org.w3c.dom.Element idElement)
idElement - an id:Id element to parse.
public Id parseIdFrom(java.lang.String xmlString)
throws javax.xml.parsers.ParserConfigurationException,
java.io.IOException,
org.xml.sax.SAXException
xmlString - the xml string to parse
javax.xml.parsers.ParserConfigurationException - if any error occurs while parsing
java.io.IOException - if any error occurs while parsing
org.xml.sax.SAXException - if any error occurs while parsing
|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||