All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface COM.Lexical.Metaphrase.GoodEnoughUpdate


public abstract interface GoodEnoughUpdate
GoodEnoughUpdate interface. Specifies signature of GEU methods. All edits are logged on the server--see Metaphrase SQL-Queryable Database Tables for information on the log format.

Version:
Authority1.1, 11 Apr 2000

Variable Index

 o copyUMLS
 

Method Index

 o addAtom(Concept, Partition, String, String)
Add a new Atom to a Concept.
 o addAtom(Concept, Source, String, String)
Add a new Atom to a Concept without specifying the code.
 o addDefinition(Concept, Source, String)
Add a Definition to a Concept.
 o addRelationship(Concept, String, Concept, String, Source)
Add a Relationship to a Concept.
 o addSemanticType(Concept, SemanticType)
Add a SemanticType to a Concept.
 o createConcept(Partition, String, String)
Create a new Concept.
 o createConcept(Source, String, String)
Create a new Concept without specifying the code of the initial atom.
 o createConcept(Source, String, String, String)
Create a new Concept.
 o createRelation(String, Relation, String)
Create a new Relation without specifying the TUI.
 o createRelation(String, String, Relation, String)
Create a new Relation.
 o createSemanticType(String, SemanticType)
Create a new Semantic Type without specifying the TUI.
 o createSemanticType(String, String, SemanticType)
Create a new Semantic Type.
 o createSource(String, String, String)
Create a new source without specifying startingCode.
 o createSource(String, String, String, String)
Create a new source.
 o createSubsource(Source, String, String)
Create a new "subsource".
 o deleteConcept(Concept)
Delete a Concept from its database.
 o deleteElement(Concept, ConceptElement)
Delete a ConceptElement from a Concept.
 o editSource(Source, String)
Edit a source.
 o getSubmittedTerms()
Retrieve Enumeration of terms submitted for addition to DB.
 o getSubmittedTerms(boolean)
Retrieve Enumeration of terms submitted for addition to DB.
 o identifyLock()
Return a string identifying the holder of the database lock.
 o listPrecedence()
Return the precedence list.
 o listTermgps(Source)
List the currently defined termgps for source (in precedence order).
 o lock()
Lock the database.
 o mapSubmittedTerm(SubmittedTerm, Concept)
Map submittedTerm code to an existing Concept.
 o mergeConcepts(Concept, Concept)
Merge two Concepts.
 o moveElement(Concept, ConceptElement, Concept)
Move a ConceptElement from one Concept to another.
 o promote(SubmittedTerm, Partition, String, String)
Promote a submitted term to a new Concept.
 o promote(SubmittedTerm, Source, String, String)
Promote a submitted term to a new Concept.
 o reject(SubmittedTerm)
Reject a submitted term.
 o setPrecedence(Source, String, Source, String)
Set the precendence for a termgp.
 o splitConcept(Atom[])
Split a Concept.
 o splitFromConcept(Atom)
"Split" an existing Atom out into a new Concept.
 o steal()
Steal the database lock.
 o unlock()
Unlock the database.

Field Detail

 o copyUMLS
public static final boolean copyUMLS

Method Detail

 o addAtom
public void addAtom(Concept concept,
                    Partition partition,
                    java.lang.String termgp,
                    java.lang.String name) throws MetaphraseException
          Add a new Atom to a Concept.
Parameters:
concept - the Concept to which the Atom is to be added.
partition - the Partition of the new Atom.
termgp - the termgp of the new Atom.
name - the name of the new Atom.
Throws:
MetaphraseException - thrown in case of a failure to make the update.
 o addAtom
public void addAtom(Concept concept,
                    Source source,
                    java.lang.String termgp,
                    java.lang.String name) throws MetaphraseException
          Add a new Atom to a Concept without specifying the code.
Parameters:
concept - the Concept to which the Atom is to be added.
source - the Source of the new Atom.
termgp - the termgp of the new Atom.
name - the name of the new Atom.
Throws:
MetaphraseException - thrown in case of a failure to make the update.
 o addSemanticType
public void addSemanticType(Concept concept,
                            SemanticType semanticType) throws MetaphraseException
          Add a SemanticType to a Concept.
