public abstract class OWLOntologyDocumentSourceBase extends Object implements OWLOntologyDocumentSource
Constructor and Description |
---|
OWLOntologyDocumentSourceBase(OWLDocumentFormat format,
String mime)
Constructs an ontology input source using the specified file.
|
Modifier and Type | Method and Description |
---|---|
Optional<String> |
getAcceptHeaders() |
OWLDocumentFormat |
getFormat() |
String |
getMIMEType() |
static IRI |
getNextDocumentIRI(String prefix) |
boolean |
isFormatKnown() |
boolean |
isMIMETypeKnown() |
void |
setAcceptHeaders(String headers) |
static InputStream |
wrap(InputStream delegate)
Wrap an input stream to strip the BOM.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDocumentIRI, getInputStream, getReader, isInputStreamAvailable, isReaderAvailable
public OWLOntologyDocumentSourceBase(@Nullable OWLDocumentFormat format, @Nullable String mime)
format
- ontology format. If null, it is considered unspecifiedmime
- mime type. If null or empty, it is considered unspecified.@Nonnull public static IRI getNextDocumentIRI(String prefix)
prefix
- prefix for result@Nonnull public static InputStream wrap(@Nonnull InputStream delegate)
delegate
- delegate to wrappublic OWLDocumentFormat getFormat()
getFormat
in interface OWLOntologyDocumentSource
public boolean isFormatKnown()
isFormatKnown
in interface OWLOntologyDocumentSource
public String getMIMEType()
getMIMEType
in interface OWLOntologyDocumentSource
public boolean isMIMETypeKnown()
isMIMETypeKnown
in interface OWLOntologyDocumentSource
public Optional<String> getAcceptHeaders()
getAcceptHeaders
in interface OWLOntologyDocumentSource
public void setAcceptHeaders(String headers)
setAcceptHeaders
in interface OWLOntologyDocumentSource
headers
- accept headers; if not set, the mime type will be used; if that is also
missing, the available parsers will contribute the headersCopyright © 2020 The University of Manchester. All rights reserved.