public class SBOLWriter extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
keepGoing
A
true value of the keepGoing flag tells the SBOL writer
to continue writing an output file, after it encounters an SBOL conversion exception;
a false value forces the writer to stop writing after it encounters
an SBOL conversion exception. |
Constructor and Description |
---|
SBOLWriter() |
Modifier and Type | Method and Description |
---|---|
static void |
clearErrors()
Sets the error list that is used to store SBOL conversion exceptions
during reading to empty.
|
static List<String> |
getErrors()
Returns the error list that is used to store SBOL conversion exceptions.
|
static int |
getNumErrors()
Returns the number of errors in the error list.
|
static boolean |
isKeepGoing()
Returns the value of the
keepGoing flag. |
static void |
setKeepGoing(boolean keepGoing)
Sets the value for the keepGoing flag to the given boolean value.
|
static void |
write(SBOLDocument doc,
File file)
Outputs the given SBOL document's data from the RDF/XML serialization to the given file.
|
static void |
write(SBOLDocument doc,
File file,
String fileType)
Outputs this SBOL document's data from the serialization in the given serialization format
to the given file.
|
static void |
write(SBOLDocument doc,
OutputStream out)
Outputs this SBOL document's data from the RDF/XML serialization to the given output stream.
|
static void |
write(SBOLDocument doc,
OutputStream out,
String fileType)
Serializes a given SBOLDocument and outputs the data from the serialization to the given output stream
in the specified fileType format.
|
static void |
write(SBOLDocument doc,
String filename)
Outputs this SBOL document's data from the RDF/XML serialization to a new file with the given file name.
|
static void |
write(SBOLDocument doc,
String filename,
String fileType)
Outputs this SBOL document's data from serialization in the given serialization format
to a new file with the given file name.
|
public static boolean keepGoing
true
value of the keepGoing
flag tells the SBOL writer
to continue writing an output file, after it encounters an SBOL conversion exception;
a false
value forces the writer to stop writing after it encounters
an SBOL conversion exception.public static boolean isKeepGoing()
keepGoing
flag.keepGoing
flagpublic static void setKeepGoing(boolean keepGoing)
A true
value means that reading will keep going after encountering an SBOL validation exception,
and a false
value means otherwise.
keepGoing
- the boolean value for the keepGoing flagpublic static void clearErrors()
public static List<String> getErrors()
public static int getNumErrors()
public static void write(SBOLDocument doc, File file) throws IOException, SBOLConversionException
This method first creates a BufferedOutputStream
from the given file, and then
calls write(SBOLDocument, OutputStream)
.
doc
- the given SBOL documentfile
- the given output fileIOException
- see IOException
SBOLConversionException
- - problem found during serializationpublic static void write(SBOLDocument doc, File file, String fileType) throws IOException, SBOLConversionException
This method first creates a BufferedOutputStream
from the given file, and then
calls write(SBOLDocument, OutputStream, String)
.
doc
- the given SBOL documentfile
- the given output filefileType
- the given serialization formatIOException
- see IOException
SBOLConversionException
- - problem found during serializationpublic static void write(SBOLDocument doc, OutputStream out) throws SBOLConversionException
doc
- the given SBOL documentout
- the given output streamSBOLConversionException
- - problem found during serializationpublic static void write(SBOLDocument doc, String filename) throws IOException, SBOLConversionException
This method calls write(SBOLDocument, File)
by passing this SBOL document, and a
new file with the given file name.
doc
- the given SBOL documentfilename
- the given output file nameIOException
- see IOException
SBOLConversionException
- - problem found during serializationpublic static void write(SBOLDocument doc, String filename, String fileType) throws IOException, SBOLConversionException
This method calls write(SBOLDocument, File, String)
by passing this SBOL document, and a
new file with the given file name and type.
doc
- the given SBOLDocument objectfilename
- the name of the serialized output filefileType
- the given file format, such as RDF/XML, JSON, or Turtle.IOException
- see IOException
SBOLConversionException
- - problem found during serializationpublic static void write(SBOLDocument doc, OutputStream out, String fileType) throws SBOLConversionException, IOException
doc
- the given SBOLDocument objectout
- the serialized output streamfileType
- the given file format, such as RDF/XML, JSON, or Turtle.SBOLConversionException
- - problem found during serializationIOException
- see IOException