public class SBOLValidate extends Object
Constructor and Description |
---|
SBOLValidate() |
Modifier and Type | Method and Description |
---|---|
static void |
clearErrors()
Empties the error list that is used to store SBOL validation exceptions.
|
static void |
compareDocuments(String file1,
SBOLDocument doc1,
String file2,
SBOLDocument doc2)
Compares the given two SBOL documents and outputs the difference into the
list of errors.
|
static List<String> |
getErrors()
Returns the error list used to store SBOL validation exceptions.
|
static int |
getNumErrors()
Returns the number of errors in the error list.
|
static void |
main(String[] args)
Command line method for reading an input file and producing an output file.
|
static SBOLDocument |
validate(PrintStream outputStream,
PrintStream errorStream,
String fileName,
String URIPrefix,
boolean complete,
boolean compliant,
boolean bestPractice,
boolean typesInURI,
String version,
boolean keepGoing,
String compareFile,
String compareFileName,
String mainFileName,
String topLevelURIStr,
boolean genBankOut,
boolean sbolV1out,
boolean fastaOut,
boolean snapGeneOut,
String outputFile,
boolean showDetail,
boolean noOutput,
boolean changeURIPrefix)
Deprecated.
|
static SBOLDocument |
validate(PrintStream outputStream,
PrintStream errorStream,
String fileName,
String URIPrefix,
boolean complete,
boolean compliant,
boolean bestPractice,
boolean typesInURI,
String version,
boolean keepGoing,
String compareFile,
String compareFileName,
String mainFileName,
String topLevelURIStr,
boolean genBankOut,
boolean sbolV1out,
boolean fastaOut,
String outputFile,
boolean showDetail,
boolean noOutput,
boolean changeURIPrefix)
Deprecated.
|
static SBOLDocument |
validate(PrintStream outputStream,
PrintStream errorStream,
String fileName,
String URIPrefix,
String defaultDisplayId,
boolean complete,
boolean compliant,
boolean bestPractice,
boolean typesInURI,
String version,
boolean keepGoing,
String compareFile,
String compareFileName,
String mainFileName,
String topLevelURIStr,
boolean genBankOut,
boolean sbolV1out,
boolean fastaOut,
boolean snapGeneOut,
String outputFile,
boolean showDetail,
boolean noOutput,
boolean changeURIPrefix)
The validate function will: - perform validation on the given input SBOL file
- perform comparison between 2 SBOL files - perform interconversion between
SBOL1 and SBOL2 - convert from SBOL to GenBank - convert from SBOL to FASTA
|
static void |
validateSBOL(SBOLDocument sbolDocument,
boolean complete,
boolean compliant,
boolean bestPractice)
Validates the given SBOL document.
|
public static void clearErrors()
public static List<String> getErrors()
public static int getNumErrors()
public static void validateSBOL(SBOLDocument sbolDocument, boolean complete, boolean compliant, boolean bestPractice)
getErrors()
method. Interpretations of the complete, compliant,
and bestPractice parameters are as follows:
true
value means that all identity URI references in
the given SBOL document can dereference to objects in the same document; a
false
value means otherwise.true
value means that all URIs in the given SBOL
document are compliant; a false
value means otherwise.true
value means that validation rules with the
RECOMMENDED condition in the SBOL specification are checked against the given
SBOLDocuemnt object; a false
value means otherwise.sbolDocument
- the given SBOLDocument
objectcomplete
- the given complete
flagcompliant
- the given compliant
flagbestPractice
- the given bestPractice
flagpublic static void compareDocuments(String file1, SBOLDocument doc1, String file2, SBOLDocument doc2)
file1
- the file name associated with doc1
doc1
- the first SBOL documentfile2
- the file name associated with doc2
doc2
- the second SBOL document@Deprecated public static SBOLDocument validate(PrintStream outputStream, PrintStream errorStream, String fileName, String URIPrefix, boolean complete, boolean compliant, boolean bestPractice, boolean typesInURI, String version, boolean keepGoing, String compareFile, String compareFileName, String mainFileName, String topLevelURIStr, boolean genBankOut, boolean sbolV1out, boolean fastaOut, String outputFile, boolean showDetail, boolean noOutput, boolean changeURIPrefix)
outputStream
- - stream for the output messageserrorStream
- - stream for the error messagesfileName
- - Input SBOL file nameURIPrefix
- - Default URI prefix to set the SBOL Document to be read in or to be created.complete
- - Set boolean variable to false to allow SBOL document to be incomplete. True otherwise.compliant
- - Set boolean variable to false to allow non-compliant URIs. True otherwise.bestPractice
- - Set boolean variable to true to check best practices. False otherwise.typesInURI
- - Set boolean variable to true to indicate that types are inserted into top-level identity URIs when they are created of the SBOL Document.version
- - Specify the version to use for converted SBOL objects.keepGoing
- - Set boolean variable to false to indicate fail on first error and stop program from continuing. True otherwise.compareFile
- - Second SBOL file to compare to the primary SBOL file.compareFileName
- - The name of the second SBOL file to compare to the primary SBOL file.mainFileName
- - Primary SBOL file to compare to the second SBOL file.topLevelURIStr
- - Specify the top level URI SBOL object contained within the given SBOL Document.genBankOut
- - Set boolean variable to true to convert input file to GenBank. False otherwise.sbolV1out
- - Set boolean variable to true to convert input file to SBOL1. False otherwise.fastaOut
- - Set boolean variable to true to convert input file to FASTA. False otherwise.outputFile
- - The specified output name to be generated if the validation must produce an output file.showDetail
- - Set boolean variable to true to display detailed error trace. False otherwise.noOutput
- - Set boolean variable to true to indicate no output file to be generated from validationchangeURIPrefix
- - Change the URI prefix to the specified URI prefix.@Deprecated public static SBOLDocument validate(PrintStream outputStream, PrintStream errorStream, String fileName, String URIPrefix, boolean complete, boolean compliant, boolean bestPractice, boolean typesInURI, String version, boolean keepGoing, String compareFile, String compareFileName, String mainFileName, String topLevelURIStr, boolean genBankOut, boolean sbolV1out, boolean fastaOut, boolean snapGeneOut, String outputFile, boolean showDetail, boolean noOutput, boolean changeURIPrefix)
outputStream
- - stream for the output messageserrorStream
- - stream for the error messagesfileName
- - Input SBOL file nameURIPrefix
- - Default URI prefix to set the SBOL Document to be read in or to be created.complete
- - Set boolean variable to false to allow SBOL document to be incomplete. True otherwise.compliant
- - Set boolean variable to false to allow non-compliant URIs. True otherwise.bestPractice
- - Set boolean variable to true to check best practices. False otherwise.typesInURI
- - Set boolean variable to true to indicate that types are inserted into top-level identity URIs when they are created of the SBOL Document.version
- - Specify the version to use for converted SBOL objects.keepGoing
- - Set boolean variable to false to indicate fail on first error and stop program from continuing. True otherwise.compareFile
- - Second SBOL file to compare to the primary SBOL file.compareFileName
- - The name of the second SBOL file to compare to the primary SBOL file.mainFileName
- - Primary SBOL file to compare to the second SBOL file.topLevelURIStr
- - Specify the top level URI SBOL object contained within the given SBOL Document.genBankOut
- - Set boolean variable to true to convert input file to GenBank. False otherwise.sbolV1out
- - Set boolean variable to true to convert input file to SBOL1. False otherwise.fastaOut
- - Set boolean variable to true to convert input file to FASTA. False otherwise.snapGeneOut
- - Set boolean variable to true to convert input file to SnapGene DNA. False otherwise.outputFile
- - The specified output name to be generated if the validation must produce an output file.showDetail
- - Set boolean variable to true to display detailed error trace. False otherwise.noOutput
- - Set boolean variable to true to indicate no output file to be generated from validationchangeURIPrefix
- - Change the URI prefix to the specified URI prefix.public static SBOLDocument validate(PrintStream outputStream, PrintStream errorStream, String fileName, String URIPrefix, String defaultDisplayId, boolean complete, boolean compliant, boolean bestPractice, boolean typesInURI, String version, boolean keepGoing, String compareFile, String compareFileName, String mainFileName, String topLevelURIStr, boolean genBankOut, boolean sbolV1out, boolean fastaOut, boolean snapGeneOut, String outputFile, boolean showDetail, boolean noOutput, boolean changeURIPrefix)
outputStream
- - stream for the output messageserrorStream
- - stream for the error messagesfileName
- - Input SBOL file nameURIPrefix
- - Default URI prefix to set the SBOL Document to be read in or to be created.defaultDisplayId
- - Default displayId to set the SBOL Document to be read in or to be created.complete
- - Set boolean variable to false to allow SBOL document to be incomplete. True otherwise.compliant
- - Set boolean variable to false to allow non-compliant URIs. True otherwise.bestPractice
- - Set boolean variable to true to check best practices. False otherwise.typesInURI
- - Set boolean variable to true to indicate that types are inserted into top-level identity URIs when they are created of the SBOL Document.version
- - Specify the version to use for converted SBOL objects.keepGoing
- - Set boolean variable to false to indicate fail on first error and stop program from continuing. True otherwise.compareFile
- - Second SBOL file to compare to the primary SBOL file.compareFileName
- - The name of the second SBOL file to compare to the primary SBOL file.mainFileName
- - Primary SBOL file to compare to the second SBOL file.topLevelURIStr
- - Specify the top level URI SBOL object contained within the given SBOL Document.genBankOut
- - Set boolean variable to true to convert input file to GenBank. False otherwise.sbolV1out
- - Set boolean variable to true to convert input file to SBOL1. False otherwise.fastaOut
- - Set boolean variable to true to convert input file to FASTA. False otherwise.snapGeneOut
- - Set boolean variable to true to convert input file to SnapGene DNA. False otherwise.outputFile
- - The specified output name to be generated if the validation must produce an output file.showDetail
- - Set boolean variable to true to display detailed error trace. False otherwise.noOutput
- - Set boolean variable to true to indicate no output file to be generated from validationchangeURIPrefix
- - Change the URI prefix to the specified URI prefix.public static void main(String[] args)
By default, validations on compliance and completeness are performed, and types for top-level objects are not used in URIs.
Options:
"-o" specifies an output filename
"-e" specifies a file to compare if equal to
"-l" indicates the language for output (default=SBOL2, other options SBOL1, GenBank, FASTA, SnapGene)
"-s" select only this topLevel object and those it references
"-p" specifies the default URI prefix for converted objects
"-c" change URI prefix to specified URIprefix
"-v" specifies version to use for converted objects
"-t" uses types in URIs
"-n" allow non-compliant URIs
"-i" allow SBOL document to be incomplete
"-b" check best practices
"-f" fail on first error
"-d" display detailed error trace
"-mf" main SBOL file if file diff. option is selected
"-cf" second SBOL file if file diff. option is selected
"-no" indicate no output file to be generated from validation
args
- arguments supplied at command line