org.apache.tuscany.sca.contribution.processor
Class ExtensibleURLArtifactProcessor

java.lang.Object
  extended by org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor
All Implemented Interfaces:
ArtifactProcessor<java.lang.Object>, URLArtifactProcessor<java.lang.Object>

public class ExtensibleURLArtifactProcessor
extends java.lang.Object
implements URLArtifactProcessor<java.lang.Object>

The default implementation of a URL artifact processor.

Version:
$Rev: 537914 $ $Date: 2007-05-14 17:56:31 +0100 (Mon, 14 May 2007) $

Constructor Summary
ExtensibleURLArtifactProcessor(URLArtifactProcessorExtensionPoint processors)
          Constructs a new URL artifact processor.
 
Method Summary
 java.lang.String getArtifactType()
          Returns the type of artifact handled by this artifact processor.
 java.lang.Class<java.lang.Object> getModelType()
          Returns the type of model handled by this artifact processor.
 java.lang.Object read(java.net.URL contributionURL, java.net.URI sourceURI, java.net.URL sourceURL)
          Reads a model from an input source.
<MO> MO
read(java.net.URL contributionURL, java.net.URI artifactURI, java.net.URL artifactUrl, java.lang.Class<MO> type)
           
 void resolve(java.lang.Object model, ModelResolver resolver)
          Resolve references from this model to other models.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtensibleURLArtifactProcessor

public ExtensibleURLArtifactProcessor(URLArtifactProcessorExtensionPoint processors)
Constructs a new URL artifact processor.

Parameters:
processors -
Method Detail

read

public java.lang.Object read(java.net.URL contributionURL,
                             java.net.URI sourceURI,
                             java.net.URL sourceURL)
                      throws ContributionReadException
Description copied from interface: URLArtifactProcessor
Reads a model from an input source. Examples of input sources are: a URI, a DOM node, an XML reader.

Specified by:
read in interface URLArtifactProcessor<java.lang.Object>
Parameters:
contributionURL - Contribution location URL
sourceURI - Artifact URI
sourceURL - Artifact location URL
Returns:
A model representation of the input.
Throws:
ContributionReadException

resolve

public void resolve(java.lang.Object model,
                    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<java.lang.Object>
Parameters:
model - The model to resolve
resolver - The resolver to use to resolve referenced models
Throws:
ContributionResolveException

read

public <MO> MO read(java.net.URL contributionURL,
                    java.net.URI artifactURI,
                    java.net.URL artifactUrl,
                    java.lang.Class<MO> type)
        throws ContributionReadException
Throws:
ContributionReadException

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<java.lang.Object>
Returns:
The type of artifact handled by this artifact processor

getModelType

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

Specified by:
getModelType in interface ArtifactProcessor<java.lang.Object>
Returns:
The type of model handled by this artifact processor