Parameters:
concept - the Concept to which the SemanticType is to be added.
semanticType - the SemanticType to be added.
Throws:
MetaphraseException - thrown in case of a failure to make the update.
 o addDefinition
public void addDefinition(Concept concept,
                          Source source,
                          java.lang.String text) throws MetaphraseException
          Add a Definition to a Concept.
Parameters:
concept - the Concept to which the Definition is to be added.
source - the Source of the new Definition.
text - the text of the new Definition.
Throws:
MetaphraseException - thrown in case of a failure to make the update.
 o addRelationship
public void addRelationship(Concept concept,
                            java.lang.String rel,
                            Concept concept2,
                            java.lang.String rela,
                            Source source) throws MetaphraseException
          Add a Relationship to a Concept. Also automatically adds the inverse to concept2.
Parameters:
concept - the Concept to which the Relationship is to be added.
rel - the rel of the new Relationship.
concept2 - the target of the new Relationship.
rela - the rela of the new Relationship.
source - the Source of the new Relationship.
Throws:
MetaphraseException - thrown in case of a failure to make the update.
 o deleteElement
public void deleteElement(Concept concept,
                          ConceptElement element) throws MetaphraseException
          Delete a ConceptElement from a Concept. The inverse of the add* methods above. An exception will be thrown if element is the only Atom or if element is the only SemanticType and concept status is not "unreviewed".
Parameters:
concept - the Concept from which the ConceptElement is to be deleted.
Throws:
MetaphraseException - thrown in case of a failure to make the update.
LastAtomException - thrown if element is the only Atom in concept.
 o moveElement
public void moveElement(Concept origin,
                        ConceptElement element,
                        Concept destination) throws MetaphraseException
          Move a ConceptElement from one Concept to another. Essentially executes a deleteElement followed by the appropriate add*.
Parameters:
origin - the Concept from which the ConceptElement is to be removed.
element - the ConceptElement to be moved.
destination - the Concept into which the ConceptElement is to be moved.
Throws:
MetaphraseException - thrown in case of a failure to make the update.
LastAtomException - thrown if element is the only Atom in origin.
 o createConcept
public Concept createConcept(Partition partition,
                             java.lang.String termgp,
                             java.lang.String name) throws MetaphraseException
          Create a new Concept. Since a Concept must contain at least one Atom, the specification of a new Atom must be provided. Use splitFromConcept to make the Concept from an existing Atom.
Parameters:
partition - the Partition of the new Atom.
termgp - the termgp of the new Atom.
name - the name of the new Atom.
Throws:
MetaphraseException - thrown in case of a failure to make the update.
 o createConcept
public Concept createConcept(Source source,
                             java.lang.String termgp,
                             java.lang.String code,
                             java.lang.String name) throws MetaphraseException
          Create a new Concept. Since a Concept must contain at least one Atom, the specification of a new Atom must be provided. Use splitFromConcept to make the Concept from an existing Atom.
Parameters:
partition - the Partition of the new Atom.
termgp - the termgp of the new Atom.
name - the name of the new Atom.
Throws:
MetaphraseException - thrown in case of a failure to make the update.
 o createConcept
public Concept createConcept(Source source,
                             java.lang.String termgp,
                             java.lang.String name) throws MetaphraseException
          Create a new Concept without specifying the code of the initial atom.
Parameters:
source - the Source of the new Atom.
termgp - the termgp of the new Atom.
name - the name of the new Atom.
Throws:
MetaphraseException - thrown in case of a failure to make the update.
 o splitFromConcept
public Concept splitFromConcept(Atom atom) throws MetaphraseException
          "Split" an existing Atom out into a new Concept. Essentially executes a deleteElement followed by a createConcept.
Parameters:
atom - the Atom to be split out.
Throws:
MetaphraseException - thrown in case of a failure to make the update.
LastAtomException - thrown if atom is the only Atom in atom.concept().
 o splitConcept
public Concept splitConcept(Atom atoms[]) throws MetaphraseException
          Split a Concept. Moves the specified (non-empty) set of Atoms from one Concept into a new Concept, and copies all non-Atom ConceptElements.
Parameters:
atoms - the list of Atoms to be split out.
Throws:
MetaphraseException - thrown if atoms is empty, or in case of a failure to make the update.
LastAtomException - thrown if atoms includes all the Atoms in a Concept.
 o deleteConcept
