org.apache.ivy.plugins.parser.xml
Class XmlModuleDescriptorParser.Parser

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.AbstractParser
          extended by org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser.Parser
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
Enclosing class:
XmlModuleDescriptorParser

public static class XmlModuleDescriptorParser.Parser
extends AbstractModuleDescriptorParser.AbstractParser


Nested Class Summary
static class XmlModuleDescriptorParser.Parser.State
           
 
Field Summary
protected static java.util.List ALLOWED_VERSIONS
           
 
Constructor Summary
XmlModuleDescriptorParser.Parser(ModuleDescriptorParser parser, ParserSettings ivySettings)
           
 
Method Summary
protected  void addConfiguration(java.lang.String c)
           
protected  void addDependencyArtifacts(java.lang.String tag, org.xml.sax.Attributes attributes)
           
protected  void addExcludeRule(java.lang.String tag, org.xml.sax.Attributes attributes)
           
protected  void addIncludeRule(java.lang.String tag, org.xml.sax.Attributes attributes)
           
protected  void artifactStarted(java.lang.String qName, org.xml.sax.Attributes attributes)
           
 void characters(char[] ch, int start, int length)
           
protected  void checkConfigurations()
           
protected  void configurationStarted(org.xml.sax.Attributes attributes)
           
protected  void confStarted(org.xml.sax.Attributes attributes)
           
protected  void dependenciesStarted(org.xml.sax.Attributes attributes)
           
protected  void dependencyStarted(org.xml.sax.Attributes attributes)
           
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
           
protected  void extendsStarted(org.xml.sax.Attributes attributes)
           
protected  MDArtifact getArtifact()
           
protected  java.lang.StringBuffer getBuffer()
           
protected  java.lang.String getConf()
           
protected  ConfigurationAware getConfAware()
           
protected  DefaultDependencyDescriptor getDd()
           
protected  PatternMatcher getDefaultMatcher()
           
protected  java.lang.String getDefaultParentLocation()
           
protected  java.io.InputStream getDescriptorInput()
           
protected  java.net.URL getDescriptorURL()
           
protected  java.lang.String getDescriptorVersion()
           
protected  PatternMatcher getPatternMatcher(java.lang.String m)
           
protected  java.lang.String[] getPublicationsDefaultConf()
           
protected  java.net.URL getSchemaURL()
           
protected  ParserSettings getSettings()
           
protected  int getState()
           
protected  void includeConfStarted(org.xml.sax.Attributes attributes)
           
protected  void infoStarted(org.xml.sax.Attributes attributes)
           
protected  boolean isArtifactsDeclared()
           
protected  boolean isOtherNamespace(java.lang.String qName)
           
protected  boolean isValidate()
           
protected  void ivyModuleStarted(org.xml.sax.Attributes attributes)
           
protected  void managerStarted(org.xml.sax.Attributes attributes, java.lang.String managerAtt)
           
protected  void mediationOverrideStarted(org.xml.sax.Attributes attributes)
           
protected  void mergeAll(ModuleDescriptor parent)
           
protected  void mergeConfigurations(ModuleRevisionId sourceMrid, Configuration[] configurations)
           
protected  void mergeDependencies(DependencyDescriptor[] dependencies)
           
protected  void mergeDescription(java.lang.String description)
           
protected  void mergeInfo(ModuleDescriptor parent)
           
protected  void mergeWithOtherModuleDescriptor(java.util.List extendTypes, ModuleDescriptor parent)
           
 void parse()
           
protected  ModuleDescriptor parseOtherIvyFile(java.lang.String parentOrganisation, java.lang.String parentModule, java.lang.String parentRevision)
           
protected  ModuleDescriptor parseOtherIvyFileOnFileSystem(java.lang.String location)
           
protected  void parseRule(java.lang.String tag, org.xml.sax.Attributes attributes)
           
protected  void publicationsStarted(org.xml.sax.Attributes attributes)
           
protected  void replaceConfigurationWildcards()
           
protected  void setArtifact(MDArtifact artifact)
           
protected  void setArtifactsDeclared(boolean artifactsDeclared)
           
protected  void setBuffer(java.lang.StringBuffer buffer)
           
protected  void setConf(java.lang.String conf)
           
protected  void setConfAware(ConfigurationAware confAware)
           
protected  void setDd(DefaultDependencyDescriptor dd)
           
protected  void setDescriptorVersion(java.lang.String descriptorVersion)
           
 void setInput(java.io.InputStream descriptorInput)
           
 void setInput(java.net.URL descriptorURL)
           
protected  void setPublicationsDefaultConf(java.lang.String defaultConf)
           
protected  void setPublicationsDefaultConf(java.lang.String[] publicationsDefaultConf)
           
protected  void setState(int state)
           
 void setValidate(boolean validate)
           
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
           
 
Methods inherited from class org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.AbstractParser
addError, checkErrors, error, fatalError, getDefaultConf, getDefaultConfMapping, getDefaultConfMappingDescriptor, getDefaultPubDate, getMd, getModuleDescriptor, getModuleDescriptorParser, getResource, parseDepsConfs, parseDepsConfs, parseDepsConfs, parseDepsConfs, parseDepsConfs, setDefaultConf, setDefaultConfMapping, setMd, setResource, warning
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALLOWED_VERSIONS

protected static final java.util.List ALLOWED_VERSIONS
Constructor Detail

XmlModuleDescriptorParser.Parser

public XmlModuleDescriptorParser.Parser(ModuleDescriptorParser parser,
                                        ParserSettings ivySettings)
Method Detail

setInput

public void setInput(java.io.InputStream descriptorInput)

