org.overlord.sramp.common.derived
Class XsdDeriver

java.lang.Object
  extended by org.overlord.sramp.common.derived.AbstractXmlDeriver
      extended by org.overlord.sramp.common.derived.XsdDeriver
All Implemented Interfaces:
ArtifactDeriver
Direct Known Subclasses:
WsdlDeriver

public class XsdDeriver
extends AbstractXmlDeriver

Creates derived content from an XSD document. This will create the derived content as defined in the XML Schema model found in the s-ramp specification. The following derived artifact types will (potentially) be created:

Author:
eric.wittmann@redhat.com

Constructor Summary
XsdDeriver()
          Constructor.
 
Method Summary
protected  void configureNamespaceMappings(StaticNamespaceContext namespaceContext)
          Configures the namespace mappings that will be available when executing XPath queries.
protected  void derive(Collection<BaseArtifactType> derivedArtifacts, BaseArtifactType artifact, Element rootElement, XPath xpath)
          Derives content for the given artifact.
 void processSchema(Collection<BaseArtifactType> derivedArtifacts, BaseArtifactType artifact, Element schema, XPath xpath)
          Process the entire schema for all derived content.
 
Methods inherited from class org.overlord.sramp.common.derived.AbstractXmlDeriver
createDerivedArtifactCollection, derive, query
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XsdDeriver

public XsdDeriver()
Constructor.

Method Detail

configureNamespaceMappings

protected void configureNamespaceMappings(StaticNamespaceContext namespaceContext)
Description copied from class: AbstractXmlDeriver
Configures the namespace mappings that will be available when executing XPath queries.

Overrides:
configureNamespaceMappings in class AbstractXmlDeriver
See Also:
org.overlord.sramp.common.repository.derived.AbstractXmlDeriver#configureNamespaceMappings(org.overlord.sramp.common.query.xpath.StaticNamespaceContext)

derive

protected void derive(Collection<BaseArtifactType> derivedArtifacts,
                      BaseArtifactType artifact,
                      Element rootElement,
                      XPath xpath)
               throws IOException
Description copied from class: AbstractXmlDeriver
Derives content for the given artifact.

Specified by:
derive in class AbstractXmlDeriver
Throws:
IOException
See Also:
AbstractXmlDeriver.derive(java.util.Collection, org.s_ramp.xmlns._2010.s_ramp.BaseArtifactType, org.w3c.dom.Element, javax.xml.xpath.XPath)

processSchema

public void processSchema(Collection<BaseArtifactType> derivedArtifacts,
                          BaseArtifactType artifact,
                          Element schema,
                          XPath xpath)
                   throws XPathExpressionException
Process the entire schema for all derived content.

Parameters:
derivedArtifacts -
artifact -
schema -
xpath -
Throws:
XPathExpressionException


Copyright © 2011-2013 JBoss, a division of Red Hat. All Rights Reserved.