public void deleteConcept(Concept concept) throws MetaphraseException
          Delete a Concept from its database.
Parameters:
concept - the Concept to be deleted.
Throws:
MetaphraseException - thrown in case of a failure to make the update.
 o mergeConcepts
public java.lang.Exception[] mergeConcepts(Concept origin,
                                 Concept destination) throws MetaphraseException
          Merge two Concepts. Essentially deletes the origin, then adds what were its ConceptElements to destination. Returns an Exception[] containing any error messages encountered.
Parameters:
origin - the Concept which is to be merged.
destination - the Concept into which origin is to be merged.
Throws:
MetaphraseException - thrown only in case of a failure to make the delete or merge one or more Atoms. All other errors should be caught and simply reported.
 o createSource
public Source createSource(java.lang.String SAB,
                           java.lang.String status,
                           java.lang.String description) throws MetaphraseException
          Create a new source without specifying startingCode. Attempts to create an Atom in returned Source with null code will result in a MetaphraseException being thrown.
Parameters:
SAB - the SAB of the new Source.
status - the status of the new Source ("UMLS" or "local")
description - the description of the new Source.
Throws:
MetaphraseException - thrown in case of a failure to make the update.
 o createSource
public Source createSource(java.lang.String SAB,
                           java.lang.String status,
                           java.lang.String startingCode,
                           java.lang.String description) throws MetaphraseException
          Create a new source.
Parameters:
SAB - the SAB of the new Source.
status - the status of the new Source ("UMLS" or "local")
startingCode - code of first Atom created in the returned Source without specifying a code.
description - the description of the new Source.
Throws:
MetaphraseException - thrown in case of a failure to make the update.
 o editSource
public void editSource(Source source,
                       java.lang.String description) throws MetaphraseException
          Edit a source.
Parameters:
source - the Source to edit.
description - the new description of source.
Throws:
MetaphraseException - thrown in case of a failure to make the update.
 o createSubsource
public Source createSubsource(Source parent,
                              java.lang.String SAB,
                              java.lang.String description) throws MetaphraseException
          Create a new "subsource".
 o listPrecedence
public java.lang.Object[][] listPrecedence() throws MetaphraseException
          Return the precedence list. Each precedence is an Object[2] p, where p[0] is a Source and p[1] is a termgp (String).
Throws:
MetaphraseException - thrown in case of a failure to access metaphrase.
 o listTermgps
public java.lang.String[] listTermgps(Source source) throws MetaphraseException
          List the currently defined termgps for source (in precedence order).
Throws:
MetaphraseException - thrown in case of a failure to access metaphrase.
 o setPrecedence
public void setPrecedence(Source source,
                          java.lang.String termgp,
                          Source existingSource,
                          java.lang.String existingTermgp) throws MetaphraseException
          Set the precendence for a termgp.
Parameters:
source - the Source for which to set the precedence.
termgp - the termgp for which to set the precedence.
existingSource - the Source of the precedence above which to set the precedence.
existingTermgp - the termgp (a String) of the precedence above which to set the precedence.
Throws:
MetaphraseException - thrown in case of a failure to make the update.
 o createSemanticType
public SemanticType createSemanticType(java.lang.String name,
                                       SemanticType parent) throws MetaphraseException
          Create a new Semantic Type without specifying the TUI.
Parameters:
name - the name of the new SemanticType.
parent - the "parent" of the new SemanticType in the Semantic Type hierarchy. The new Semantic Type will be assigned an STN accordingly.
Throws:
MetaphraseException - thrown in case of a failure to make the update.
 o createSemanticType
public SemanticType createSemanticType(java.lang.String TUI,
                                       java.lang.String name,
                                       SemanticType parent) throws MetaphraseException
          Create a new Semantic Type.
Parameters:
TUI - the TUI of the new SemanticType.
name - the name of the new SemanticType.
parent - the "parent" of the new SemanticType in the Semantic Type hierarchy. The new Semantic Type will be assigned an STN accordingly.
Throws:
MetaphraseException - thrown in case of a failure to make the update.
 o createRelation
