kwin commented on a change in pull request #137:
URL:
https://github.com/apache/jackrabbit-filevault/pull/137#discussion_r633331995
##########
File path:
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/FileArtifactHandler.java
##########
@@ -218,29 +220,20 @@ public ImportInfoImpl accept(WorkspaceFilter wspFilter,
Node parent,
newSet.setCoverage(ItemFilterSet.INCLUDE_ALL);
// check import mode
- ImportMode mode = ImportMode.REPLACE;
- String path = PathUtil.getPath(newParent, newName);
- if (newName.length() == 0 || newParent.hasNode(newName)) {
- mode = wspFilter.getImportMode(path);
- }
- if (mode != ImportMode.MERGE) {
- try {
- DocViewSAXImporter handler = new
DocViewSAXImporter(newParent, newName, newSet, wspFilter);
- handler.setAclHandling(getAcHandling());
- handler.setCugHandling(getCugHandling());
- SAXParserFactory factory =
SAXParserFactory.newInstance();
- factory.setNamespaceAware(true);
-
factory.setFeature("http://xml.org/sax/features/namespace-prefixes", false);
- SAXParser parser = factory.newSAXParser();
- parser.parse(file.getInputSource(), handler);
- info.merge(handler.getInfo());
- } catch (ParserConfigurationException e) {
- throw new RepositoryException(e);
- } catch (SAXException e) {
- throw new RepositoryException(e);
- }
- } else {
- info.onNop(path);
+ try {
+ DocViewSAXImporter handler = new
DocViewSAXImporter(newParent, newName, newSet, wspFilter);
Review comment:
@tripodsan I couldn't construct a package where this handler was ever
used for docview xml. Do you have an example package structure. Although the
comment above mentions "full coverage files below a intermediate node" I
couldn't manage to create an Artifact `SerializationType.XML_DOCVIEW` which was
not `ArtifactType.PRIMARY`. Also for intermediate handling in
https://github.com/apache/jackrabbit-filevault/blob/a3ea981d88a3004bcbc05080ac4f44208696b087/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/io/Importer.java#L932
this handler is never used.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]