Package org.semanticweb.owlapi.io
Class XZFileDocumentTarget
java.lang.Object
org.semanticweb.owlapi.io.XZFileDocumentTarget
- All Implemented Interfaces:
AutoCloseable
,OWLOntologyDocumentTarget
public class XZFileDocumentTarget
extends Object
implements OWLOntologyDocumentTarget, AutoCloseable
An ontology document target which can write to a XZ File. Notice that this
works best when the output stream is closed explicitly in the client code.
- Since:
- 4.0.2
- Author:
- ses
-
Constructor Summary
ConstructorsConstructorDescriptionXZFileDocumentTarget
(File file) Construct an XZ document targetXZFileDocumentTarget
(File os, int presetLevel) Construct an XZ document target using the selected compression presetXZFileDocumentTarget
(File os, org.tukaani.xz.FilterOptions... filterOptions) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Gets an IRI that points to an ontology document.Gets anOutputStream
that can be used to write an ontology to an ontology document.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.semanticweb.owlapi.io.OWLOntologyDocumentTarget
getWriter
-
Constructor Details
-
XZFileDocumentTarget
- Parameters:
os
- the actual filefilterOptions
- Settings for XZ compression
-
XZFileDocumentTarget
public XZFileDocumentTarget(File os, int presetLevel) throws org.tukaani.xz.UnsupportedOptionsException Construct an XZ document target using the selected compression preset- Parameters:
os
- target FilepresetLevel
- LZMA2 Compression preset level- Throws:
org.tukaani.xz.UnsupportedOptionsException
- if the options selected are not acceptable
-
XZFileDocumentTarget
Construct an XZ document target- Parameters:
file
- target File
-
-
Method Details
-
getOutputStream
Description copied from interface:OWLOntologyDocumentTarget
Gets anOutputStream
that can be used to write an ontology to an ontology document. If none is available, return Optional.absent. Do not call multiple times for the same file: the output file will be opened for write multiple times.- Specified by:
getOutputStream
in interfaceOWLOntologyDocumentTarget
- Returns:
- The output stream
-
getDocumentIRI
Description copied from interface:OWLOntologyDocumentTarget
Gets an IRI that points to an ontology document. If none is available, return Optional.absent.- Specified by:
getDocumentIRI
in interfaceOWLOntologyDocumentTarget
- Returns:
- The IRI
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-