|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.co.wilson.xml.MinML2
org.apache.commons.jjar.RepositoryXML
public class RepositoryXML
Repository implementation that supports XML repository definitions. Uses a great small little lightweight SAX parser - but it's not clear what it doesn't support, so be careful
| Field Summary |
|---|
| Fields inherited from class uk.co.wilson.xml.MinML2 |
|---|
change, decLevel, defaultBufferIncrement, defaultInitialBufferSize, discardAndChange, discardSaveAndChange, emitCharacters, emitEndElement, emitStartElement, endCDATA, endComment, endStartName, exitParser, inAttribute, inAttribute1, inAttributeQuotesValue, inAttributeQuoteValue, inAttributeValue, inCDATA, inCDATA1, inCharData, incLevel, inComment, inDTD, inETag, inETag1, inMTTag, inNextAttribute, inPI, inPI1, inPossiblyAttribute, inPossiblySkipping, inSkipping, inSTag, inTag, parseError, processCharRef, saveAndChange, saveAttributeName, saveAttributeValue, startCDATA, startComment, writeCdata |
| Constructor Summary | |
|---|---|
RepositoryXML()
|
|
| Method Summary | |
|---|---|
void |
endElement(String namespaceURI,
String localName,
String qName)
end element event handler for SAX parsing |
void |
fatalError(SAXParseException e)
|
List |
getDependencyList(String pkg,
String version)
returns a list of dependencies for a given package. |
String |
getFetchTarget(String pkg,
String version)
returns the 'fetch' target (jarname) for the given package : version |
int |
getPackageCount()
returns the number of packages known to the repository |
String |
getPackageDefaultVersion(String pkg)
returns the default version of the package to the caller |
String |
getPackageDescription(String pkg)
returns the info/desc string to the caller |
Iterator |
getPackageListIter()
returns an iterator over the list of package names |
List |
getPackageVersionList(String pkg)
returns a list of the know versions available for this package |
String |
getProp(String s)
returns a given property not implemented |
boolean |
isPackage(String pkg)
determines if something is a known package |
void |
load(URL url)
loads the object with the XML data from the passed in URL. |
void |
load(URL url,
Map pkgMap)
|
static void |
main(String[] args)
used for debugging |
Writer |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts,
Writer writer)
start element event handler for SAX. |
| Methods inherited from class uk.co.wilson.xml.MinML2 |
|---|
characters, endDocument, endPrefixMapping, error, getColumnNumber, getContentHandler, getDefaultNamespace, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getLineNumber, getNamespace, getProperty, getPublicId, getSystemId, ignorableWhitespace, parse, parse, parse, processingInstruction, setContentHandler, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setProperty, skippedEntity, startDocument, startDocument, startElement, startPrefixMapping, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RepositoryXML()
| Method Detail |
|---|
public void load(URL url)
load in interface Repositoryurl - location of the repository.xml
public void load(URL url,
Map pkgMap)
public List getDependencyList(String pkg,
String version)
getDependencyList in interface Repositorypkg - package to get dep list for
public Iterator getPackageListIter()
getPackageListIter in interface Repositorypublic int getPackageCount()
getPackageCount in interface Repositorypublic String getPackageDefaultVersion(String pkg)
getPackageDefaultVersion in interface Repositorypublic String getPackageDescription(String pkg)
getPackageDescription in interface Repository
public String getFetchTarget(String pkg,
String version)
getFetchTarget in interface Repositorypublic boolean isPackage(String pkg)
isPackage in interface Repositorypublic String getProp(String s)
public List getPackageVersionList(String pkg)
getPackageVersionList in interface Repository
public Writer startElement(String namespaceURI,
String localName,
String qName,
Attributes atts,
Writer writer)
throws SAXException
startElement in class uk.co.wilson.xml.MinML2SAXException
public void endElement(String namespaceURI,
String localName,
String qName)
throws SAXException
endElement in interface ContentHandlerendElement in class uk.co.wilson.xml.MinML2SAXException
public void fatalError(SAXParseException e)
throws SAXException
fatalError in interface ErrorHandlerfatalError in class uk.co.wilson.xml.MinML2SAXExceptionpublic static void main(String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||