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 interface
A callback to read included xml files.private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final URI
private RepoProject
private final String
private String
private String
private final String
private final List<RepoProject>
private final ManifestParser.IncludedFileReader
private final List<RepoProject>
private final Map<String,
ManifestParser.Remote> private final Repository
private int
-
Constructor Summary
ConstructorsConstructorDescriptionManifestParser
(ManifestParser.IncludedFileReader includedReader, String filename, String defaultBranch, String baseUrl, String groups, Repository rootRepo) Constructor for ManifestParser -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
endElement
(String uri, String localName, String qName) Getter for filterdProjects.Getter for projects.(package private) boolean
inGroups
(RepoProject proj) private boolean
isNestedReferencefile
(RepoProject.ReferenceFile referencefile) (package private) static URI
void
read
(InputStream inputStream) Read the xml file.private void
(package private) void
Remove projects that are not in our desired groups.(package private) void
Remove projects that sits in a subdirectory of any other project.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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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.IncludedFileReader
object.filename
- aString
object.defaultBranch
- aString
object.baseUrl
- aString
object.groups
- aString
object.rootRepo
- aRepository
object.
-
-
Method Details
-
read
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
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-
endDocument
- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in 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
-