- java.lang.Object
-
- com.github.weisj.jsvg.parser.impl.SVGDocumentBuilder
-
public final class SVGDocumentBuilder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private @NotNull java.util.Deque<@NotNull ParsedElement>
currentNodeStack
private @NotNull LoaderContext
loaderContext
private @NotNull NodeSupplier
nodeSupplier
private @NotNull ParsedDocument
parsedDocument
private ParsedElement
rootNode
private @NotNull java.util.List<@NotNull Style>
styleElements
private @NotNull java.util.List<@NotNull StyleSheet>
styleSheets
private @NotNull java.util.List<@NotNull Use>
useElements
-
Constructor Summary
Constructors Constructor Description SVGDocumentBuilder(@Nullable java.net.URI rootURI, @NotNull LoaderContext loaderContext, @NotNull NodeSupplier nodeSupplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTextContent(char @NotNull [] characterData, int startOffset, int endOffset)
@NotNull SVGDocument
build()
void
endDocument()
void
endElement(@NotNull java.lang.String tagName)
private void
flushText(@NotNull ParsedElement element, boolean segmentBreak)
private int
nestingDepthOf(@NotNull SVGNode node, @NotNull java.util.Map<SVGNode,java.lang.Integer> checkedNodes)
(package private) @NotNull ParsedDocument
parsedDocument()
(package private) void
preProcess()
private void
processStyleSheets()
void
startDocument()
boolean
startElement(@NotNull java.lang.String tagName, @NotNull java.util.Map<java.lang.String,java.lang.String> attributes)
private void
validatePathCount()
private void
validateUseElementsDepth()
-
-
-
Field Detail
-
parsedDocument
@NotNull private final @NotNull ParsedDocument parsedDocument
-
useElements
@NotNull private final @NotNull java.util.List<@NotNull Use> useElements
-
styleElements
@NotNull private final @NotNull java.util.List<@NotNull Style> styleElements
-
styleSheets
@NotNull private final @NotNull java.util.List<@NotNull StyleSheet> styleSheets
-
currentNodeStack
@NotNull private final @NotNull java.util.Deque<@NotNull ParsedElement> currentNodeStack
-
loaderContext
@NotNull private final @NotNull LoaderContext loaderContext
-
nodeSupplier
@NotNull private final @NotNull NodeSupplier nodeSupplier
-
rootNode
private ParsedElement rootNode
-
-
Constructor Detail
-
SVGDocumentBuilder
public SVGDocumentBuilder(@Nullable @Nullable java.net.URI rootURI, @NotNull @NotNull LoaderContext loaderContext, @NotNull @NotNull NodeSupplier nodeSupplier)
-
-
Method Detail
-
parsedDocument
@Internal @NotNull @NotNull ParsedDocument parsedDocument()
-
startDocument
public void startDocument()
-
endDocument
public void endDocument()
-
startElement
public boolean startElement(@NotNull @NotNull java.lang.String tagName, @NotNull @NotNull java.util.Map<java.lang.String,java.lang.String> attributes)
-
addTextContent
public void addTextContent(char @NotNull [] characterData, int startOffset, int endOffset)
-
endElement
public void endElement(@NotNull @NotNull java.lang.String tagName)
-
flushText
private void flushText(@NotNull @NotNull ParsedElement element, boolean segmentBreak)
-
preProcess
void preProcess()
-
build
@NotNull public @NotNull SVGDocument build()
-
processStyleSheets
private void processStyleSheets()
-
validatePathCount
private void validatePathCount()
-
validateUseElementsDepth
private void validateUseElementsDepth()
-
-