Class SVGDocumentBuilder


  • public final class SVGDocumentBuilder
    extends java.lang.Object
    • 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
    • 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()
      • processStyleSheets

        private void processStyleSheets()
      • validatePathCount

        private void validatePathCount()
      • validateUseElementsDepth

        private void validateUseElementsDepth()
      • nestingDepthOf

        private int nestingDepthOf​(@NotNull
                                   @NotNull SVGNode node,
                                   @NotNull
                                   @NotNull java.util.Map<SVGNode,​java.lang.Integer> checkedNodes)