An Entity's fields can be edited using the Schema Editor. To do so, make sure the Schema Editor is already open (double click or right-click a Schema node ( or ) in the Projects window and choose Edit Schema. In the Schema Editor you can add new fields to an entity or you can make changes to an existing field, convert the field to an new field with a different (or the same) data type, or delete the field.
IJC currently supports the following field types:
These are normal fields containing normal text, numeric or date data. The values are provided by the user (or imported in from a data file) and can usually be edited if you have sufficient access rights.
These are for performing structure based predictions, such as logP, Polar surface area, or Lipinski rule of 5. They are automatically generated from the structure, and updated if the structure is changed or a new structure is inserted. These values cannot be edited by the user. Chemical Terms Fields can only be added to structure tables.
A URL field allows you to incorporate data from outside the IJC database by means of defining a URL that provides a path to the data. Typically the URL would point to a document or an image file etc. The content of the URL can be displayed in the form or grid view using the browser widget, or can be used as a hyperlink that opens an external application (e.g. Acrobat if the content was a PDF document). There are two subtypes of URL field:
Static URL fields: The URL is stored in the IJC database and is fully defined.
Dynamic URL fields: The URL is stored in IJC as a template and is generated dynamically from the content of other fields.
Calculated fields allow calculations to be performed on data from other fields. A simple example would be to calculate the ratio of two fields (e.g. A / B like calculations) though more complex calculations such as averaging values from a different table, or even accessing data from outside IJC are potentially possible.
Extension fields allow calculations using other fields, similar to Calculated fields. They can also access data from a datatree, files, web services, etc. Allow to return chosen Java type, define custom query operators and custom icon. Java handler provides needed functionality and behavior is adjusted using JSON configuration.
A new field can be added by any of these methods:
In the Schema Editor
Using the 'New Field' items from the Data menu
In the Browse mode of the Grid View
In Design mode of the Form View
First, specify where the new Field is required by selecting the Entity to which you want the Field adding. The 'New Field' actions will only be active in the correct context (when it is explicit which Entity the field is to be added to). In the Views this is automatic. In the Schema Editor select the Entity from the Schema Editor's explorer located on the left side in the main window. In the grid and form views the entity will be automatically selected.
The exact process for adding a field depends on the type of field. See the documentation on the particular field type for details:
In order to make changes to an existing field, you can edit the existing parameters by selecting the field in the Schema Editor, then make appropriate changes in the panel on the right and clicking on the 'Apply' button. Only some properties can be changed once the field has been created, and this differs between the different field types and database types.
You can convert a field to a new type. e.g. if a field has been imported into IJC as text, but is in fact numbers you can convert the values to numbers and create a new field with those values. Note that the old field is not changed, so if the conversion does not go to plan your old data is still present.
In order to convert the type of an existing field, choose 'Convert type' from the right-click menu of a selected field in the Schema Editor's explorer. The Convert field type wizard opens to guide you through the process:
Step 1. Field Type and details
Specify the details for the new field that is going to be created. These options are the same as when creating a new field.
Specify the field type from the list of types.
Specify the field details, as if you were creating a new field.
Click Next.
Step 2. Data conversion:
The data conversion process takes place and you are notified of progress and any errors. Click Finish when the import is complete. The newly converted field will appear in the Schema Editor.
You can delete an existing field by choosing Delete from the right-click menu of a selected field in the Schema Editor's explorer. A confirmation window opens, allowing you to specify whether the related column on the database should also be removed. Click OK to confirm. A Field can also be deleted from the Grid View, Form view or the schema editor by using the Delete icon in the toolbar ( ).
The database table may contain some columns that are not currently used by any Field. A field can be created that uses one of these columns by the process of "promoting" the column. This can be done in any of the following ways:
Right click on the entity or its fields folder in the schema editor and choose 'Promote field'. A popout menu of all the un-used columns will appear and you can select the column you want.
Right click on the data tree in the schema editor and choose 'Promote field'. This works as for the entity, and operates on the entity at the root of the data tree.
Go to the tables or views tab in the schema editor, find the column of interest (unused columns will be shown in grey text) and click on the 'Promote column to field' icon in the toolbar ( ).
A wizard will open and prompt you for any necessary information. Specify the information and click 'Finish' and the column will be promoted to a field.
On Oracle you are able to promote the ROWID pseudo column. This can be useful when you do not have a column that can be used for the ID field (e.g. a view that does not have a column that uniquely defines each row). In this case the ROWID can be used. When promoted the ROWID field will not be editable.