@HasPriority(value=1.0) public class AutoIRIMapper extends DefaultHandler implements OWLOntologyIRIMapper, Serializable
Constructor and Description |
---|
AutoIRIMapper(File rootDirectory,
boolean recursive)
Creates an auto-mapper which examines ontologies that reside in the specified root folder
(and possibly sub-folders).
|
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.
|
Set<IRI> |
getOntologyIRIs()
Gets the set of ontology IRIs that this mapper has found.
|
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() |
void |
update()
update the map.
|
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
public AutoIRIMapper(File rootDirectory, boolean recursive)
rootDirectory
- The root directory which should be searched for ontologies; this can
also be a zip/jar file containing ontologies. If root is actually a
folder, zip/jar files included in the folder are parsed for ontologies.
The zip parsing is delegated to ZipIRIMapper.recursive
- Sub directories will be searched recursively if true
.public Set<String> getFileExtensions()
Set
of file extensions.public void setFileExtensions(Collection<String> extensions)
owl
, xml
and rdf
). Only files that have the specified
extensions will be examined to see if they contain ontologies.extensions
- the set of extensionspublic Set<IRI> getOntologyIRIs()
Set
of ontology (logical) IRIspublic void update()
@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.