Revision 22037 branches/Mobile_Compatible_Hito_1/libFMap_mobile_shp_driver/src-file/org/gvsig/data/datastores/vectorial/file/shp/SHPStore.java

View differences:

SHPStore.java
75 75
		Register.selfRegister();
76 76
	}
77 77

  
78
	private SHPStoreParameters shpParameters = null;
78
	protected SHPStoreParameters shpParameters = null;
79 79

  
80
	private File fileShp;
80
	protected File fileShp;
81 81

  
82 82
	// private FileInputStream fin;
83
	private IRandomFileChannel channel;
83
	protected IRandomFileChannel channel;
84 84

  
85
	private IBigByteBuffer bb;
85
	protected IBigByteBuffer bb;
86 86

  
87
	private File fileShx;
87
	protected File fileShx;
88 88

  
89 89
	// private FileInputStream finShx;
90
	private IRandomFileChannel channelShx;
90
	protected IRandomFileChannel channelShx;
91 91

  
92
	private IBigByteBuffer bbShx;
92
	protected IBigByteBuffer bbShx;
93 93

  
94
	private Extent extent;
94
	protected Extent extent;
95 95

  
96
	private int type;
96
	protected int type;
97 97

  
98
	private boolean onlyGeometry = false;
98
	protected boolean onlyGeometry = false;
99 99

  
100 100
	public void init(DataStoreParameters parameters) throws InitializeException {
101 101
		super.init(parameters);
......
161 161

  
162 162
	}
163 163

  
164
	// private IFeatureAttributeDescriptor createFeatureAttribute(int i) {
165
	// char fieldType = dbf.getFieldType(i);
166
	// DefaultAttributeDescriptor dad=new DefaultAttributeDescriptor();
167
	// dad.setOrdinal(i);
168
	// dad.setName(dbf.getFieldName(i));
169
	// dad.setSize(dbf.getFieldLength(i));
170
	// if (fieldType == 'L') {
171
	// dad.setType(IFeatureAttributeDescriptor.TYPE_BOOLEAN);
172
	//
173
	// } else if ((fieldType == 'F') || (fieldType == 'N')) {
174
	// int precision = dbf.getFieldDecimalLength(i);
175
	// if (precision > 0){
176
	// dad.setType(IFeatureAttributeDescriptor.TYPE_DOUBLE);
177
	// dad.setPrecision(precision);
178
	// } else{
179
	// dad.setType(IFeatureAttributeDescriptor.TYPE_INT);
180
	// }
181
	// } else if (fieldType == 'C') {
182
	// dad.setType(IFeatureAttributeDescriptor.TYPE_STRING);
183
	// } else if (fieldType == 'D') {
184
	// dad.setType(IFeatureAttributeDescriptor.TYPE_DATE);
185
	// } else {
186
	// // throw new
187
	// BadFieldDriverException(getName(),null,String.valueOf(fieldType));
188
	// }
189
	// return dad;
190
	//
191
	// }
192 164

  
165

  
166

  
193 167
	protected void doFinishEdition() throws WriteException, ReadException {
194 168
		FeaturesWriter writer = getFeaturesWriter();
195 169
		writer.init(this);
......
435 409
		return parameters;
436 410
	}
437 411

  
438
	private synchronized Geometry getGeometry(long position) {
412
	protected synchronized Geometry getGeometry(long position) {
439 413
		Point2D p = new Point2D.Double();
440 414
		int numParts;
441 415
		int numPoints;
......
671 645

  
672 646
	}
673 647

  
674
	private long getPositionForRecord(long numRec) {
648
	protected long getPositionForRecord(long numRec) {
675 649
		// shx file has a 100 bytes header, then, records
676 650
		// 8 bytes length, one for each entity.
677 651
		// first 4 bytes are the offset
......
692 666
	 * 
693 667
	 * @return Point2D.
694 668
	 */
695
	private synchronized Point2D readPoint(IBigByteBuffer in) {
669
	protected synchronized Point2D readPoint(IBigByteBuffer in) {
696 670
		// create a new point
697 671
		Point2D.Double tempPoint = new Point2D.Double();
698 672

  
......
714 688
	 * 
715 689
	 * @throws IOException
716 690
	 */
717
	private synchronized IExtent readRectangle(IBigByteBuffer in) {
691
	protected synchronized IExtent readRectangle(IBigByteBuffer in) {
718 692

  
719 693
		in.order(ByteOrder.LITTLE_ENDIAN);
720 694
		double x = in.getDouble();
......
790 764
		return new DefaultEnvelope(2, min, max);
791 765
	}
792 766

  
793
	private int getGeometryType() {
767
	protected int getGeometryType() {
794 768
		int auxType = 0;
795 769

  
796 770
		switch (type) {
......
832 806
	 * @deprecated
833 807
	 * @return
834 808
	 */
835
	private String getSRS() {
809
	protected String getSRS() {
836 810
		// TODO Auto-generated method stub
837 811
		return null;
838 812
	}

Also available in: Unified diff