Project

General

Profile

Revision 3145

Added by Chris Jones over 14 years ago

As part of a patch fix for:

http://bugzilla.ecoinformatics.org/show_bug.cgi?id=2469

I've added a second constructor to PathIndexEntry.java. The first
constructor is used to represent a record entry from the xml_index
table, and the new second constructor represents a record entry in
the xml_path_index table. I've added both nodeData and nodeDataNumerical
as variables that will store the record's data during the indexing process.

View differences:

src/edu/ucsb/nceas/metacat/PathIndexEntry.java
26 26

  
27 27
/**
28 28
 * PathIndexEntry contains all of the data fields needed to insert an path into
29
 * the xml_index table.
29
 * the xml_index table or the xml_path_index table, depending on which 
30
 * constructor is used.
30 31
 *
31 32
 * @author jones
32 33
 */
......
37 38
    protected String docid;
38 39
    protected String docType;
39 40
    protected long parentId;
41
    protected String nodeData;
42
    protected float nodeDataNumerical;
40 43

  
41 44
    /**
42
     * Construct a new PathIndexEntry.
45
     * Construct a new PathIndexEntry for the xml_index table.
43 46
     *
44 47
     * @param nodeId the node identifier
45 48
     * @param path the path in the xml document
......
56 59
        this.docType = docType;
57 60
        this.parentId = parentId;
58 61
    }
62

  
63
    /**
64
     * Construct a new PathIndexEntry for the xml_path_index table.
65
     *
66
     * @param nodeId the node identifier
67
     * @param path the path in the xml document
68
     * @param docid the document identifier
69
     * @param docType the document type
70
     * @param parentId the identifier of the parent node
71
     * @param nodeData the node value as a string
72
     * @param nodeDataNumerical the node value as a double precision number
73
     */
74
    public PathIndexEntry(long nodeId, String path, String docid,
75
            long parentId, String nodeData, float nodeDataNumerical )
76
    {
77
        this.nodeId = nodeId;
78
        this.path = path;
79
        this.docid = docid;
80
        this.nodeData = nodeData;
81
        this.nodeDataNumerical = nodeDataNumerical;
82
        this.parentId = parentId;        
83
    }
59 84
}

Also available in: Unified diff