- 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>currentNodeStackprivate @NotNull LoaderContextloaderContextprivate @NotNull NodeSuppliernodeSupplierprivate @NotNull ParsedDocumentparsedDocumentprivate ParsedElementrootNodeprivate @NotNull java.util.List<@NotNull Style>styleElementsprivate @NotNull java.util.List<@NotNull StyleSheet>styleSheetsprivate @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 voidaddTextContent(char @NotNull [] characterData, int startOffset, int endOffset)@NotNull SVGDocumentbuild()voidendDocument()voidendElement(@NotNull java.lang.String tagName)private voidflushText(@NotNull ParsedElement element, boolean segmentBreak)private intnestingDepthOf(@NotNull SVGNode node, @NotNull java.util.Map<SVGNode,java.lang.Integer> checkedNodes)(package private) @NotNull ParsedDocumentparsedDocument()(package private) voidpreProcess()private voidprocessStyleSheets()voidstartDocument()booleanstartElement(@NotNull java.lang.String tagName, @NotNull java.util.Map<java.lang.String,java.lang.String> attributes)private voidvalidatePathCount()private voidvalidateUseElementsDepth()
-
-
-
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()
-
-