|
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:
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(); |
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:
Following sections contains detailed functions provided by UsageContextAuthoringOperation interface.
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.
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: |
|
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: |
|
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: |
|
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.
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 operation provides capability to remove Usage Context and its property.
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: |
|
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 operation provides capability to modify versionable attributes of Usage Context like Status, Effective Date, Expiration Date, isActive and Owner.
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: |
|
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: |
|
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: |
|
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: |
|