All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.Lexical.Metaphrase.Metaphrase

java.lang.Object
    |
    +----COM.Lexical.Metaphrase.Metaphrase

public abstract class Metaphrase
extends java.lang.Object
Metaphrase abstract object. Includes matches() methods, and accessor methods for Sources and SemanticTypes. Also has methods for setting a SemanticClassifier and flushing the caches, and method for retrieving Concepts by Concept ID.

Most recently added submitTerm and getConcepts methods.

Version:
Authority1.1, 11 Apr 2000
See Also:
RMIMetaphrase

Variable Index

 o APIVersion
 
 o cacheConcepts
Switch for concept cache.
 o defaultCooccurClassifier
The SemanticClassifier used by coOccur(Concept, String).
 o expandCooccurrenceSearches
Switch for aggressive Cooccurrence search.
 o reverseRelas
When set to true, "reverses" the relas of Relationships, allowing them to be "read" concept1 concept2, rather than the default concept2 concept1.
Should only be changed immediately after instantion or flush(), since cached relationships will not be reversed.

Method Index

 o classify(Concept)
Classify a Concept.
 o coOccur(Concept, String)
Get co-occurence data for given Concept and mType. Deprecated
 o DBName()
Name of the database.
 o flush()
Flush the cache.
 o getConcept(String)
Retrieve the Concept from Metaphrase with the given conceptID.
 o getConcepts(Source)
Returns Concept's with one or more Atom's from source [or a subsource of source].
 o getRelations()
Retrieve Enumeration of Relation's in DB.
 o getSemanticTypes()
Retrieve Enumeration of SemanticType's in DB.
 o getSources()
Retrieve Enumeration of Source's in DB.
 o inverse(String)
Return inverse of given rela.
 o matches(String, int)
Returns Match'es to given String against database. Deprecated
 o matches(String, SearchSpec)
Returns MatchSet's to given String against database.
 o relation(String)
Retrieve Relation for given rela.
 o semanticType(String)
Retrieve SemanticType with given TUI.
 o serverSoftwareVersion()
Identifies the version of the server software.
 o setSemanticClassifier(SemanticClassifier)
Set semanticClassifier.
 o source(String)
Retrieve Source with given SAB.
 o submitReturnsConceptID()
If true (the current value), the server returns "temporary conceptID's" for submitted terms.
 o submitTerm(String, Source, Concept, String, Concept[], Dictionary)
Submit a new term for review and possible addition to the given source.

Field Detail

 o APIVersion
public static final java.lang.String APIVersion
 o reverseRelas
public boolean reverseRelas
          When set to true, "reverses" the relas of Relationships, allowing them to be "read" concept1 concept2, rather than the default concept2 concept1.
Should only be changed immediately after instantion or flush(), since cached relationships will not be reversed.
 o cacheConcepts
public boolean cacheConcepts
          Switch for concept cache. If set to false, only the single most recently used Concept will be cached, and multiple distinct Concept instances (in terms of '==') may be constructed for the same conceptID.

Setting this attribute does not clear the Concept cache, so currently cached concepts will remain in the cache until flush() is called.

 o expandCooccurrenceSearches
public boolean expandCooccurrenceSearches
          Switch for aggressive Cooccurrence search. Defaults to true.
 o defaultCooccurClassifier
public final SemanticClassifier defaultCooccurClassifier
          The SemanticClassifier used by coOccur(Concept, String). Made public so it could also be used with the new cooccurs method in Concept.
See Also:
cooccurs(COM.Lexical.Metaphrase.SemanticClass, COM.Lexical.Metaphrase.SemanticClassifier)

Method Detail

 o submitReturnsConceptID
public boolean submitReturnsConceptID()
          If true (the current value), the server returns "temporary conceptID's" for submitted terms. In the future, some installations may return false, to indicate that submitTerm will return a partition code for the indicated Source.
See Also:
submitTerm
 o DBName
public java.lang.String DBName()
          Name of the database.
 o flush
public abstract void flush() throws MetaphraseException
          Flush the cache. The application is responsible for releasing all references to Metaphrase data objects before or after calling this method.
Throws:
MetaphraseException - thrown in case of a failure to reinitialize the cache. If this happens, do not continue to use this Metaphrase unless and until flush can be called successfully--it won't work.
 o serverSoftwareVersion
public abstract java.lang.String serverSoftwareVersion() throws MetaphraseException
          Identifies the version of the server software.
Throws:
MetaphraseException - thrown in case of an error accessing the RemoteMetaphrase.
 o source
