CTS2 Links for LexEVS 6.0 |
---|
Introduction
LexEVS CTS2 Usage Context Authoring API provides capability to author Usage Context and also the ability to create a Code System that can hold the Usage Contexts.
Here are the authoring functions that can be performed on Usage Context:
- Create - This function provides capability to create:
- New Code System to hold cUsage Contexts
- New Usage Context
- Add new property to Usage Context
- Edit - This function provides capability to update:
- Property of a Usage Context
- Remove - This function provides capability to remove:
- Usage Context
- Property of a Usage Context
- Versionable Change - This function provides capability to modify versionable attributes of Usage Context like Status, Effective Date, Expiration Date, isActive and Owner:
- Usage Context Status
- Activate Usage Context
- De-Activate Usage Context
Interface
org.lexevs.cts2.author.UsageContextAuthoringOperation is the main interface for all the authoring operations against Usage Context. This interface can be accessed using main LexEVSCTS2 interface, like:
org.lexevs.cts2.author.UsageContextAuthoringOperation ucAuthOp = new org.lexevs.cts2.LexEvsCTS2Impl().getAuthoringOperation().getUsageContextAuthoringOperation();
Revision Information
All the authoring functions described here requires information about the author and revision/version id to be assigned to entities for each of these operations. These is done passing object org.lexevs.cts2.core.update.RevisionInfo. RevisionInfo object has following attributes:
- java.lang.String changeAgent - (Optional) The source that participated in this particular change.
- java.lang.String changeInstruction - (Optional) A human or machine readable set of instructions on how to apply this change.
- java.lang.String revisionId - (Mandatory) The unique identifier of this revision.
- java.lang.Long editOrder - (Optional) The relative order that this revision is to be applied if in a systemRelease.
- java.util.Date revisionDate - (Optional) The end date for which this version is operative (considered commited).
- java.lang.String description - (Optional) The description of the resource/change.
- java.lang.String systemReleaseURI - (Optional) The official URI of this release
Authoring Functions
Following sections contains detailed functions provided by UsageContextAuthoringOperation interface.
Create Operations
Create Operation provides capability to create a Code System to hold Usage Contexts, Usage Context and Properties. For every entry that gets created, a unique revision(version) identifier will be assigned to that entry. This helps in retrieving snapshots of an entry based on its revision(version) identifier. This unique id can be passed in using the RevisionInfo object described above.
createUsageContextCodeSystem
This function provides capability to create a new Code System to contain a set of Usage Contexts. The Code System is created by defining the set of meta-data properties that describe it. At this point there is no Usage Context added.
createUsageContextCodeSystem(RevisionInfo revision, String codeSystemName, String codeSystemURI, String formalName, String defaultLanguage, long approxNumConcepts, String representsVersion, List<String> localNameList, List<org.LexGrid.commonTypes.Source> sourceList, Text copyright, Mappings mappings)
Description: |
Creates new code system to hold Usage Contexts. |
---|---|
Input: |
|
Output: |
org.LexGrid.codingSchemes.CodingScheme - Created Usage Context Code System |
Exception: |
org.LexGrid.LexBIG.Exceptions.LBException |
Sample Call: |
|
createUsageContext
This function creates a Usage Context to be included in a Code System. The new Usage Context is defined by the set of meta-data properties that describe it.
createUsageContext(String usageContextId, String usageContextName, String namespace, RevisionInfo revisionInfo, String description, String status, boolean isActive, Properties properties, String codeSystemNameOrURI, String codeSystemVersion)
Description: |
Creates new Usage Context in a code system. |
---|---|
Input: |
|
Output: |
java.lang.String - Usage Context id if created successfully |
Exception: |
org.LexGrid.LexBIG.Exceptions.LBException |
Sample Call: |
|
addUsageContextProperty
This function provides capability to add a new property to a Usage Context.
addUsageContextProperty(String usageContextId, String namespace, Property newProperty, String codeSystemNameOrURI, String codeSystemVersion, RevisionInfo revisionInfo)
Description: |
Add new property for a Usage Context. |
---|---|
Input: |
|
Output: |
boolean - True; if addition of new property was success |
Exception: |
org.LexGrid.LexBIG.Exceptions.LBException |
Sample Call: |
|
Edit Operations
The edit operation provides the capability to modify properties of a Usage Context. For every entry that gets modified, a unique revision(version) identifier will be assigned to that entry. This helps in retrieving snapshots of an entry based on its revision(version) identifier. This unique id can be passed in using the RevisionInfo object described above.
updateUsageContextProperty
This function provides capability to modify existing property of a Usage Context.
updateUsageContextProperty(String UsageContextId, String namespace, Property changedProperty, String codeSystemNameOrURI, String codeSystemVersion, RevisionInfo revisionInfo)
Description: |
Modifies existing property of a Usage Context. |
---|---|
Input: |
|
Output: |
boolean - True; if update was success |
Exception: |
org.LexGrid.LexBIG.Exceptions.LBException |
Sample Call: |
|
Remove Operations
Remove operation provides capability to remove Usage Context and its property.
removeUsageContext
This function provides capability to remove a Usage Context.
removeUsageContext(String usageContextId, String namespace, String codeSystemNameOrURI, String codeSystemVersion, RevisionInfo revisionInfo)
Description: |
Removes a Usage Context from code system. |
---|---|
Input: |
|
Output: |
boolean - True; if remove was success |
Exception: |
org.LexGrid.LexBIG.Exceptions.LBException |
Sample Call: |
|
removeUsageContextProperty
This function provides capability to remove property of a Usage Context.
removeUsageContextProperty(String usageContextId, String namespace, Property property, String codeSystemNameOrURI, String codeSystemVersion, RevisionInfo revisionInfo)
Description: |
Removes a property of a Usage Context. |
---|---|
Input: |
|
Output: |
boolean - True; if remove was success |
Exception: |
org.LexGrid.LexBIG.Exceptions.LBException |
Sample Call: |
|
Versionable Change Operations
Versionable Change operation provides capability to modify versionable attributes of Usage Context like Status, Effective Date, Expiration Date, isActive and Owner.
updateUsageContextStatus
This function modifies the status of a Usage Context.
updateUsageContextStatus(String usageContextId, String namespace, String newStatus, String codeSystemNameOrURI, String codeSystemVersion, RevisionInfo revisionInfo)
Description: |
Modifies the status of a Usage Context. |
---|---|
Input: |
|
Output: |
boolean - True; if update was success |
Exception: |
org.LexGrid.LexBIG.Exceptions.LBException |
Sample Call: |
|
activateUsageContext
This function activates Usage Context so that it can be accessed in the terminology service.
activateUsageContext(String usageContextId, String namespace, String codeSystemNameOrURI, String codeSystemVersion, RevisionInfo revisionInfo)
Description: |
Activates Usage Context. |
---|---|
Input: |
|
Output: |
boolean - True; if activation was success |
Exception: |
org.LexGrid.LexBIG.Exceptions.LBException |
Sample Call: |
|
deactivateUsageContext
This function deactivates Usage Context so that it can no longer be accessed in the terminology service.
deactivateUsageContext(String usageContextId, String namespace, String codeSystemNameOrURI, String codeSystemVersion, RevisionInfo revisionInfo)
Description: |
Deactivates UsageContext. |
---|---|
Input: |
|
Output: |
boolean - True; if deactivation was success |
Exception: |
org.LexGrid.LexBIG.Exceptions.LBException |
Sample Call: |
|
updateUsageContextVersionable
This function provides capability to modify Usage Context versionable attributes like effective date, expiration date, owner, status etc.
updateUsageContextVersionable(String usageContextId, String namespace, Versionable changedVersionable, String codeSystemNameOrURI, String codeSystemVersion, RevisionInfo revisionInfo)
Description: |
Update Usage Context versionable attributes like effective date, expiration date, owner, status etc. |
---|---|
Input: |
|
Output: |
boolean - True; if update was success |
Exception: |
org.LexGrid.LexBIG.Exceptions.LBException |
Sample Call: |
|