org.apache.tuscany.sca.contribution.processor
Interface StAXArtifactProcessor<M>

All Superinterfaces:
ArtifactProcessor<M>
All Known Implementing Classes:
ExtensibleStAXArtifactProcessor

public interface StAXArtifactProcessor<M>
extends ArtifactProcessor<M>

An artifact processor that can read models from a StAX XMLStreamReader.

Version:
$Rev: 539692 $ $Date: 2007-05-19 07:06:18 +0100 (Sat, 19 May 2007) $

Method Summary
 javax.xml.namespace.QName getArtifactType()
          Returns the type of artifact handled by this artifact processor.
 M read(javax.xml.stream.XMLStreamReader inputSource)
          Reads a model from an input source.
 void write(M model, javax.xml.stream.XMLStreamWriter outputSource)
          Writes a model to an ouput source.
 
Methods inherited from interface org.apache.tuscany.sca.contribution.processor.ArtifactProcessor
getModelType, resolve
 

Method Detail

read

M read(javax.xml.stream.XMLStreamReader inputSource)
       throws ContributionReadException,
              javax.xml.stream.XMLStreamException
Reads a model from an input source. Examples of input sources are: a URI, a DOM node, an XML reader.

Parameters:
inputSource - The input source
Returns:
A model representation of the input.
Throws:
ContributionReadException
javax.xml.stream.XMLStreamException

write

void write(M model,
           javax.xml.stream.XMLStreamWriter outputSource)
           throws ContributionWriteException,
                  javax.xml.stream.XMLStreamException
Writes a model to an ouput source. Examples of output sources are: a URI, a DOM node, an XML writer.

Parameters:
model - A model representing the source
outputSource - The output source
Throws:
ContributionWriteException
javax.xml.stream.XMLStreamException

getArtifactType

javax.xml.namespace.QName getArtifactType()
Returns the type of artifact handled by this artifact processor.

Returns:
The type of artifact handled by this artifact processor