java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.eclipse.jgit.gitrepo.ManifestParser
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
Repo XML manifest parser.
- Since:
- 4.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA callback to read included xml files. -
Constructor Summary
ConstructorsConstructorDescriptionManifestParser(ManifestParser.IncludedFileReader includedReader, String filename, String defaultBranch, String baseUrl, String groups, Repository rootRepo) Constructor for ManifestParser -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidendElement(String uri, String localName, String qName) Getter for filterdProjects.Getter for projects.voidread(InputStream inputStream) Read the xml file.voidstartElement(String uri, String localName, String qName, Attributes attributes) Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
ManifestParser
public ManifestParser(ManifestParser.IncludedFileReader includedReader, String filename, String defaultBranch, String baseUrl, String groups, Repository rootRepo) Constructor for ManifestParser- Parameters:
includedReader- aManifestParser.IncludedFileReaderobject.filename- aStringobject.defaultBranch- aStringobject.baseUrl- aStringobject.groups- aStringobject.rootRepo- aRepositoryobject.
-
-
Method Details
-
read
Read the xml file.- Parameters:
inputStream- aInputStreamobject.- Throws:
IOException- if an IO error occurred
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-
endDocument
- Specified by:
endDocumentin interfaceContentHandler- Overrides:
endDocumentin classDefaultHandler- Throws:
SAXException
-
getProjects
Getter for projects.- Returns:
- projects list reference, never null
-
getFilteredProjects
Getter for filterdProjects.- Returns:
- filtered projects list reference, never null
-