Class FeatureSchemaTools

java.lang.Object
org.openjump.core.apitools.ToolToMakeYourLifeEasier
org.openjump.core.apitools.FeatureSchemaTools

public class FeatureSchemaTools extends ToolToMakeYourLifeEasier
Class for easier handling of featureSchema objects.
Version:
$Rev$
Author:
Ole Rahn

FH Osnabrück - University of Applied Sciences Osnabrück,
Project: PIROL (2005),
Subproject: Daten- und Wissensmanagement
  • Constructor Details

    • FeatureSchemaTools

      public FeatureSchemaTools()
  • Method Details

    • getAttributesWithTypes

      public static AttributeInfo[] getAttributesWithTypes(FeatureSchema fs, AttributeType[] allowedTypes)
      Extracts information of all attributes with one of the given types from the given FeatureSchema
      Parameters:
      fs - FeatureSchema to get information from
      allowedTypes - array with AttributeTypes, that specify which attribute to get information about
      Returns:
      array with information on matching attributes
    • copyFeatureSchema

      public static FeatureSchema copyFeatureSchema(FeatureSchema oldSchema)
      Deprecated.
      copy/clone the input featureSchema since it is not proper implemented in Jump Note : FeatureSchema has now a proper deep clone implementation
      Parameters:
      oldSchema - old schema
      Returns:
      a new FeatureSchema cloned from oldSchema
    • copyFeature

      public static Feature copyFeature(Feature feature, FeatureSchema newSchema)
      copy the input feature to a new Schema whereby the new Feature Schema must be an extended or shortened one
      Parameters:
      feature - the feature to copy from
      newSchema - the schema to copy to
      Returns:
      a new feature which is a copy of feature in the new Schema
    • getFieldsFromLayerWithoutGeometryAndString

      public static List<String> getFieldsFromLayerWithoutGeometryAndString(Layer lyr)