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
APIVersion-
cacheConcepts- Switch for concept cache.
defaultCooccurClassifier- The SemanticClassifier used by coOccur(Concept, String).
expandCooccurrenceSearches- Switch for aggressive Cooccurrence search.
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.
classify(Concept)
- Classify a Concept.
coOccur(Concept, String)
- Get co-occurence data for given Concept and mType.
Deprecated
DBName()
- Name of the database.
flush()
- Flush the cache.
getConcept(String)
- Retrieve the Concept from Metaphrase with the given conceptID.
getConcepts(Source)
- Returns Concept's with one or more Atom's from source [or a
subsource of source].
getRelations()
- Retrieve Enumeration of Relation's in DB.
getSemanticTypes()
- Retrieve Enumeration of SemanticType's in DB.
getSources()
- Retrieve Enumeration of Source's in DB.
inverse(String)
- Return inverse of given rela.
matches(String, int)
- Returns Match'es to given String against database.
Deprecated
matches(String, SearchSpec)
- Returns MatchSet's to given String against database.
relation(String)
- Retrieve Relation for given rela.
semanticType(String)
- Retrieve SemanticType with given TUI.
serverSoftwareVersion()
- Identifies the version of the server software.
setSemanticClassifier(SemanticClassifier)
- Set semanticClassifier.
source(String)
- Retrieve Source with given SAB.
submitReturnsConceptID()
- If true (the current value), the server returns "temporary
conceptID's" for submitted terms.
submitTerm(String, Source, Concept, String, Concept[], Dictionary)
- Submit a new term for review and possible addition to the given
source.
APIVersion
public static final java.lang.String APIVersion
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.
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.
expandCooccurrenceSearches
public boolean expandCooccurrenceSearches
Switch for aggressive Cooccurrence search. Defaults to true.
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)
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
DBName
public java.lang.String DBName()
Name of the database.
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.
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.
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.
getSources
public java.util.Enumeration getSources()
Retrieve Enumeration of Source's in DB.
semanticType
public SemanticType semanticType(java.lang.String TUI)
Retrieve SemanticType with given TUI.
- Parameters:
TUI - the semantic Type Unique Identifier.
relation
public Relation relation(java.lang.String rela)
Retrieve Relation for given rela.
- Parameters:
rela - the name or inverse of the relation.
inverse
public java.lang.String inverse(java.lang.String rela)
Return inverse of given rela.
- Parameters:
rela - the name or inverse of a relation.
getSemanticTypes
public java.util.Enumeration getSemanticTypes()
Retrieve Enumeration of SemanticType's in DB.
getRelations
public java.util.Enumeration getRelations()
Retrieve Enumeration of Relation's in DB.
setSemanticClassifier
public void setSemanticClassifier(SemanticClassifier semanticClassifier)
Set semanticClassifier.
Used by Concept.semanticClass()
for Concept's from this Metaphrase.
- Parameters:
semanticClassifier - a SemanticClassifier.
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)
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.
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.
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
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.
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.
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