/** * Convenience method to get the Configuration. Always returns the same result as {@code getTreeInfo().getConfiguration()} * @return the Configuration to which the tree belongs. The default implementation invokes * {@code getTreeInfo().getConfiguration()}. * @since 8.4 */ default Configuration getConfiguration() { return getTreeInfo().getConfiguration(); }
/** * Convenience method to get the Configuration. Always returns the same result as {@code getTreeInfo().getConfiguration()} * @return the Configuration to which the tree belongs. The default implementation invokes * {@code getTreeInfo().getConfiguration()}. * @since 8.4 */ default Configuration getConfiguration() { return getTreeInfo().getConfiguration(); }
/** * Create a type-stripped view of a document * * @param doc the underlying document */ public TypeStrippedDocument(TreeInfo doc) { super(doc.getConfiguration()); setRootNode(wrap(doc.getRootNode())); this.underlyingTree = doc; }
/** * Create a type-stripped view of a document * * @param doc the underlying document */ public TypeStrippedDocument(TreeInfo doc) { super(doc.getConfiguration()); setRootNode(wrap(doc.getRootNode())); this.underlyingTree = doc; }
/** * Create a rebased view of a document * @param doc the underlying document * @param baseUriMapper a function that is applied to a node in the original document * to deliver the base URI of the corresponding node in the rebased document * @param systemIdMapper a function that is applied to a node in the original document * to deliver the system ID of the corresponding node in the rebased document */ public RebasedDocument(TreeInfo doc, Function<NodeInfo, String> baseUriMapper, Function<NodeInfo, String> systemIdMapper) { super(doc.getConfiguration()); this.baseUriMapper = baseUriMapper; this.systemIdMapper = systemIdMapper; setRootNode(wrap(doc.getRootNode())); this.underlyingTree = doc; }
/** * Create a rebased view of a document * @param doc the underlying document * @param baseUriMapper a function that is applied to a node in the original document * to deliver the base URI of the corresponding node in the rebased document * @param systemIdMapper a function that is applied to a node in the original document * to deliver the system ID of the corresponding node in the rebased document */ public RebasedDocument(TreeInfo doc, Function<NodeInfo, String> baseUriMapper, Function<NodeInfo, String> systemIdMapper) { super(doc.getConfiguration()); this.baseUriMapper = baseUriMapper; this.systemIdMapper = systemIdMapper; setRootNode(wrap(doc.getRootNode())); this.underlyingTree = doc; }
/** * Create a space-stripped view of a document * * @param doc the underlying document * @param strippingRule an object that contains the rules defining which whitespace * text nodes are to be absent from the view */ public SpaceStrippedDocument(TreeInfo doc, SpaceStrippingRule strippingRule) { super(doc.getConfiguration()); setRootNode(wrap(doc.getRootNode())); this.strippingRule = strippingRule; this.underlyingTree = doc; preservesSpace = findPreserveSpace(doc); containsAssertions = findAssertions(doc); }
/** * Create a space-stripped view of a document * * @param doc the underlying document * @param strippingRule an object that contains the rules defining which whitespace * text nodes are to be absent from the view */ public SpaceStrippedDocument(TreeInfo doc, SpaceStrippingRule strippingRule) { super(doc.getConfiguration()); setRootNode(wrap(doc.getRootNode())); this.strippingRule = strippingRule; this.underlyingTree = doc; preservesSpace = findPreserveSpace(doc); containsAssertions = findAssertions(doc); }