/** * @param limit maximum number of XML entities to expand. * @return An {@code OntologyConfigurator} with the new option set. */ public OWLOntologyLoaderConfiguration setEntityExpansionLimit(String limit) { if (getEntityExpansionLimit().equals(limit)) { return this; } OWLOntologyLoaderConfiguration configuration = copyConfiguration(); configuration.overrides.put(ConfigurationOptions.ENTITY_EXPANSION_LIMIT, limit); return configuration; }
/** * @param limit maximum number of XML entities to expand. * @return An {@code OntologyConfigurator} with the new option set. */ public OWLOntologyLoaderConfiguration setEntityExpansionLimit(String limit) { if (getEntityExpansionLimit().equals(limit)) { return this; } OWLOntologyLoaderConfiguration configuration = copyConfiguration(); configuration.overrides.put(ConfigurationOptions.ENTITY_EXPANSION_LIMIT, limit); return configuration; }
/** * @param limit maximum number of XML entities to expand. * @return An {@code OntologyConfigurator} with the new option set. */ public OWLOntologyLoaderConfiguration setEntityExpansionLimit(String limit) { if (getEntityExpansionLimit().equals(limit)) { return this; } OWLOntologyLoaderConfiguration configuration = copyConfiguration(); configuration.overrides.put(ConfigurationOptions.ENTITY_EXPANSION_LIMIT, limit); return configuration; }
DeclHandler handler = new DeclarationHandler(); SAXParsers.initParserWithOWLAPIStandards(handler, inputConsumer.getConfiguration() .getEntityExpansionLimit()).parse(source, this); inputConsumer.endModel(); } catch (URISyntaxException e) {
DeclHandler handler = new DeclarationHandler(); SAXParsers.initParserWithOWLAPIStandards(handler, inputConsumer.getConfiguration() .getEntityExpansionLimit()).parse(source, this); inputConsumer.endModel(); } catch (URISyntaxException e) {
DeclHandler handler = new DeclarationHandler(); SAXParsers.initParserWithOWLAPIStandards(handler, inputConsumer.getConfiguration() .getEntityExpansionLimit()).parse(source, this); inputConsumer.endModel(); } catch (URISyntaxException e) {
DeclHandler handler = new DeclarationHandler(); SAXParsers.initParserWithOWLAPIStandards(handler, inputConsumer.getConfiguration() .getEntityExpansionLimit()).parse(source, this); inputConsumer.endModel(); } catch (URISyntaxException e) {
@Override public OWLDocumentFormat parse(OWLOntologyDocumentSource documentSource, OWLOntology ontology, OWLOntologyLoaderConfiguration configuration) { try { OWLXMLDocumentFormat format = new OWLXMLDocumentFormat(); InputSource isrc = getInputSource(documentSource, configuration); OWLXMLPH handler = new OWLXMLPH(ontology, configuration); SAXParsers.initParserWithOWLAPIStandards(null, configuration.getEntityExpansionLimit()) .parse(isrc, handler); if (!handler.atLeastOneTagFound()) { throw new OWLXMLParserException(handler, "No known tags in the input: is the file an OWL/XML ontology?"); } format.copyPrefixesFrom(handler.getPrefixName2PrefixMap()); format.setDefaultPrefix(handler.getBase().toString()); return format; } catch (SAXException | IOException | OWLOntologyInputSourceException | IllegalStateException e) { // General exception throw new OWLParserException(e); } } }
@Override public OWLDocumentFormat parse(OWLOntologyDocumentSource documentSource, OWLOntology ontology, OWLOntologyLoaderConfiguration configuration) { try { OWLXMLDocumentFormat format = new OWLXMLDocumentFormat(); InputSource isrc = getInputSource(documentSource, configuration); OWLXMLPH handler = new OWLXMLPH(ontology, configuration); SAXParsers.initParserWithOWLAPIStandards(null, configuration.getEntityExpansionLimit()) .parse(isrc, handler); if (!handler.atLeastOneTagFound()) { throw new OWLXMLParserException(handler, "No known tags in the input: is the file an OWL/XML ontology?"); } format.copyPrefixesFrom(handler.getPrefixName2PrefixMap()); format.setDefaultPrefix(handler.getBase().toString()); return format; } catch (SAXException | IOException | OWLOntologyInputSourceException | IllegalStateException e) { // General exception throw new OWLParserException(e); } } }
@Override public OWLDocumentFormat parse(OWLOntologyDocumentSource documentSource, OWLOntology ontology, OWLOntologyLoaderConfiguration configuration) { try { OWLXMLDocumentFormat format = new OWLXMLDocumentFormat(); InputSource isrc = getInputSource(documentSource, configuration); OWLXMLPH handler = new OWLXMLPH(ontology, configuration); SAXParsers.initParserWithOWLAPIStandards(null, configuration.getEntityExpansionLimit()) .parse(isrc, handler); if (!handler.atLeastOneTagFound()) { throw new OWLXMLParserException(handler, "No known tags in the input: is the file an OWL/XML ontology?"); } format.copyPrefixesFrom(handler.getPrefixName2PrefixMap()); format.setDefaultPrefix(handler.getBase().toString()); return format; } catch (SAXException | IOException | OWLOntologyInputSourceException | IllegalStateException e) { // General exception throw new OWLParserException(e); } } }
@Override public OWLDocumentFormat parse(OWLOntologyDocumentSource documentSource, OWLOntology ontology, OWLOntologyLoaderConfiguration configuration) { try { OWLXMLDocumentFormat format = new OWLXMLDocumentFormat(); InputSource isrc = getInputSource(documentSource, configuration); OWLXMLPH handler = new OWLXMLPH(ontology, configuration); SAXParsers.initParserWithOWLAPIStandards(null, configuration.getEntityExpansionLimit()) .parse(isrc, handler); if (!handler.atLeastOneTagFound()) { throw new OWLXMLParserException(handler, "No known tags in the input: is the file an OWL/XML ontology?"); } format.copyPrefixesFrom(handler.getPrefixName2PrefixMap()); format.setDefaultPrefix(handler.getBase().toString()); return format; } catch (SAXException | IOException | OWLOntologyInputSourceException | IllegalStateException e) { // General exception throw new OWLParserException(e); } } }