@HasPriority(value=1.0) public class ZipIRIMapper extends DefaultHandler implements OWLOntologyIRIMapper, Serializable
Constructor and Description |
---|
ZipIRIMapper(File zip,
String baseIRI)
Creates an auto-mapper which examines ontologies that reside in the specified zip file.
|
ZipIRIMapper(ZipFile zip,
String baseIRI)
Creates an auto-mapper which examines ontologies that reside in the specified zip file.
|
Modifier and Type | Method and Description |
---|---|
IRI |
getDocumentIRI(IRI ontologyIRI)
Given an ontology IRI, this method maps the ontology IRI to a document
IRI.
|
Set<String> |
getFileExtensions()
The mapper only examines files that have specified file extensions.
|
Stream<Map.Entry<IRI,IRI>> |
iriMappings() |
Stream<Map.Entry<IRI,IRI>> |
mappedEntries()
Gets the mappings of ontology IRIs that this mapper has found.
|
Stream<Map.Entry<String,IRI>> |
oboMappings() |
void |
setFileExtensions(Collection<String> extensions)
Sets the extensions of files that are to be examined for ontological content.
|
void |
startElement(String uri,
String localName,
String qName,
Attributes attributes) |
String |
toString() |
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
public ZipIRIMapper(File zip, String baseIRI) throws IOException
zip
- The zip file to map.baseIRI
- base iri for physical IRIsIOException
- if an exception reading from input is raisedpublic ZipIRIMapper(ZipFile zip, String baseIRI) throws IOException
zip
- The zip file to map.baseIRI
- base iri for physical IRIsIOException
- if an exception reading from input is raisedpublic Set<String> getFileExtensions()
Set
of file extensions.public void setFileExtensions(Collection<String> extensions)
extensions
- the set of extensionspublic Stream<Map.Entry<IRI,IRI>> mappedEntries()
Stream
of map entries, from logical to physical IRI@Nullable public IRI getDocumentIRI(IRI ontologyIRI)
OWLOntologyIRIMapper
getDocumentIRI
in interface OWLOntologyIRIMapper
ontologyIRI
- The ontology IRI to be mapped.null
if the mapper doesn't have mapping
for the specified ontology IRI.public void startElement(@Nullable String uri, @Nullable String localName, @Nullable String qName, @Nullable Attributes attributes) throws SAXException
startElement
in interface ContentHandler
startElement
in class DefaultHandler
SAXException
Copyright © 2020 The University of Manchester. All rights reserved.