public Relation createRelation(java.lang.String name,
                               Relation parent,
                               java.lang.String inverse) throws MetaphraseException
          Create a new Relation without specifying the TUI.
Parameters:
name - the name of the new Relation.
parent - the "parent" of the new Relation in the Relation hierarchy. The new Relation will be assigned an STN accordingly.
inverse - the [name of the] inverse of the new Relation.
Throws:
MetaphraseException - thrown in case of a failure to make the update.
 o createRelation
public Relation createRelation(java.lang.String TUI,
                               java.lang.String name,
                               Relation parent,
                               java.lang.String inverse) throws MetaphraseException
          Create a new Relation.
Parameters:
TUI - the TUI of the new Relation.
name - the name of the new Relation.
parent - the "parent" of the new Relation in the Relation hierarchy. The new Relation will be assigned an STN accordingly.
inverse - the [name of the] inverse of the new Relation.
Throws:
MetaphraseException - thrown in case of a failure to make the update.
 o lock
public void lock() throws MetaphraseException
          Lock the database. While the database is locked, only edits made with this GoodEnoughUpdate instance will succeed.
Throws:
MetaphraseException - thrown in case of a failure to obtain a lock.
 o unlock
public void unlock() throws MetaphraseException
          Unlock the database. Remove the database lock, allowing edits to be made by any authenticated user.
Throws:
MetaphraseException - thrown in case of a failure to release the lock.
 o identifyLock
public java.lang.String identifyLock() throws MetaphraseException
          Return a string identifying the holder of the database lock.
Throws:
MetaphraseException - thrown in case of a failure to obtain a description (such as when the database is not locked).
 o steal
public void steal() throws MetaphraseException
          Steal the database lock. Like lock() (above), but succeeds even if the database is currently locked [presumably by another GoodEnoughUpdate instance]. Applications should use this method sparingly, since otherwise it defeats the whole purpose of having a lock at all.
Throws:
MetaphraseException - thrown in case of a failure to access Metaphrase.
 o getSubmittedTerms
public java.util.Enumeration getSubmittedTerms() throws MetaphraseException
          Retrieve Enumeration of terms submitted for addition to DB.
See Also:
submitTerm, SubmittedTerm
 o getSubmittedTerms
public java.util.Enumeration getSubmittedTerms(boolean result) throws MetaphraseException
          Retrieve Enumeration of terms submitted for addition to DB.
Parameters:
result - true to only unreviewed terms
false - to all submittedterms
See Also:
submitTerm, SubmittedTerm
 o promote
public Concept promote(SubmittedTerm submittedTerm,
                       Partition partition,
                       java.lang.String termgp,
                       java.lang.String name) throws MetaphraseException
          Promote a submitted term to a new Concept. If Metaphrase.submitReturnsConceptID(), then the new Concept will have submittedTerm.code() as its conceptID.

*Draft* Not yet implemented.

Throws:
MetaphraseException - thrown in case of a failure to make the update.
 o promote
public Concept promote(SubmittedTerm submittedTerm,
                       Source source,
                       java.lang.String termgp,
                       java.lang.String name) throws MetaphraseException
          Promote a submitted term to a new Concept. If Metaphrase.submitReturnsConceptID(), then the new Concept will have submittedTerm.code() as its conceptID.

*Draft* Not yet implemented.

Throws:
MetaphraseException - thrown in case of a failure to make the update.
 o reject
public void reject(SubmittedTerm submittedTerm) throws MetaphraseException
          Reject a submitted term.
Throws:
MetaphraseException - thrown in case of a failure to make the update.
 o mapSubmittedTerm
public void mapSubmittedTerm(SubmittedTerm submittedTerm,
                             Concept concept) throws MetaphraseException
          Map submittedTerm code to an existing Concept. To be used when Metaphrase.submitReturnsConceptID() is true; after this update, calls to "Metaphrase.getConcept(submittedTerm.code())" will behave the same as calls to "Metaphrase.getConcept(concept.conceptID())" [which is of course subject to change if concept is subsequently deleted or merged into another Concept]. Note: No new Atom is added to concept.

*Draft* Not yet implemented.

Throws:
MetaphraseException - thrown in case of a failure to make the update.

All Packages  Class Hierarchy  This Package  Previous  Next  Index