Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site

NAME

fms / Foundational Model Server - Interface to retrieve and store terms and their symbolic relationships


SYNOPSIS

fms invokes the server; (fms-help) will list the commands; (fms-quit) exits


DESCRIPTION

The Foundationsl Model Server is designed to act as a middle layer between the persistent store and FM clients. These term clients can be other information servers or end user interaction tools. All clients must speak to the server using the FMS API.


FMS API

Note that if a parameter is not an integer, t, or nil, it must be enclosed in quotes.

(fms-existsp <term>)

Returns t if the term exists, nil otherwise.

(fms-containsp <term> <hierarchy>)

Returns a count of the number of times the term occurs in the specified hierarchy. Returns 0 if the term is not present at all.

(fms-synonymp <term>)

Returns t if the term is a Synonym. nil if the term is the Preferred Form.

(fms-get-attribute <term> <attribute-name>)

Returns a single named attribute for the specified term. Note that the best way to get the attributes for a term is with kb-get-attributes since that will also give you the correct case.

(fms-get-attributes <term>)

Returns a list of all the attributes for the given term

(fms-find-term <term-spec> [regex-p] [limit])

Returns a list containing all the terms which match the term-spec.

Matches can either be:

Wildcard

thora*nerve matches anything with containing ``thora'' followed by ``nerve'' (with regex-p == nil/false/0) (default)

Regex

thora|abdom matches anything containing ``thora'' or ``abdom'' (with regex-p == t/true/1)

If limit is specified, then it must be one of:

preferred term
synonym

If it is specified but invalid, an error value will be returned.

(fms-get-hierarchies [term])

Returns a list indicating the names of the hierarchies present in the knowledge base. If a term is supplied, only hierarchies for that term are returned. If a term is supplied that doesn't exist in any hierarchy, an error is returned.

(fms-get-parents <term> <hierarchy>)

Returns a list of the names of the parents (in Preferred Form) of the specified term in the specified hierarchy

(fms-get-children <term> <hierarchy>)

Returns a list contain all the immediate children (in Preferred Form) of the specified term in the specified hierarchy.

(fms-num-hierarchies [term]

Returns the number of hierarchies present in the knowledge base. If a term is supplied, only hierarchies for that term are counted.

(fms-num-parents <term> <hierarchy>)

Returns the number of parents the specified term has in the specified hierarchy.

(fms-num-children <term> <hierarchy>)

Returns the number of children the specified term has in the specified hierarchy.

(fms-num-siblings <term> <hierarchy>)

Returns as a list the number of immediate children of each of the immediate parents. The specified term will be counted in each set.

(fms-has-hierarchy <term> <hierarchy>)

Returns hierarchy if term is contained in it; nil otherwise.

(fms-has-link <parent> <child> <hierarchy>)

Returns the parent term if parent has child as a child; nil otherwise.

(fms-has-sibling <term> <sib> <hierarchy>)

Returns the term if term and sib share a parent; nil otherwise.

(fms-get-term-info <term>)

Returns the ``Role'' and ``Authority'' attributes for the given term. The first of these is usually 'Preferred Name' or 'Synonym', and the latter indicates where the term originated and/or authorship.

(fms-get-master-term <term>)

Returns the Preferred Form of the term.

(fms-get-synonyms <term>)

Returns a list of all the Synonyms of the term. This will work whether you pass in the Preferred Form or one of its Synonyms. The term itself will be present in the list.

(fms-get-ancestors <term> <hierarchy> [max-height])

Returns a nested list of all the terms in the hierarchy to be found on any path leading to the given term. This is a recursive kb-get-parents.

max-height is optional and defaults to 10. Specify a height of 0 to retrieve all ancestors. A branch is stopped when it can't go any further or a term is duplicated in the branch.

Note that currently this only shows the first parent of each term. This is to speed development. It will be fixed later.

(fms-get-descendants <term> <hierarchy> [max-depth])

Returns a nested list of all the terms in the hierarchy to be found below the given term. This is a recursive kb-get-children.

max-depth is optional and defaults to 10. Specify a depth of 0 to retrieve all descendants. A branch is stopped when it can't go any further or a term is duplicated in the branch.

(fms-get-leaf-nodes <term> <hierarchy>)

Returns a flat list of only the leaves of all the descendents of that term in that hierarchy.