Interface DocViewParserHandler
- 
public interface DocViewParserHandlerHandler to be used withDocViewParser. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidendDocument()Called once when the end of a docview file has been reached.voidendDocViewNode(@NotNull java.lang.String nodePath, @NotNull DocViewNode2 docViewNode, @NotNull java.util.Optional<DocViewNode2> parentDocViewNode, int line, int column)Called at the end of each element in the docview xml representing a node.default voidendPrefixMapping(java.lang.String prefix)Called when a namespace mapping end in the docview xml.default voidsetNameResolver(NameResolver nameResolver)Called before the firststartDocViewNode(String, DocViewNode2, Optional, int, int)is called.voidstartDocViewNode(@NotNull java.lang.String nodePath, @NotNull DocViewNode2 docViewNode, @NotNull java.util.Optional<DocViewNode2> parentDocViewNode, int line, int column)Called for each element in the docview xml representing a nodedefault voidstartPrefixMapping(java.lang.String prefix, java.lang.String uri)Called when a namespace mapping is defined in the docview xml. 
 - 
 
- 
- 
Method Detail
- 
startDocViewNode
void startDocViewNode(@NotNull @NotNull java.lang.String nodePath, @NotNull @NotNull DocViewNode2 docViewNode, @NotNull @NotNull java.util.Optional<DocViewNode2> parentDocViewNode, int line, int column) throws java.io.IOException, javax.jcr.RepositoryExceptionCalled for each element in the docview xml representing a node- Parameters:
 nodePath- the absolute node path of the nodedocViewNode- the deserialized node (incl. its properties)parentDocViewNode- the parent deserialized node (only present ifdocViewNodeis not the root node in the docview xml)line- the current line number in the docview xmlcolumn- the current column number in the docview xml- Throws:
 java.io.IOExceptionjavax.jcr.RepositoryException
 
- 
endDocViewNode
void endDocViewNode(@NotNull @NotNull java.lang.String nodePath, @NotNull @NotNull DocViewNode2 docViewNode, @NotNull @NotNull java.util.Optional<DocViewNode2> parentDocViewNode, int line, int column) throws java.io.IOException, javax.jcr.RepositoryExceptionCalled at the end of each element in the docview xml representing a node. At this point in time all child nodes have been processed.- Parameters:
 nodePath- the absolute node path of the nodedocViewNode- the deserialized node (incl. its properties)parentDocViewNode- the parent deserialized node (only present ifdocViewNodeis not the root node in the docview xml)line- the current line number in the docview xmlcolumn- the current column number in the docview xml- Throws:
 java.io.IOExceptionjavax.jcr.RepositoryException
 
- 
endDocument
default void endDocument() throws javax.jcr.RepositoryException, java.io.IOExceptionCalled once when the end of a docview file has been reached.- Throws:
 javax.jcr.RepositoryExceptionjava.io.IOException
 
- 
startPrefixMapping
default void startPrefixMapping(java.lang.String prefix, java.lang.String uri)Called when a namespace mapping is defined in the docview xml. Rather usesetNameResolver(NameResolver)instead if you just need to resolve JCR names.- Parameters:
 prefix- the namespace prefixuri- the namespace uri
 
- 
endPrefixMapping
default void endPrefixMapping(java.lang.String prefix)
Called when a namespace mapping end in the docview xml. Rather usesetNameResolver(NameResolver)instead if you just need to resolve JCR names.- Parameters:
 prefix- the namespace prefix
 
- 
setNameResolver
default void setNameResolver(NameResolver nameResolver)
Called before the firststartDocViewNode(String, DocViewNode2, Optional, int, int)is called. Provides a NameResolver which can be used to resolve JCR names to their qualified form. Can be used instead of overwritingstartPrefixMapping(String, String)andendPrefixMapping(String).- Parameters:
 nameResolver- the resolver aware of all namespaces and their prefixes defined in the underlying XML document.
 
 - 
 
 -