public IRI getSynonym(IRI original) { if (!configuration.isStrict()) { IRI synonymIRI = synonymMap.get(original); if (synonymIRI != null) { return synonymIRI; } } return original; }
private void addType(IRI iri, Set<IRI> types, boolean explicitlyTyped) { if (configuration.isStrict() && !explicitlyTyped) { LOGGER.warn("STRICT: Not adding implicit type iri={} types={}", iri, types); return; } types.add(iri); }
private void addType(IRI iri, Set<IRI> types, boolean explicitlyTyped) { if (configuration.isStrict() && !explicitlyTyped) { LOGGER.warn("STRICT: Not adding implicit type iri={} types={}", iri, types); return; } types.add(iri); }
private void addType(IRI iri, Set<IRI> types, boolean explicitlyTyped) { if (configuration.isStrict() && !explicitlyTyped) { LOGGER.warn("STRICT: Not adding implicit type iri={} types={}", iri, types); return; } types.add(iri); }
private void addType(IRI iri, Set<IRI> types, boolean explicitlyTyped) { if (configuration.isStrict() && !explicitlyTyped) { LOGGER.warn("STRICT: Not adding implicit type iri={} types={}", iri, types); return; } types.add(iri); }
private void addType(IRI iri, Set<IRI> types, boolean explicitlyTyped) { if (configuration.isStrict()) { if (explicitlyTyped) { types.add(iri); } else { logger.warn("STRICT: Not adding implicit type iri={} types={}", iri, types); } } else { types.add(iri); } }
/** * @param strict new value for strict * @return copy of the configuration with new strict value */ public OWLOntologyLoaderConfiguration setStrict(boolean strict) { // do not make copies if setting the same value if (isStrict() == strict) { return this; } OWLOntologyLoaderConfiguration copy = copyConfiguration(); copy.overrides.put(PARSE_WITH_STRICT_CONFIGURATION, Boolean.valueOf(strict)); return copy; }
/** * @param strict new value for strict * @return copy of the configuration with new strict value */ public OWLOntologyLoaderConfiguration setStrict(boolean strict) { // do not make copies if setting the same value if (isStrict() == strict) { return this; } OWLOntologyLoaderConfiguration copy = copyConfiguration(); copy.overrides.put(PARSE_WITH_STRICT_CONFIGURATION, Boolean.valueOf(strict)); return copy; }
/** * @param strict new value for strict * @return copy of the configuration with new strict value */ public OWLOntologyLoaderConfiguration setStrict(boolean strict) { // do not make copies if setting the same value if (isStrict() == strict) { return this; } OWLOntologyLoaderConfiguration copy = copyConfiguration(); copy.overrides.put(PARSE_WITH_STRICT_CONFIGURATION, Boolean.valueOf(strict)); return copy; }
protected boolean isStrict() { return consumer.getConfiguration().isStrict(); }
private <E extends OWLEntity> E getErrorEntity(EntityType<E> entityType) { IRI iri = IRI.create("http://org.semanticweb.owlapi/error#", "Error" + ERRORCOUNTER.incrementAndGet()); LOGGER.error("Entity not properly recognized, missing triples in input? {} for type {}", iri, entityType); if (configuration.isStrict()) { throw new OWLParserException( "Entity not properly recognized, missing triples in input? " + iri + " for type " + entityType); } return df.getOWLEntity(entityType, iri); }
private <E extends OWLEntity> E getErrorEntity(EntityType<E> entityType) { IRI iri = IRI.create("http://org.semanticweb.owlapi/error#", "Error" + ERRORCOUNTER.incrementAndGet()); LOGGER.error("Entity not properly recognized, missing triples in input? {} for type {}", iri, entityType); if (configuration.isStrict()) { throw new OWLParserException( "Entity not properly recognized, missing triples in input? " + iri + " for type " + entityType); } return df.getOWLEntity(entityType, iri); }
private <E extends OWLEntity> E getErrorEntity(EntityType<E> entityType) { IRI iri = IRI.create("http://org.semanticweb.owlapi/error#", "Error" + ERRORCOUNTER.incrementAndGet()); LOGGER.error("Entity not properly recognized, missing triples in input? {} for type {}", iri, entityType); if (configuration.isStrict()) { throw new OWLParserException( "Entity not properly recognized, missing triples in input? " + iri + " for type " + entityType); } return df.getOWLEntity(entityType, iri); }
private <E extends OWLEntity> E getErrorEntity(EntityType<E> entityType) { IRI iri = IRI.create("http://org.semanticweb.owlapi/error#", "Error" + ERRORCOUNTER.incrementAndGet()); LOGGER.error("Entity not properly recognized, missing triples in input? {} for type {}", iri, entityType); if (configuration.isStrict()) { throw new OWLParserException( "Entity not properly recognized, missing triples in input? " + iri + " for type " + entityType); } return df.getOWLEntity(entityType, iri); }
private void setupSynonymMap() { // We can load legacy ontologies by providing synonyms for built in // vocabulary // where the vocabulary has simply changed (e.g. DAML+OIL -> OWL) synonymMap.clear(); // Legacy protege-owlapi representation of QCRs synonymMap.put(IRI.create(OWL.getPrefixIRI(), "valuesFrom"), OWL_ON_CLASS.getIRI()); if (!configuration.isStrict()) { addDAMLOILVocabulary(); addIntermediateOWLSpecVocabulary(); } }
private void setupSynonymMap() { // We can load legacy ontologies by providing synonyms for built in // vocabulary // where the vocabulary has simply changed (e.g. DAML+OIL -> OWL) synonymMap.clear(); // Legacy protege-owlapi representation of QCRs synonymMap.put(IRI.create(OWL.getPrefixIRI(), "valuesFrom"), OWL_ON_CLASS.getIRI()); if (!configuration.isStrict()) { addDAMLOILVocabulary(); addIntermediateOWLSpecVocabulary(); } }
private void setupSynonymMap() { // We can load legacy ontologies by providing synonyms for built in // vocabulary // where the vocabulary has simply changed (e.g. DAML+OIL -> OWL) synonymMap.clear(); // Legacy protege-owlapi representation of QCRs synonymMap.put(IRI.create(OWL.getPrefixIRI(), "valuesFrom"), OWL_ON_CLASS.getIRI()); if (!configuration.isStrict()) { addDAMLOILVocabulary(); addIntermediateOWLSpecVocabulary(); } }
private void setupSynonymMap() { // We can load legacy ontologies by providing synonyms for built in // vocabulary // where the vocabulary has simply changed (e.g. DAML+OIL -> OWL) synonymMap.clear(); // Legacy protege-owlapi representation of QCRs synonymMap.put(IRI.create(OWL.getPrefixIRI(), "valuesFrom"), OWL_ON_CLASS.getIRI()); if (!configuration.isStrict()) { addDAMLOILVocabulary(); addIntermediateOWLSpecVocabulary(); } }
private void setupSynonymMap() { // We can load legacy ontologies by providing synonyms for built in vocabulary // where the vocabulary has simply changed (e.g. DAML+OIL -> OWL) synonymMap = CollectionFactory.createSyncMap(); // Legacy protege-owlapi representation of QCRs synonymMap.put(IRI.create(Namespaces.OWL.toString(), "valuesFrom"), OWL_ON_CLASS.getIRI()); if (!configuration.isStrict()) { addDAMLOILVocabulary(); addIntermediateOWLSpecVocabulary(); } }
private OWLClassExpression translateClassExpressionInternal(IRI mainNode) { // Some optimisations... // We either have a class or a restriction Mode mode = consumer.getConfiguration().isStrict() ? Mode.STRICT : Mode.LAX; for (ClassExpressionTranslator translator : classExpressionTranslators) { if (translator.matches(mainNode, mode)) { return translator.translate(mainNode); } } if (!consumer.isAnonymousNode(mainNode)) { return consumer.getDataFactory().getOWLClass(mainNode); } else { return consumer.generateAndLogParseError(EntityType.CLASS, mainNode); } }