public Source source(java.lang.String SAB) throws java.lang.NullPointerException
          Retrieve Source with given SAB.
Throws:
java.lang.NullPointerException - thrown if no matching Source was found.
 o getSources
public java.util.Enumeration getSources()
          Retrieve Enumeration of Source's in DB.
 o semanticType
public SemanticType semanticType(java.lang.String TUI)
          Retrieve SemanticType with given TUI.
Parameters:
TUI - the semantic Type Unique Identifier.
 o relation
public Relation relation(java.lang.String rela)
          Retrieve Relation for given rela.
Parameters:
rela - the name or inverse of the relation.
 o inverse
public java.lang.String inverse(java.lang.String rela)
          Return inverse of given rela.
Parameters:
rela - the name or inverse of a relation.
 o getSemanticTypes
public java.util.Enumeration getSemanticTypes()
          Retrieve Enumeration of SemanticType's in DB.
 o getRelations
public java.util.Enumeration getRelations()
          Retrieve Enumeration of Relation's in DB.
 o setSemanticClassifier
public void setSemanticClassifier(SemanticClassifier semanticClassifier)
          Set semanticClassifier. Used by Concept.semanticClass() for Concept's from this Metaphrase.
Parameters:
semanticClassifier - a SemanticClassifier.
 o matches
public abstract java.util.Enumeration matches(java.lang.String input,
                                    int limit) throws MetaphraseException
Note: matches() is deprecated.Replaced by matches(java.lang.String, COM.Lexical.Metaphrase.SearchSpec)

          Returns Match'es to given String against database.

Parameters:
input - String to match against.
limit - upper bound on number of matches returned.
Throws:
MetaphraseException - thrown in case of an error accessing Metaphrase.
See Also:
matches(java.lang.String, COM.Lexical.Metaphrase.SearchSpec)
 o matches
public abstract java.util.Enumeration matches(java.lang.String input,
                                    SearchSpec spec) throws MetaphraseException
          Returns MatchSet's to given String against database. Depending on the value of spec, the return may or may not contain only Match'es (singleton MatchSet's).
Parameters:
input - String to match against.
spec - a SearchSpec.
Throws:
MetaphraseException - thrown in case of an error accessing Metaphrase.
 o getConcepts
public abstract java.util.Enumeration getConcepts(Source source) throws MetaphraseException
          Returns Concept's with one or more Atom's from source [or a subsource of source].
Throws:
MetaphraseException - thrown in case of an error accessing Metaphrase.
 o coOccur
public java.lang.String[] coOccur(Concept concept,
                        java.lang.String mtype) throws MetaphraseException
Note: coOccur() is deprecated.Replaced by Concept.cooccurs

          Get co-occurence data for given Concept and mType.

Throws:
MetaphraseException - thrown in case of an error accessing Metaphrase.
See Also:
cooccurs
 o getConcept
public Concept getConcept(java.lang.String conceptID) throws MetaphraseException
          Retrieve the Concept from Metaphrase with the given conceptID.
Throws:
MetaphraseException - thrown in case of an error accessing to Metaphrase.
 o classify
public SemanticClass classify(Concept concept) throws java.lang.NullPointerException, MetaphraseException
          Classify a Concept.
Parameters:
concept - the Concept.
Throws:
java.lang.NullPointerException - thrown if semanticClassifier is null.
MetaphraseException - thrown in case of an error accessing the synonyms list.
 o submitTerm
public abstract java.lang.String submitTerm(java.lang.String name,
                                  Source source,
                                  Concept nearestConcept,
                                  java.lang.String note,
                                  Concept relatedConcepts[],
                                  java.util.Dictionary attributes) throws MetaphraseException
          Submit a new term for review and possible addition to the given source.
Parameters:
name - the name of the new term.
source - the Source in which the term should be created (as an Atom).
nearestConcept - an existing Concept with a meaning "close to" that intended by the submitted term. Allowed to be null.
note - a free text note for use by the submitter.
relatedConcepts - an array of [additional] Concepts related to the intended meaning of the submitted term.
attributes - arbitrary attribute-value pairs. This is space for a client to place additional information such as the name and/or ID of the user, phone number, name and/or version of the client app, etc.
Returns:
a [temporary] code for use in the application. Whether this should be interpreted as a "temporary conceptID" or as a partition code (for the given source) is conveyed by Metaphrase.submitReturnsConceptID(), which is a configuration option.
Throws:
MetaphraseException - thrown in case of an error accessing Metaphrase.

All Packages  Class Hierarchy  This Package  Previous  Next  Index