plugin.asn
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:8k
- ---
- --- Definitions for standard plugin interfaces
- ---
- NCBI-Plugin DEFINITIONS ::=
- BEGIN
- EXPORTS PluginValue, PluginValueConstraint,
- PluginArg, PluginArgSet, PluginInfo,
- PluginRequest, PluginReply, PluginReplyAction,
- PluginMessage, MessageStatus, MessageHistoryInfo,
- PluginCommand, PluginCommandSet, PluginDataFile;
- IMPORTS Bioseq, Seq-annot FROM NCBI-Sequence
- Bioseq-set, Seq-entry FROM NCBI-Seqset
- Seq-feat FROM NCBI-Seqfeat
- Seq-id, Seq-loc FROM NCBI-Seqloc;
- ---
- --- ViewCommand defines the command set a view plugin supports
- ---
- ViewCommand ::= ENUMERATED {
- no-command(0),
- create-context(1),
- destroy-context(2),
- new-view(3)
- }
- ---
- --- DataCommand defines the commands understood by data loader
- --- plugins
- ---
- DataCommand ::= ENUMERATED {
- no-command(0),
- create-context(1),
- destroy-context(2),
- load(3),
- save(4),
- import(5),
- search(6),
- manage(7)
- }
- ---
- --- AlgoCommand defines commands understood by algorithm plugins
- ---
- AlgoCommand ::= ENUMERATED {
- no-command(0),
- create-context(1),
- destroy-context(2),
- run(3),
- pause(4),
- finish(5),
- abort(6)
- }
- ---
- --- This defines the object stored in a plugin cache
- ---
- PluginCache ::= SET OF PluginLibInfo
- ---
- --- kludge around missing CTypeRef code (doesn't support
- --- SET OF SEQUENCE {...} if the sequence includes a derived class)
- ---
- PluginLibInfo ::= SEQUENCE {
- library VisibleString,
- enabled BOOLEAN DEFAULT TRUE, -- flag: is this plugin enabled?
- info PluginInfo
- }
- ---
- --- PluginInfo defines the basic information that all plugins must support
- ---
- PluginInfo ::= SEQUENCE {
- ver-major INTEGER, -- major version number
- ver-minor INTEGER, -- minor version number
- ver-revision INTEGER, -- plugin-specific revision number
- ver-build-date VisibleString, -- date of build
- class-name VisibleString, -- text tag uniquely identifying
- -- this plugin
- menu-item VisibleString OPTIONAL, -- menu item that will be shown
- -- in a GUI
- tooltip VisibleString OPTIONAL, -- text for mouse-overs and status
- -- bars
- help-file VisibleString OPTIONAL, -- location of the help file
- -- associated with this plugin
- autorun BOOLEAN OPTIONAL, -- flag: if true, we launch all
- -- plugin commands on app startup
- data-files SET OF PluginDataFile OPTIONAL,
- commands PluginCommandSet -- the commands and requirements
- -- for this plugin
- }
- ---
- --- PluginRequest defines the commands we can issue to a plugin
- ---
- PluginRequest ::= CHOICE {
- view PluginCommand,
- data PluginCommand,
- algo PluginCommand
- }
- ---
- --- PluginReply defines the responses received from a plugin after completion
- --- of its activities.
- ---
- PluginReply ::= SEQUENCE {
- status MessageStatus DEFAULT failed,
- action SET OF PluginReplyAction OPTIONAL,
- raw SET OF PluginValue OPTIONAL, -- things we've produced
- formatted PluginArgSet OPTIONAL -- caller-defined args
- }
- ---
- --- PluginReplyAction lists possible modes of action for the items returned
- --- from a plugin
- ---
- PluginReplyAction ::= CHOICE {
- add-to-document NULL,
- new-view VisibleString,
- store NULL
- }
- ---
- --- PluginCommandSet defines a separate container for holding the set of all
- --- commands a plugin understands. It is used in setting up a plugin cache;
- --- all plugins must support an interface to fill in and retrieve this
- --- structure.
- ---
- PluginCommandSet ::= CHOICE {
- view SET OF PluginCommand,
- data SET OF PluginCommand,
- algo SET OF PluginCommand
- }
- ---
- --- PluginCommand is the list of arguments that a plugin takes
- ---
- PluginCommand ::= SEQUENCE {
- command INTEGER, -- enumerated command type, as integer
- context VisibleString OPTIONAL, -- optional named context
- args PluginArgSet OPTIONAL -- input arguments
- }
- ---
- --- PluginArgSet defines a set of arguments
- ---
- PluginArgSet ::= SEQUENCE OF PluginArg
- ---
- --- PluginArg defines the properties of a given argument
- ---
- PluginArg ::= SEQUENCE {
- name VisibleString,
- desc VisibleString OPTIONAL,
- long-desc VisibleString OPTIONAL,
- optional BOOLEAN DEFAULT FALSE,
- default BOOLEAN DEFAULT FALSE,
- hidden BOOLEAN DEFAULT FALSE,
- data CHOICE {
- single PluginValue,
- array SET OF PluginValue
- },
- constraint SET OF PluginValueConstraint OPTIONAL
- }
- ---
- --- Wrappers for non-serializable objects
- --- For these we encode a pointer and a name of the object type
- ---
- PluginObject ::= SEQUENCE {
- docaddr VisibleString,
- objaddr VisibleString,
- subtype VisibleString
- }
- ---
- --- PluginValue variant
- ---
- PluginValue ::= CHOICE {
- integer VisibleString,
- double VisibleString,
- string VisibleString,
- file VisibleString,
- boolean VisibleString,
- document PluginObject,
- object PluginObject
- }
- ---
- --- Value constraints
- ---
- PluginValueConstraint ::= CHOICE {
- --- simple constraints for built-in types
- lower VisibleString,
- upper VisibleString,
- range PluginValueRangeConstraint,
- set SET OF VisibleString,
- --- bioseq constraints
- seq-repr SET OF INTEGER, --- segmented, raw, virtual, etc
- seq-mol SET OF INTEGER, --- nucleic acid, protein, etc
- seq-mol-same-type NULL,
- seq-length-lower INTEGER,
- seq-length-upper INTEGER,
- seq-length-range PluginValueRangeConstraint,
- seq-length-same NULL,
- --- seq-entry constraints
- entry-type INTEGER, --- genprod set, nucprot set, etc
- --- seq-annot constraints
- annot-type INTEGER, --- feature table, alignments, graphs
- --- seq-feat constraints
- feat-type SET OF INTEGER, --- gene, rna, user, pub, etc.
- feat-subtype SET OF INTEGER, --- any recognized subtype
- feat-has-product NULL --- only features with the product flag set
- }
- PluginValueRangeConstraint ::= SEQUENCE {
- lower VisibleString,
- upper VisibleString
- }
- ---
- --- specification for a data file required by a plugin
- --- these are established with a set of aliases that a plugin can
- --- reference
- ---
- PluginDataFile ::= SEQUENCE {
- alias VisibleString,
- url VisibleString,
- location VisibleString
- }
- ---
- --- MessageStatus defines return codes for plugin operations
- ---
- MessageStatus ::= ENUMERATED {
- failed(0),
- success(1),
- not-handled(2),
- ignored(3),
- initiated(4),
- completed(5)
- }
- ---
- --- PluginMessage holds information regarding a single request to a plugin
- ---
- PluginMessage ::= SEQUENCE {
- -- routing information
- source VisibleString OPTIONAL, -- source plugin
- destination VisibleString, -- destination plugin
- --- context in which we operate
- context VisibleString OPTIONAL,
- in-reply-to PluginMessage OPTIONAL, -- PluginMessage we are responding to
-
- request PluginRequest, -- command to be passed to the plugin
- reply PluginReply -- reply received from a plugin
- }
- ---
- --- MRU structures
- ---
- PluginMRUEntry ::= SEQUENCE {
- label VisibleString,
- message PluginMessage
- }
- PluginMRUList ::= SEQUENCE OF PluginMRUEntry
- ---
- --- PluginMessageChain holds a set of plugin messages that are intended to
- --- be called sequentially.
- ---
- PluginMessageChain ::= SEQUENCE OF PluginMessage
- ---
- --- MessageHistoryInfo holds information about plugin commands
- ---
- MessageHistoryInfo ::= SEQUENCE {
- id INTEGER,
- description VisibleString,
- reply-to INTEGER DEFAULT 0,
- time VisibleString OPTIONAL
- }
- END