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
Repo XML manifest parser.
- Since:
- 4.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA callback to read included xml files.private static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final URIprivate RepoProjectprivate final Stringprivate Stringprivate Stringprivate final Stringprivate final List<RepoProject>private final ManifestParser.IncludedFileReaderprivate final List<RepoProject>private final Map<String,ManifestParser.Remote> private final Repositoryprivate int -
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.(package private) booleaninGroups(RepoProject proj) private booleanisNestedReferencefile(RepoProject.ReferenceFile referencefile) (package private) static URIvoidread(InputStream inputStream) Read the xml file.private void(package private) voidRemove projects that are not in our desired groups.(package private) voidRemove projects that sits in a subdirectory of any other project.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
-
Field Details
-
filename
-
baseUrl
-
defaultBranch
-
rootRepo
-
remotes
-
plusGroups
-
minusGroups
-
projects
-
filteredProjects
-
includedReader
-
defaultRemote
-
defaultRevision
-
xmlInRead
private int xmlInRead -
currentProject
-
-
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
-
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
-
normalizeEmptyPath
-
getProjects
Getter for projects.- Returns:
- projects list reference, never null
-
getFilteredProjects
Getter for filterdProjects.- Returns:
- filtered projects list reference, never null
-
removeNotInGroup
void removeNotInGroup()Remove projects that are not in our desired groups. -
removeOverlaps
void removeOverlaps()Remove projects that sits in a subdirectory of any other project. -
removeNestedCopyAndLinkfiles
private void removeNestedCopyAndLinkfiles() -
inGroups
-
isNestedReferencefile
-