-
Notifications
You must be signed in to change notification settings - Fork 13
API fields
Fields are well known concepts in Rapture that are parts of documents. By defining a field and its relationship to the data within a type, information can be retrieved from a document without transferring the complete document back to a client. The methods in this API are used to both define fields and retrieve information from a document.
HttpFieldsApi fieldsApi = new HttpFieldsApi(loginApi);
Map<String,RaptureFolderInfo> retVal = fieldsApi.listFieldsByUriPrefix(authority, depth);retVal = baseAPI.doFields_ListFieldsByUriPrefix(authority, depth);Entitlement: /admin/field
Returns a list of URIs of all documents and folders below this point, mapping the URI to a RaptureFolderInfo object
| Parameter | Type | Description |
|---|---|---|
| authority | String | |
| depth | int |
| Type | Description |
|---|---|
| Map<String,RaptureFolderInfo> |
HttpFieldsApi fieldsApi = new HttpFieldsApi(loginApi);
RaptureField retVal = fieldsApi.getField(fieldUri);retVal = baseAPI.doFields_GetField(fieldUri);Entitlement: /admin/field
Retrieves the field definition.
| Parameter | Type | Description |
|---|---|---|
| fieldUri | String |
| Type | Description |
|---|---|
| RaptureField |
- A RaptureField is the definition of a concept in Rapture, referenced within a type or a series of types.*
| Field | Type |
|---|---|
| authority | String |
| category | String |
| name | String |
| longName | String |
| description | String |
| units | String |
| groupingFn | RaptureGroupingFn |
| bands | List |
| fieldPaths | Set |
HttpFieldsApi fieldsApi = new HttpFieldsApi(loginApi);
void retVal = fieldsApi.putField(field);retVal = baseAPI.doFields_PutField(field);Entitlement: /admin/field
Create or replace the field definition
| Parameter | Type | Description |
|---|---|---|
| field | RaptureField |
| Type | Description |
|---|---|
| void |
- A RaptureField is the definition of a concept in Rapture, referenced within a type or a series of types.*
| Field | Type |
|---|---|
| authority | String |
| category | String |
| name | String |
| longName | String |
| description | String |
| units | String |
| groupingFn | RaptureGroupingFn |
| bands | List |
| fieldPaths | Set |
HttpFieldsApi fieldsApi = new HttpFieldsApi(loginApi);
boolean retVal = fieldsApi.fieldExists(fieldUri);retVal = baseAPI.doFields_FieldExists(fieldUri);Entitlement: /admin/field
Check whether a field definition with the given uri exists
| Parameter | Type | Description |
|---|---|---|
| fieldUri | String |
| Type | Description |
|---|---|
| boolean |
HttpFieldsApi fieldsApi = new HttpFieldsApi(loginApi);
void retVal = fieldsApi.deleteField(fieldUri);retVal = baseAPI.doFields_DeleteField(fieldUri);Entitlement: /admin/field
Delete a field definition
| Parameter | Type | Description |
|---|---|---|
| fieldUri | String |
| Type | Description |
|---|---|
| void |
HttpFieldsApi fieldsApi = new HttpFieldsApi(loginApi);
List<String> retVal = fieldsApi.getDocumentFields(docURI, fields);retVal = baseAPI.doFields_GetDocumentFields(docURI, fields);Entitlement: /user/field/$f(docURI)
Returns a list of values referenced by the fields. Note that there is not a simple 1:1 mapping between the returned list and the list of fields supplied as a parameter.
| Parameter | Type | Description |
|---|---|---|
| docURI | String | |
| fields | List |
| Type | Description |
|---|---|
| List |
HttpFieldsApi fieldsApi = new HttpFieldsApi(loginApi);
List<String> retVal = fieldsApi.putDocumentAndGetDocumentFields(docURI, content, fields);retVal = baseAPI.doFields_PutDocumentAndGetDocumentFields(docURI, content, fields);Entitlement: /user/field/$f(docURI)
Behaves similarly to getFieldsFromDocument, except that the supplied content is first added to the document cache, overwriting any previous values.
| Parameter | Type | Description |
|---|---|---|
| docURI | String | |
| content | String | |
| fields | List |
| Type | Description |
|---|---|
| List |