Class PartialFilePositioner
java.lang.Object
com.github.oowekyala.ooxml.messages.PartialFilePositioner
- All Implemented Interfaces:
XmlPositioner
- Direct Known Subclasses:
FullFilePositioner
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLinesAround(XmlPosition position, int numContextLines) Enrich the given message with the context of the position.startPositionOf(@Nullable Node node) Returns an object describing the position in the file of the given XML node.
-
Field Details
-
NUM_LINES_AROUND
private static final int NUM_LINES_AROUND- See Also:
-
textDoc
-
systemId
-
-
Constructor Details
-
PartialFilePositioner
-
-
Method Details
-
startPositionOf
Description copied from interface:XmlPositionerReturns an object describing the position in the file of the given XML node. If no position is available, or if the parameter is null, returns an undefined position.- Specified by:
startPositionOfin interfaceXmlPositioner- Parameters:
node- XML node- Returns:
- A position
-
getLinesAround
Description copied from interface:XmlPositionerEnrich the given message with the context of the position. Typically this adds the source lines of the source file around the error message.- Specified by:
getLinesAroundin interfaceXmlPositioner- Parameters:
position- Position of the errornumContextLines- Number of lines to include before and after- Returns:
- The full message
-