Revision 945 trunk/libraries/libjni-gdal/src/es/gva/cit/jogr/JNIBase.java

View differences:

JNIBase.java
42 42

  
43 43
	private native int getDriverCountNat(long cPtr);
44 44
	private native int getLayerCountNat(long cPtr);
45
	private native int getFeatureCountNat(long cPtr);
46
	private native int getFieldCountNat(long cPtr);
45 47
	
46 48
	
47
	
48 49
	 /**
49 50
	 * Funci?n que sirve como base para funcionalidades de ogr que admiten como par?metro un long y devuelven un entero.
50 51
	 * 
......
62 63
			
63 64
		switch(n){
64 65
			case 0: res = getDriverCountNat(cPtr);break;
65
			case 1: res = getLayerCountNat(cPtr);break;	
66
			case 1: res = getLayerCountNat(cPtr);break;
67
			case 2: res = getFeatureCountNat(cPtr);break;
68
			case 3: res = getFieldCountNat(cPtr);break;
66 69
		}
67 70
			
68 71
		if(res<0)
......
70 73
		else return res;
71 74
	}
72 75
	
76
	/**
77
	 * 
78
	 */
79
	
80
	protected void lanzarExcepcion(int err, String mensaje)
81
	throws OGRCorruptDataException, OGRFailureException, OGRNotEnoughDataException, OGRNotEnoughMemoryException, OGRUnsupportedGeometryTypeException, OGRUnsupportedOperationException, OGRUnsupportedSRSException{
82
		
83
		switch(err){
84
			case 1:throw new OGRNotEnoughDataException(mensaje);
85
			case 2:throw new OGRNotEnoughMemoryException(mensaje);
86
			case 3:throw new OGRUnsupportedGeometryTypeException(mensaje);
87
			case 4:throw new OGRUnsupportedOperationException(mensaje);
88
			case 5:throw new OGRCorruptDataException(mensaje);
89
			case 6:throw new OGRFailureException(mensaje);
90
			case 7:throw new OGRUnsupportedSRSException(mensaje);
91
		}
92
				
93
	}
94
	
73 95
	static{
74 96
		
75 97
		System.loadLibrary("jgdal");

Also available in: Unified diff