Define a Format for the Bioformats projects.
These are the allowed fields.
This is the externally visible string that people should use. It must
be unique. The grammer for a name is not yet written formalized, but
here are some examples: swissprot
swissprot/38
pdb-generic
pdb-generic/2.1
pdb/XPLOR-3.1
This value should not be visible to most people. It is used as part
of the resolution system to find builders, converters, and writers
without having to define everything at the beginning. The abbrev name
must be usable as a Python module name, which means it must be of the
form: [a-zA-Z_][a-zA-Z0-9_]*
If not given, the name is used.
An expression need to be defined at the bottom-most level of the
recognition tree.
The object needs to support the make_parser method. The created
parser is tested against the input text. If the parse is successful,
or generates a ParserIncompleteException, then the expression is said
to accept the text.
The filter must not accept empty input.
If not given, expression is used.
Some formats contain a single record, others returns a list of records.
Different parts of the API change to handle these as expected. This value
should be 0 or 1. The default is 1, which means there may be
more than one record in the file.
== These fields concern the original provider of the format
This may have nothing to do with the Bioformats format definition.
provider_url -- URL for the site providing the format (optional)
Example: http://www.expasy.ch/
provider_doc -- URL for the primary documentation on the format (optional)
Example: http://www.expasy.ch/sprot/userman.html
There may not be a permanent URL for all versions of a given
documentation. Use the site you think is the most appropriate. == These fields concern the people who wrote this definition
(The name may be of a person, organization, non-corporeal being, etc.)
In case you want people to know more about you.
== These fields concern the people who wrote this definition
The intent is to allow the author fields to contain information about
the person who wrote the definition, and the maintainer fields to
contain information about who to bug when things go wrong. They may
be different people. It may even be that the author is a person in a
company, and the company is listed as the maintainer.
If not given, the default is the same as the author_name
If not given, the default is the same as the author_email
If not given, the default is the same as author_url.
Imported modules
|
|
import Martel
from Martel import Parser
import ReseekFile
import StdHandler
import _FmtUtils
import re
import sys
import urllib
from xml.sax import handler, saxutils
|
Functions
|
|
_Trace
_build_child_path
_build_parent_path
_parse_docstring
check_parser_file
check_parser_string
|
|
_Trace
|
_Trace ( trace )
|
|
_build_child_path
|
_build_child_path (
format,
visited,
format_list,
)
|
|
_build_parent_path
|
_build_parent_path (
format,
visited,
format_list,
)
|
|
_parse_docstring
|
_parse_docstring ()
Exceptions
|
|
TypeError("Incorrect format: %r" %( line, ) )
|
|
|
check_parser_file
|
check_parser_file (
expression,
infile,
trace,
debug_level,
)
|
|
check_parser_string
|
check_parser_string (
expression,
s,
trace,
debug_level,
)
|
Classes
|
|
|
|