Class SVGDocumentBuilder

java.lang.Object
com.github.weisj.jsvg.parser.SVGDocumentBuilder

public final class SVGDocumentBuilder extends Object
  • Field Details

    • MAX_USE_NESTING_DEPTH

      private static final int MAX_USE_NESTING_DEPTH
      See Also:
    • parsedDocument

      @NotNull private final @NotNull ParsedDocument parsedDocument
    • useElements

      @NotNull private final @NotNull List<@NotNull Use> useElements
    • styleElements

      @NotNull private final @NotNull List<@NotNull Style> styleElements
    • styleSheets

      @NotNull private final @NotNull List<@NotNull StyleSheet> styleSheets
    • currentNodeStack

      @NotNull private final @NotNull Deque<@NotNull ParsedElement> currentNodeStack
    • parserProvider

      @NotNull private final @NotNull ParserProvider parserProvider
    • loadHelper

      @NotNull private final @NotNull LoadHelper loadHelper
    • nodeSupplier

      @NotNull private final @NotNull NodeSupplier nodeSupplier
    • rootNode

      private ParsedElement rootNode
  • Constructor Details

  • Method Details

    • parsedDocument

      @Internal @NotNull @NotNull ParsedDocument parsedDocument()
    • startDocument

      public void startDocument()
    • endDocument

      public void endDocument()
    • startElement

      public boolean startElement(@NotNull @NotNull String tagName, @NotNull @NotNull Map<String,String> attributes)
    • addTextContent

      public void addTextContent(char @NotNull [] characterData, int startOffset, int endOffset)
    • endElement

      public void endElement(@NotNull @NotNull String tagName)
    • flushText

      private void flushText(@NotNull @NotNull ParsedElement element, boolean segmentBreak)
    • preProcess

      void preProcess(@Nullable @Nullable URI documentUri)
    • postProcess

      void postProcess()
    • build

      @NotNull public @NotNull SVGDocument build()
    • processStyleSheets

      private void processStyleSheets()
    • validateUseElements

      private void validateUseElements()
    • checkNestingDepth

      private void checkNestingDepth(@NotNull @NotNull SVGNode node, int allowed_depth)