|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.equanda.subjectory.DataContainerAdapter
public abstract class DataContainerAdapter
Adapter class for creating specific data container classes.
Field Summary | |
---|---|
protected HashMap<String,Node> |
containerMap
|
static String |
DEFAULT_CONTAINER
|
protected XPathFactory |
xPathFactory
|
Constructor Summary | |
---|---|
DataContainerAdapter()
|
Method Summary | |
---|---|
byte[] |
getAttachment(String s)
Get an attachment which is part of the data container by specifying the (relative) filename within the container. |
Node |
getContainer(String container)
Get xml dom tree for the specified container. |
protected Document |
getDom(File dir,
String fileName)
|
NodeList |
getNodeList(String container,
String xPathExpr)
Get the list of nodes which are referenced by the given xpath expression in the (current location in) the given container. |
String |
getString(String container,
String xPathExpr)
Get the string which is referenced by the given xpath expression in the (current location in) the given container. |
protected Object |
getXPath(String container,
String xPathExpr,
QName xPathType)
|
void |
setContainer(String container,
Node node)
Set xml tree for a container. |
protected abstract void |
setNameSpaceContext(XPath xPath)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.equanda.subjectory.DataContainer |
---|
getContainerType |
Field Detail |
---|
public static final String DEFAULT_CONTAINER
protected HashMap<String,Node> containerMap
protected XPathFactory xPathFactory
Constructor Detail |
---|
public DataContainerAdapter()
Method Detail |
---|
protected Document getDom(File dir, String fileName)
protected abstract void setNameSpaceContext(XPath xPath)
public String getString(String container, String xPathExpr)
DataContainer
getString
in interface DataContainer
container
- name of the container to search inxPathExpr
- xpath expression to evaluate
public NodeList getNodeList(String container, String xPathExpr)
DataContainer
getNodeList
in interface DataContainer
container
- name of the container to search inxPathExpr
- xpath expression to evaluate
protected Object getXPath(String container, String xPathExpr, QName xPathType)
public Node getContainer(String container)
DataContainer
getContainer
in interface DataContainer
container
- container identifier or null for "Default" container
public void setContainer(String container, Node node)
DataContainer
setContainer
in interface DataContainer
container
- container identifier or null for "Default" containernode
- dom tree to setpublic byte[] getAttachment(String s)
DataContainer
getAttachment
in interface DataContainer
s
- filename inside data container
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |