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

All Superinterfaces:
ArtifactProcessor<M>
All Known Implementing Classes:
AnyAttributeProcessor, ExtensibleStAXAttributeProcessor

public interface StAXAttributeProcessor<M>
extends ArtifactProcessor<M>

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


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

Method Detail

read

M read(javax.xml.namespace.QName attributeName,
       javax.xml.stream.XMLStreamReader reader)
       throws ContributionReadException,
              javax.xml.stream.XMLStreamException
Reads a model from an XMLStreamReader.

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

write

void write(M model,
           javax.xml.stream.XMLStreamWriter writer)
           throws ContributionWriteException,
                  javax.xml.stream.XMLStreamException
Writes a model to an XMLStreamWriter.

Parameters:
model - A model representing the source
writer - The XML stream writer
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