Project

Profile

Help

Revision 791119c4

Added by Michael Kay about 3 years ago

Javadoc improvements on new RebasedDocument class

View differences:

latest9.9/hej/net/sf/saxon/tree/wrapper/RebasedDocument.java
15 15

  
16 16

  
17 17
/**
18
 * A RebasedDocument represents a view of a real Document in which all nodes are mapped to a different
18
 * A <tt>RebasedDocument</tt> represents a view of a real Document in which all nodes are mapped to a different
19 19
 * base URI and/or system ID using supplied mapping functions.
20 20
 *
21 21
 * <p>It is possible to map either base URIs or system IDs or both.</p>
......
23 23
 * <p>All properties of the nodes other than the base URI and system ID are unchanged.</p>
24 24
 *
25 25
 * <p>The user-supplied functions supplied to compute the base URI and system ID will be applied
26
 * to the base URI or system ID obtained by calling {@link NodeInfo#getBaseURI()} or {@link NodeInfo#getSystemId()}
27
 * respectively. It is of course possible to supply a function that ignores the supplied input. If the underlying
28
 * value of {@link NodeInfo#getBaseURI()} or {@link NodeInfo#getSystemId()} is null, the value supplied to the mapping
29
 * function will be a zero-length string.</p>
26
 * to the underlying node in the "real" document. It is of course possible to supply a function that
27
 * ignores the supplied input.
30 28
 *
31 29
 * @since 9.9.0.2
32 30
 */
......
39 37

  
40 38

  
41 39
    /**
42
     * Create a type-stripped view of a document
40
     * Create a rebased view of a document
43 41
     * @param doc the underlying document
44 42
     * @param baseUriMapper a function that is applied to a node in the original document
45
     * (as returned by its {@link NodeInfo#getBaseURI()} method) to deliver the base URI of the corresponding
46
     * node in the rebased document
43
     *                      to deliver the base URI of the corresponding node in the rebased document
47 44
     * @param systemIdMapper a function that is applied to a node in the original document
48
     * (as returned by its {@link NodeInfo#getSystemId()} method) to deliver the system ID of the corresponding
49
     * node in the rebased document
45
     *                       to deliver the system ID of the corresponding node in the rebased document
50 46
     */
51 47

  
52 48
    public RebasedDocument(TreeInfo doc, Function<NodeInfo, String> baseUriMapper, Function<NodeInfo, String> systemIdMapper) {
......
59 55

  
60 56
    /**
61 57
     * Create a wrapped node within this document
62
     * @param node the node to be wrapped
58
     * @param node the node to be wrapped - must be a node in the base document
63 59
     */
64 60

  
65 61
    public RebasedNode wrap(NodeInfo node) {
latest9.9/hej/net/sf/saxon/tree/wrapper/RebasedNode.java
14 14

  
15 15

  
16 16
/**
17
 * A TypeStrippedNode is a view of a node, in a virtual tree that has type
18
 * annotations stripped from it.
17
 * A RebasedNode is a view of a node, in a virtual tree that maps the base URI and/or
18
 * system ID to new values
19 19
 */
20 20

  
21 21
public class RebasedNode extends AbstractVirtualNode implements WrappingFunction {
......
64 64
     */
65 65

  
66 66
    /*@NotNull*/
67
    public VirtualNode makeWrapper(NodeInfo node, VirtualNode parent) {
67
    public RebasedNode makeWrapper(NodeInfo node, VirtualNode parent) {
68 68
        RebasedNode wrapper = new RebasedNode(node, (RebasedNode) parent);
69 69
        wrapper.docWrapper = this.docWrapper;
70 70
        return wrapper;

Also available in: Unified diff