Package org.eclipse.jgit.gitrepo
Class ManifestParser
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.eclipse.jgit.gitrepo.ManifestParser
-
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
public class ManifestParser extends DefaultHandler
Repo XML manifest parser.- Since:
- 4.0
- See Also:
- git-repo project page
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ManifestParser.IncludedFileReader
A callback to read included xml files.
-
Constructor Summary
Constructors Constructor Description ManifestParser(ManifestParser.IncludedFileReader includedReader, String filename, String defaultBranch, String baseUrl, String groups, Repository rootRepo)
Constructor for ManifestParser
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endDocument()
void
endElement(String uri, String localName, String qName)
List<RepoProject>
getFilteredProjects()
Getter for filterdProjects.List<RepoProject>
getProjects()
Getter for projects.void
read(InputStream inputStream)
Read the xml file.void
startElement(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, warning
-
-
-
-
Constructor Detail
-
ManifestParser
public ManifestParser(ManifestParser.IncludedFileReader includedReader, String filename, String defaultBranch, String baseUrl, String groups, Repository rootRepo)
Constructor for ManifestParser- Parameters:
includedReader
- aManifestParser.IncludedFileReader
object.filename
- aString
object.defaultBranch
- aString
object.baseUrl
- aString
object.groups
- aString
object.rootRepo
- aRepository
object.
-
-
Method Detail
-
read
public void read(InputStream inputStream) throws IOException
Read the xml file.- Parameters:
inputStream
- aInputStream
object.- Throws:
IOException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
endElement
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXException
- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classDefaultHandler
- Throws:
SAXException
-
getProjects
public List<RepoProject> getProjects()
Getter for projects.- Returns:
- projects list reference, never null
-
getFilteredProjects
@NonNull public List<RepoProject> getFilteredProjects()
Getter for filterdProjects.- Returns:
- filtered projects list reference, never null
-
-