org.equanda.subjectory
Interface DataContainer

All Known Implementing Classes:
DataContainerAdapter, XmlFileContainer

public interface DataContainer

Generic data container object

Author:
Brian Reynolds, Joachim Van der Auwera

Method Summary
 byte[] getAttachment(String filename)
          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.
 String getContainerType()
          Get container type identifier string.
 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.
 void setContainer(String container, Node node)
          Set xml tree for a container.
 

Method Detail

getContainerType

String getContainerType()
Get container type identifier string.

Returns:
container type identifier

getString

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.

Parameters:
container - name of the container to search in
xPathExpr - xpath expression to evaluate
Returns:
string result of null of not found

getNodeList

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.

Parameters:
container - name of the container to search in
xPathExpr - xpath expression to evaluate
Returns:
string result of null of not found

getContainer

Node getContainer(String container)
Get xml dom tree for the specified container.

Parameters:
container - container identifier or null for "Default" container
Returns:
dom tree

setContainer

void setContainer(String container,
                  Node node)
Set xml tree for a container.

Parameters:
container - container identifier or null for "Default" container
node - dom tree to set

getAttachment

byte[] getAttachment(String filename)
Get an attachment which is part of the data container by specifying the (relative) filename within the container.

Parameters:
filename - filename inside data container
Returns:
attachment contents


Copyright © 2007-2009. All Rights Reserved.