org.apache.tuscany.sca.contribution.xml
Class ContributionMetadataDocumentProcessor

java.lang.Object
  extended by org.apache.tuscany.sca.contribution.xml.ContributionMetadataDocumentProcessor
All Implemented Interfaces:
ArtifactProcessor<ContributionMetadata>, URLArtifactProcessor<ContributionMetadata>
Direct Known Subclasses:
ContributionGeneratedMetadataDocumentProcessor

public class ContributionMetadataDocumentProcessor
extends java.lang.Object
implements URLArtifactProcessor<ContributionMetadata>

URLArtifactProcessor that handles sca-contribution.xml files.


Constructor Summary
ContributionMetadataDocumentProcessor(ModelFactoryExtensionPoint modelFactories, StAXArtifactProcessor staxProcessor, Monitor monitor)
           
ContributionMetadataDocumentProcessor(javax.xml.stream.XMLInputFactory inputFactory, StAXArtifactProcessor staxProcessor, Monitor monitor)
           
 
Method Summary
 java.lang.String getArtifactType()
          Returns the type of artifact handled by this artifact processor.
 java.lang.Class<ContributionMetadata> getModelType()
          Returns the type of model handled by this artifact processor.
 ContributionMetadata read(java.net.URL contributionURL, java.net.URI uri, java.net.URL url)
          Reads a model from a URL.
 void resolve(ContributionMetadata contribution, ModelResolver resolver)
          Resolve references from this model to other models.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContributionMetadataDocumentProcessor

public ContributionMetadataDocumentProcessor(javax.xml.stream.XMLInputFactory inputFactory,
                                             StAXArtifactProcessor staxProcessor,
                                             Monitor monitor)

ContributionMetadataDocumentProcessor

public ContributionMetadataDocumentProcessor(ModelFactoryExtensionPoint modelFactories,
                                             StAXArtifactProcessor staxProcessor,
                                             Monitor monitor)
Method Detail

getArtifactType

public java.lang.String getArtifactType()
Description copied from interface: URLArtifactProcessor
Returns the type of artifact handled by this artifact processor.

Specified by:
getArtifactType in interface URLArtifactProcessor<ContributionMetadata>
Returns:
The type of artifact handled by this artifact processor

getModelType

public java.lang.Class<ContributionMetadata> getModelType()
Description copied from interface: ArtifactProcessor
Returns the type of model handled by this artifact processor.

Specified by:
getModelType in interface ArtifactProcessor<ContributionMetadata>
Returns:
The type of model handled by this artifact processor

read

public ContributionMetadata read(java.net.URL contributionURL,
                                 java.net.URI uri,
                                 java.net.URL url)
                          throws ContributionReadException
Description copied from interface: URLArtifactProcessor
Reads a model from a URL.

Specified by:
read in interface URLArtifactProcessor<ContributionMetadata>
Parameters:
contributionURL - Contribution location URL
uri - Artifact URI
url - Artifact location URL
Returns:
A model representation of the input.
Throws:
ContributionReadException

resolve

public void resolve(ContributionMetadata contribution,
                    ModelResolver resolver)
             throws ContributionResolveException
Description copied from interface: ArtifactProcessor
Resolve references from this model to other models. For example references from a composite to another one, or references from a composite to a WSDL model.

Specified by:
resolve in interface ArtifactProcessor<ContributionMetadata>
Parameters:
contribution - The model to resolve
resolver - The resolver to use to resolve referenced models
Throws:
ContributionResolveException