Package com.datalogics.PDFL
Class CollectionSchema
java.lang.Object
com.datalogics.PDFL.CollectionSchema
Provides for adding/removing/retrieving schema fields in a collection.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddField(CollectionSchemaField field) AddField allows to set new field to the CollectionSchema object. If the target field exists, it is overwritten.voiddelete()getField(int idx) GetField allows to obtain CollectionSchemaField object by its index.GetField allows to obtain CollectionSchemaField by name.intGetFieldsNumber allows to obtain fields number in the schema.voidremoveField(CollectionSchemaField field) RemoveField allows to remove specified field from the schema.
-
Method Details
-
delete
public void delete() -
addField
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
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
GetField allows to obtain CollectionSchemaField by name.- Parameters:
name- textual field name.- Returns:
- CollectionSchemaField object if found or NULL otherwise.
-
getField
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.
-