Project

General

Profile

1
/**
2
 *  '$RCSfile$'
3
 *  Copyright: 2004 Regents of the University of California and the
4
 *             National Center for Ecological Analysis and Synthesis
5
 *
6
 *   '$Author: cjones $'
7
 *     '$Date: 2007-01-18 14:26:33 -0800 (Thu, 18 Jan 2007) $'
8
 * '$Revision: 3145 $'
9
 *
10
 * This program is free software; you can redistribute it and/or modify
11
 * it under the terms of the GNU General Public License as published by
12
 * the Free Software Foundation; either version 2 of the License, or
13
 * (at your option) any later version.
14
 *
15
 * This program is distributed in the hope that it will be useful,
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 * GNU General Public License for more details.
19
 *
20
 * You should have received a copy of the GNU General Public License
21
 * along with this program; if not, write to the Free Software
22
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23
 */
24
package edu.ucsb.nceas.metacat;
25

    
26

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

    
44
    /**
45
     * Construct a new PathIndexEntry for the xml_index table.
46
     *
47
     * @param nodeId the node identifier
48
     * @param path the path in the xml document
49
     * @param docid the document identifier
50
     * @param docType the document type
51
     * @param parentId the identifier of the parent node
52
     */
53
    public PathIndexEntry(long nodeId, String path, String docid,
54
            String docType, long parentId)
55
    {
56
        this.nodeId = nodeId;
57
        this.path = path;
58
        this.docid = docid;
59
        this.docType = docType;
60
        this.parentId = parentId;
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
    }
84
}
(49-49/62)