Package org.gvsig.lrs.swing.impl
Class JLrsUtils
java.lang.Object
org.gvsig.lrs.swing.impl.JLrsUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static org.gvsig.fmap.dal.feature.NewFeatureStoreParameterscreateFeatureStoreParams(String outputLayerPathFile, org.gvsig.crs.projection.lib.Projection projection) Given a pathfile and a projection returns params to create a new feature storestatic booleanhasMLayersWithSelectedFeatures(org.gvsig.fmap.mapcontext.layers.FLayer layer) Tries to find one curve M-layer with selected Featuresstatic booleanisMlayerWithNonGeomField(org.gvsig.fmap.mapcontext.layers.FLayer layer) Verifies if it is a curve M-layer with at least one non-geometrical fieldstatic booleanvalidatedMCurveAndPointLayer(org.gvsig.fmap.mapcontext.layers.operations.LayerCollection layers) Tries to find the correct layers: - At least 2 layers - At least 1 curve layer with M coordinates and at least 1 non-geometrical field - At least 1 point layer with at least 1 non-geometrical field and 1 numeric fieldstatic booleanvalidateMLayerWithNonGeomField(org.gvsig.fmap.mapcontext.layers.operations.LayerCollection layers) Tries to find a curve M-layer with at least one non-geometrical fieldstatic booleanvalidateOneCurveLyrOneNonGeomField(org.gvsig.fmap.mapcontext.layers.operations.LayerCollection layers) Tries to find the correct layers: - At least 1 curve layer with at least 1 non-geometrical fieldstatic booleanvalidateStoreWithFieldsAndOneNumeric(List<org.gvsig.fmap.dal.feature.FeatureStore> tables) Validates if there is a valid table: - at least two fields - one of them is numeric if can't find any throws an exception
-
Constructor Details
-
JLrsUtils
public JLrsUtils()
-
-
Method Details
-
createFeatureStoreParams
protected static org.gvsig.fmap.dal.feature.NewFeatureStoreParameters createFeatureStoreParams(String outputLayerPathFile, org.gvsig.crs.projection.lib.Projection projection) throws Exception Given a pathfile and a projection returns params to create a new feature store- Parameters:
outputLayerPathFile-projection-- Returns:
- Throws:
Exception
-
validateOneCurveLyrOneNonGeomField
public static boolean validateOneCurveLyrOneNonGeomField(org.gvsig.fmap.mapcontext.layers.operations.LayerCollection layers) Tries to find the correct layers: - At least 1 curve layer with at least 1 non-geometrical field- Parameters:
LayerCollection- layers- Returns:
- true if finds the correct layers
-
validatedMCurveAndPointLayer
public static boolean validatedMCurveAndPointLayer(org.gvsig.fmap.mapcontext.layers.operations.LayerCollection layers) Tries to find the correct layers: - At least 2 layers - At least 1 curve layer with M coordinates and at least 1 non-geometrical field - At least 1 point layer with at least 1 non-geometrical field and 1 numeric field- Parameters:
LayerCollection- layers- Returns:
- true if finds the correct layers
-
validateMLayerWithNonGeomField
public static boolean validateMLayerWithNonGeomField(org.gvsig.fmap.mapcontext.layers.operations.LayerCollection layers) Tries to find a curve M-layer with at least one non-geometrical field- Parameters:
layers-- Returns:
-
isMlayerWithNonGeomField
public static boolean isMlayerWithNonGeomField(org.gvsig.fmap.mapcontext.layers.FLayer layer) Verifies if it is a curve M-layer with at least one non-geometrical field- Parameters:
FLayer-- Returns:
- Throws:
org.gvsig.fmap.dal.exception.ReadException
-
validateStoreWithFieldsAndOneNumeric
public static boolean validateStoreWithFieldsAndOneNumeric(List<org.gvsig.fmap.dal.feature.FeatureStore> tables) Validates if there is a valid table: - at least two fields - one of them is numeric if can't find any throws an exception- Throws:
LrsNeededParameterExceptionorg.gvsig.fmap.dal.exception.ReadException
-
hasMLayersWithSelectedFeatures
public static boolean hasMLayersWithSelectedFeatures(org.gvsig.fmap.mapcontext.layers.FLayer layer) Tries to find one curve M-layer with selected Features- Parameters:
FLayer-- Returns:
- Throws:
org.gvsig.fmap.dal.exception.ReadException
-