org.purl.xnode
Interface XNodeCollectionFactory

All Superinterfaces:
XNodeFactory
All Known Implementing Classes:
XNodeCollectionFactoryImpl

public interface XNodeCollectionFactory
extends XNodeFactory

An interface for a factory for creating XNodeCollections.

The XNode API (the package org.purl.xnode.*, both its source code and documentation), are released under the Apache 2.0 License. For more details, check the LICENSE file contained with the distribution, or see The Ceryle Project for more information. It is distributed with no warranty.

Since:
XNode 1.2
Version:
$Id: XNodeCollectionFactory.java,v 3.2 2007-06-15 12:10:37 altheim Exp $
Author:
Murray Altheim
See Also:
XNodeCollection

Method Summary
 XNodeCollection createXNodeCollection(String cid, Node node)
          Return an XNodeCollection provided a String id and its DOM Node node content.
 Node getXNodeContent(XNode xnode, boolean includeEnvelope)
          Returns a DOM node representation of the provided XNode, including the XNode envelope if includeEnvelope is true.
 XNodeCollection recreateXNodeCollection(String cid, String content)
          Returns an XNodeCollection provided a String containing its content, assuming the provided content is a serialization of an XNodeCollection.
 
Methods inherited from interface org.purl.xnode.XNodeFactory
createXNode, createXNode, recreateXNode, serializeXNode, serializeXNode
 

Method Detail

createXNodeCollection

XNodeCollection createXNodeCollection(String cid,
                                      Node node)
                                      throws XNodeException
Return an XNodeCollection provided a String id and its DOM Node node content.

Parameters:
cid - the XNodeCollection ID. e @param node the DOM Node to be enclosed in the XNodeCollection.
Returns:
the created XNode.
Throws:
XNodeException - if an error occurs during creation.

recreateXNodeCollection

XNodeCollection recreateXNodeCollection(String cid,
                                        String content)
                                        throws XNodeException
Returns an XNodeCollection provided a String containing its content, assuming the provided content is a serialization of an XNodeCollection.

Parameters:
cid - the XNodeCollection ID.
content - the String to be processed as XNode content.
Returns:
the recreated XNode.
Throws:
XNodeException - if an error occurs during recreation.

getXNodeContent

Node getXNodeContent(XNode xnode,
                     boolean includeEnvelope)
                     throws XNodeException
Returns a DOM node representation of the provided XNode, including the XNode envelope if includeEnvelope is true. This overrides the method in XNodeFactoryImpl.

Specified by:
getXNodeContent in interface XNodeFactory
Parameters:
xnode - the XNode to process.
includeEnvelope - when true, include the entire XNode (XML) envelope.
Returns:
a DOM Document representation of the XNode.
Throws:
XNodeException - if an error occurs during processing.


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.