Project

General

Profile

1 2297 jones
/**
2
 *  '$RCSfile$'
3
 *  Copyright: 2004 Regents of the University of California and the
4
 *             National Center for Ecological Analysis and Synthesis
5
 *
6
 *   '$Author$'
7
 *     '$Date$'
8
 * '$Revision$'
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 6012 leinfelder
import java.sql.Timestamp;
27 2297 jones
28 6012 leinfelder
29 2297 jones
/**
30
 * PathIndexEntry contains all of the data fields needed to insert an path into
31 3145 cjones
 * the xml_index table or the xml_path_index table, depending on which
32
 * constructor is used.
33 2376 sgarg
 *
34 2297 jones
 * @author jones
35
 */
36
public class PathIndexEntry
37
{
38
    protected long nodeId;
39
    protected String path;
40 2376 sgarg
    protected String docid;
41 2297 jones
    protected String docType;
42
    protected long parentId;
43 3145 cjones
    protected String nodeData;
44
    protected float nodeDataNumerical;
45 6012 leinfelder
    protected Timestamp nodeDataDate;
46 2376 sgarg
47 6012 leinfelder
48 2297 jones
    /**
49 3145 cjones
     * Construct a new PathIndexEntry for the xml_index table.
50 2376 sgarg
     *
51 2297 jones
     * @param nodeId the node identifier
52
     * @param path the path in the xml document
53
     * @param docid the document identifier
54
     * @param docType the document type
55
     * @param parentId the identifier of the parent node
56
     */
57 2376 sgarg
    public PathIndexEntry(long nodeId, String path, String docid,
58 2436 sgarg
            String docType, long parentId)
59 2297 jones
    {
60
        this.nodeId = nodeId;
61
        this.path = path;
62
        this.docid = docid;
63
        this.docType = docType;
64
        this.parentId = parentId;
65
    }
66 3145 cjones
67
    /**
68
     * Construct a new PathIndexEntry for the xml_path_index table.
69
     *
70
     * @param nodeId the node identifier
71
     * @param path the path in the xml document
72
     * @param docid the document identifier
73
     * @param docType the document type
74
     * @param parentId the identifier of the parent node
75
     * @param nodeData the node value as a string
76
     * @param nodeDataNumerical the node value as a double precision number
77
     */
78
    public PathIndexEntry(long nodeId, String path, String docid,
79 6012 leinfelder
            long parentId, String nodeData, float nodeDataNumerical, Timestamp nodeDataDate )
80 3145 cjones
    {
81
        this.nodeId = nodeId;
82
        this.path = path;
83
        this.docid = docid;
84
        this.nodeData = nodeData;
85
        this.nodeDataNumerical = nodeDataNumerical;
86 6012 leinfelder
        this.nodeDataDate = nodeDataDate;
87 3145 cjones
        this.parentId = parentId;
88
    }
89 2297 jones
}