Class CollectionSchema

java.lang.Object
com.datalogics.PDFL.CollectionSchema

public class CollectionSchema extends Object
Provides for adding/removing/retrieving schema fields in a collection.
  • Method Details

    • delete

      public void delete()
    • addField

      public void addField(CollectionSchemaField field)
      AddField allows to set new field to the CollectionSchema object. If the target field exists, it is overwritten. The schema fields contain all information required to organize Collection in a certain way.

      Parameters:
      field - CollectionSchemaField object which will be added to the schema.
    • removeField

      public void removeField(CollectionSchemaField field)
      RemoveField allows to remove specified field from the schema. NOTE: to distinguish whether specified object belongs to the schema this uses CollectionSchemaField's name.

      Parameters:
      field - CollectionSchemaField which will be removed from the schema.
    • getField

      public CollectionSchemaField getField(String name)
      GetField allows to obtain CollectionSchemaField by name.
      Parameters:
      name - textual field name.
      Returns:
      CollectionSchemaField object if found or NULL otherwise.
    • getField

      public CollectionSchemaField getField(int idx)
      GetField allows to obtain CollectionSchemaField object by its index.
      Parameters:
      idx - index of the object to find.
      Returns:
      CollectionSchemaField object if found or NULL otherwise.
    • getFieldsNumber

      public int getFieldsNumber()
      GetFieldsNumber allows to obtain fields number in the schema.
      Returns:
      the fields number.