org.apache.axiom.ts.om.container
Class OMElementFactory

java.lang.Object
  extended by org.apache.axiom.ts.om.container.OMElementFactory
All Implemented Interfaces:
OMContainerFactory

public class OMElementFactory
extends Object
implements OMContainerFactory


Field Summary
 
Fields inherited from interface org.apache.axiom.ts.om.container.OMContainerFactory
DOCUMENT
 
Constructor Summary
OMElementFactory(boolean detached)
           
 
Method Summary
 void addTestProperties(AxiomTestCase testCase)
           
 XMLStreamReader filter(XMLStreamReader reader)
          Filter the given stream so that its content matches the content of the container returned by OMContainerFactory.getContainer(OMXMLParserWrapper).
 OMContainer getContainer(OMXMLParserWrapper builder)
          Extract the OMContainer from the given test file.
 InputSource getControl(InputStream testFileContent)
          Prepare a control document that has the same content as the container returned by OMContainerFactory.getContainer(OMXMLParserWrapper).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OMElementFactory

public OMElementFactory(boolean detached)
Method Detail

addTestProperties

public void addTestProperties(AxiomTestCase testCase)
Specified by:
addTestProperties in interface OMContainerFactory

getControl

public InputSource getControl(InputStream testFileContent)
                       throws Exception
Description copied from interface: OMContainerFactory
Prepare a control document that has the same content as the container returned by OMContainerFactory.getContainer(OMXMLParserWrapper).

Specified by:
getControl in interface OMContainerFactory
Parameters:
testFileContent - the content of the test file
Returns:
the InputSource for the control document
Throws:
Exception

getContainer

public OMContainer getContainer(OMXMLParserWrapper builder)
Description copied from interface: OMContainerFactory
Extract the OMContainer from the given test file.

Specified by:
getContainer in interface OMContainerFactory
Parameters:
builder - the builder for the test file
Returns:
the container

filter

public XMLStreamReader filter(XMLStreamReader reader)
Description copied from interface: OMContainerFactory
Filter the given stream so that its content matches the content of the container returned by OMContainerFactory.getContainer(OMXMLParserWrapper).

Specified by:
filter in interface OMContainerFactory
Parameters:
reader - the original stream reader representing the content of the test file
Returns:
the filtered stream reader


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.