Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

 

Anchor
BEL Document Validator
BEL Document Validator
BEL Document Validator

The BEL Document Validator tool, BelCheck, performs syntax and semantic validation on a BEL Document.

Anchor
_Toc181078963
_Toc181078963
Usage

BelCheck.sh [FILE]
where:
[FILE] is the name of the BEL Script or XBEL Documents to validate.

Anchor
_Toc181078964
_Toc181078964
Command Line Arguments

This section identifies the command line arguments for the BEL Document Validator.

Argument

Description

 -h, --help

Shows command line options.

--permissive

Enables permissive mode. This mode will return a success code if syntactic or semantic warnings are detected in the input file.
The default is to disable permissive mode.

--pedantic

Enables pedantic mode. This mode treats warnings as errors and will return a failure code if a syntax or semantic warning is detected in the input file.
The default is to disable pedantic mode.

-q, --quiet

Enables quiet mode. This mode suppresses warnings and errors sent to the output.
The default is to disable quite mode.

--summary

Optional. This switch will output the number of warnings and errors detected in the input file. The summary will still be written if the --quiet switch is set.

Anchor
_Toc181078965
_Toc181078965
Examples

Validating a BEL Script document

./BelCheck test.bel –-permissive –q
This command will read the BEL Script document test.bel and check it for syntactic and semantic errors. The –-permissive switch will force the validator to return a success code if one or more warnings are generated during the validation process. The –q switch will suppress listing the warnings on stdout.

Anchor
Document Converter
Document Converter
Document Converter

The Document Converter can convert a BEL document to XBEL, and an XBEL document to BEL.

Usage

DocumentConverter.sh [FILE]

where:
[FILE] is the name of a .bel or .xbel document.

ArgumentDescription
--debugEnables debug mode. Default is to disable debug mode.
-f, --forceIdentical to --no-preserve

-h, --help

Shows command line options.
--no-preserve

Optional. If specified, if a file with the same name as the output file already exists then it will be overwritten.
The default is always to preserve the existing file and generate a warning.

-o, --output-file <arg>

Optional. If present, it indicates the name of the output file to write the converted BEL or XBEL document to.

-t, --type <arg>

Specifies the format of the input file. By default, Document Converter infers the format of the document by
its extension (.bel or .xbel). If BEL then the input document is expected to be in BEL format and the output
document will in XBEL format. If XBEL then the input document is expected to be in XBEL format and the
output document will be in BEL format.

-v, --verboseEnables verbose mode. This mode outputs additional information as the application runs. The default is to
disable verbose mode.

Examples

Converting a document

./DocumentConverter.sh test.bel -o converted.xbel --no-preserve
This command will take in a BEL document (test.bel) and convert it to a XBEL document (converted.xbel). The -o switch will output the .xbel document to a file, and the --no-preserve switch will overwrite the previous .xbel file if one exists with the same name.