setInput

public void setInput(java.net.URL descriptorURL)

setValidate

public void setValidate(boolean validate)

parse

public void parse()
           throws java.text.ParseException,
                  java.io.IOException
Throws:
java.text.ParseException
java.io.IOException

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attributes)
                  throws org.xml.sax.SAXException
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

getDefaultParentLocation

protected java.lang.String getDefaultParentLocation()

extendsStarted

protected void extendsStarted(org.xml.sax.Attributes attributes)
                       throws java.text.ParseException
Throws:
java.text.ParseException

mergeWithOtherModuleDescriptor

protected void mergeWithOtherModuleDescriptor(java.util.List extendTypes,
                                              ModuleDescriptor parent)

mergeAll

protected void mergeAll(ModuleDescriptor parent)

mergeInfo

protected void mergeInfo(ModuleDescriptor parent)

mergeConfigurations

protected void mergeConfigurations(ModuleRevisionId sourceMrid,
                                   Configuration[] configurations)

mergeDependencies

protected void mergeDependencies(DependencyDescriptor[] dependencies)

mergeDescription

protected void mergeDescription(java.lang.String description)

parseOtherIvyFileOnFileSystem

protected ModuleDescriptor parseOtherIvyFileOnFileSystem(java.lang.String location)
                                                  throws java.text.ParseException,
                                                         java.io.IOException
Throws:
java.text.ParseException
java.io.IOException

parseOtherIvyFile

protected ModuleDescriptor parseOtherIvyFile(java.lang.String parentOrganisation,
                                             java.lang.String parentModule,
                                             java.lang.String parentRevision)
                                      throws java.text.ParseException
Throws:
java.text.ParseException

publicationsStarted

protected void publicationsStarted(org.xml.sax.Attributes attributes)

setPublicationsDefaultConf

protected void setPublicationsDefaultConf(java.lang.String defaultConf)

isOtherNamespace

protected boolean isOtherNamespace(java.lang.String qName)

managerStarted

protected void managerStarted(org.xml.sax.Attributes attributes,
                              java.lang.String managerAtt)

mediationOverrideStarted

protected void mediationOverrideStarted(org.xml.sax.Attributes attributes)

includeConfStarted

protected void includeConfStarted(org.xml.sax.Attributes attributes)
                           throws org.xml.sax.SAXException,
                                  java.io.IOException,
                                  javax.xml.parsers.ParserConfigurationException,
                                  java.text.ParseException
Throws:
org.xml.sax.SAXException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
java.text.ParseException

confStarted

protected void confStarted(org.xml.sax.Attributes attributes)

dependencyStarted

protected void dependencyStarted(org.xml.sax.Attributes attributes)

artifactStarted

protected void artifactStarted(java.lang.String qName,
                               org.xml.sax.Attributes attributes)
                        throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

dependenciesStarted

protected void dependenciesStarted(org.xml.sax.Attributes attributes)

configurationStarted

protected void configurationStarted(org.xml.sax.Attributes attributes)

infoStarted

protected void infoStarted(org.xml.sax.Attributes attributes)

ivyModuleStarted

protected void ivyModuleStarted(org.xml.sax.Attributes attributes)
                         throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

addDependencyArtifacts

protected void addDependencyArtifacts(java.lang.String tag,
                                      org.xml.sax.Attributes attributes)
                               throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

addIncludeRule

protected void addIncludeRule(java.lang.String tag,
                              org.xml.sax.Attributes attributes)
                       throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

addExcludeRule

protected void addExcludeRule(java.lang.String tag,
                              org.xml.sax.Attributes attributes)
                       throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

parseRule

protected void parseRule(java.lang.String tag,
                         org.xml.sax.Attributes attributes)
                  throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

addConfiguration

protected void addConfiguration(java.lang.String c)

getPatternMatcher

protected PatternMatcher getPatternMatcher(java.lang.String m)

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

checkConfigurations

protected void checkConfigurations()

replaceConfigurationWildcards

protected void replaceConfigurationWildcards()

getSettings

protected ParserSettings getSettings()

getDescriptorURL

protected java.net.URL getDescriptorURL()

getDescriptorInput

protected java.io.InputStream getDescriptorInput()

getState

protected int getState()

setState

protected void setState(int state)

getDefaultMatcher

protected PatternMatcher getDefaultMatcher()

getDd

protected DefaultDependencyDescriptor getDd()

setDd

protected void setDd(DefaultDependencyDescriptor dd)

getConfAware

protected ConfigurationAware getConfAware()

setConfAware

protected void setConfAware(ConfigurationAware confAware)

getArtifact

protected MDArtifact getArtifact()

setArtifact

protected void setArtifact(MDArtifact artifact)

getConf

protected java.lang.String getConf()

setConf

protected void setConf(java.lang.String conf)

isArtifactsDeclared

protected boolean isArtifactsDeclared()

setArtifactsDeclared

protected void setArtifactsDeclared(boolean artifactsDeclared)

getBuffer

protected java.lang.StringBuffer getBuffer()

setBuffer

protected void setBuffer(java.lang.StringBuffer buffer)

getDescriptorVersion

protected java.lang.String getDescriptorVersion()

setDescriptorVersion

protected void setDescriptorVersion(java.lang.String descriptorVersion)

getPublicationsDefaultConf

protected java.lang.String[] getPublicationsDefaultConf()

setPublicationsDefaultConf

protected void setPublicationsDefaultConf(java.lang.String[] publicationsDefaultConf)

isValidate

protected boolean isValidate()

getSchemaURL

protected java.net.URL getSchemaURL()