001: /*
002: * GeoTools - OpenSource mapping toolkit
003: * http://geotools.org
004: * (C) 2003-2006, GeoTools Project Managment Committee (PMC)
005: * (C) 2002, Centre for Computational Geography
006: *
007: * This library is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU Lesser General Public
009: * License as published by the Free Software Foundation;
010: * version 2.1 of the License.
011: *
012: * This library is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: */
017: package org.geotools.index.rtree.fs;
018:
019: import org.geotools.index.DataDefinition;
020: import java.nio.channels.FileChannel;
021: import java.util.Stack;
022:
023: /**
024: * DOCUMENT ME!
025: *
026: * @author Tommaso Nolli
027: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/plugin/shapefile/src/main/java/org/geotools/index/rtree/fs/Parameters.java $
028: */
029: public class Parameters {
030: private int maxNodeEntries;
031: private int minNodeEntries;
032: private short splitAlg;
033: private DataDefinition dataDef;
034: private FileChannel channel;
035: private Stack freePages;
036: private boolean forceChannel;
037:
038: public Parameters() {
039: this .freePages = new Stack();
040: }
041:
042: /**
043: * DOCUMENT ME!
044: *
045: */
046: public FileChannel getChannel() {
047: return channel;
048: }
049:
050: /**
051: * DOCUMENT ME!
052: *
053: */
054: public DataDefinition getDataDef() {
055: return dataDef;
056: }
057:
058: /**
059: * DOCUMENT ME!
060: *
061: */
062: public int getMaxNodeEntries() {
063: return maxNodeEntries;
064: }
065:
066: /**
067: * DOCUMENT ME!
068: *
069: */
070: public int getMinNodeEntries() {
071: return minNodeEntries;
072: }
073:
074: /**
075: * DOCUMENT ME!
076: *
077: */
078: public short getSplitAlg() {
079: return splitAlg;
080: }
081:
082: /**
083: * DOCUMENT ME!
084: *
085: * @param channel
086: */
087: public void setChannel(FileChannel channel) {
088: this .channel = channel;
089: }
090:
091: /**
092: * DOCUMENT ME!
093: *
094: * @param definition
095: */
096: public void setDataDef(DataDefinition definition) {
097: dataDef = definition;
098: }
099:
100: /**
101: * DOCUMENT ME!
102: *
103: * @param i
104: */
105: public void setMaxNodeEntries(int i) {
106: maxNodeEntries = i;
107: }
108:
109: /**
110: * DOCUMENT ME!
111: *
112: * @param i
113: */
114: public void setMinNodeEntries(int i) {
115: minNodeEntries = i;
116: }
117:
118: /**
119: * DOCUMENT ME!
120: *
121: * @param s
122: */
123: public void setSplitAlg(short s) {
124: splitAlg = s;
125: }
126:
127: /**
128: * DOCUMENT ME!
129: *
130: */
131: public boolean getForceChannel() {
132: return forceChannel;
133: }
134:
135: /**
136: * DOCUMENT ME!
137: *
138: * @param b
139: */
140: public void setForceChannel(boolean b) {
141: forceChannel = b;
142: }
143:
144: /**
145: * DOCUMENT ME!
146: *
147: */
148: public Stack getFreePages() {
149: return freePages;
150: }
151:
152: /**
153: * DOCUMENT ME!
154: *
155: * @param stack
156: */
157: public void setFreePages(Stack stack) {
158: freePages = stack;
159: }
160: }
|