Package org.obolibrary.robot
Class CatalogElementHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.obolibrary.robot.CatalogElementHandler
-
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
public class CatalogElementHandler extends DefaultHandler
A SAX DefaultHandler for reading OWL Catalog files.
-
-
Constructor Summary
Constructors Constructor Description CatalogElementHandler(File parentFolder, Map<org.semanticweb.owlapi.model.IRI,org.semanticweb.owlapi.model.IRI> mappings)
Initialize the element handler with required context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
startElement(String uri, String localName, String qName, Attributes attributes)
Handle startElement events by looking for 'uri' elements, and their 'name' and 'uri' attributes, and updating 'mappings'.-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Constructor Detail
-
CatalogElementHandler
public CatalogElementHandler(File parentFolder, Map<org.semanticweb.owlapi.model.IRI,org.semanticweb.owlapi.model.IRI> mappings)
Initialize the element handler with required context.- Parameters:
parentFolder
- used to resolve relative file pathsmappings
- use to build a map for IRI resolution
-
-
Method Detail
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes)
Handle startElement events by looking for 'uri' elements, and their 'name' and 'uri' attributes, and updating 'mappings'. We only handle 'uri' elements, and do not update mappings if any of our checks fail.- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Parameters:
uri
- the URI of the start elementlocalName
- the local name of the start elementqName
- the qualified name of the start elementattributes
- the attributes object of the start element
-
-