Examples of OWLImportsDeclaration


Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

   
  }
  public void removeImportedOntology(IOntology o) {
    lazyLoad();
    IRI toImport=IRI.create(o.getURI());
    OWLImportsDeclaration importDeclaraton = getOWLDataFactory().getOWLImportsDeclaration(toImport);
    getOWLOntologyManager().applyChange(new RemoveImport(getOWLOntology(),importDeclaraton));
  }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

            }
            else if (section.equalsIgnoreCase(VALUE_PARTITION)) {
                axioms.addAll(parseValuePartitionFrame());
            }
            else if (section.equalsIgnoreCase(IMPORT)) {
                OWLImportsDeclaration decl = parseImportsDeclaration(ont);
                imports.add(new AddImport(ont, decl));
                ont.getOWLOntologyManager().makeLoadImportRequest(decl, configuration);
            }
            else if (section.equalsIgnoreCase(PREFIX)) {
                Map<String, IRI> nsMap = parsePrefixDeclaration();
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

                handler.handle(currentId, value, comment);
            }
            else if (inHeader) {
                if (tag.equals(IMPORT_TAG_NAME)) {
                    IRI uri = IRI.create(value.trim());
                    OWLImportsDeclaration decl = owlOntologyManager.getOWLDataFactory().getOWLImportsDeclaration(uri);
                    owlOntologyManager.makeLoadImportRequest(decl, configuration);
                    owlOntologyManager.applyChange(new AddImport(ontology, decl));
                }
                else {
                    // Ontology annotations
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

  }

  final public void Ontology() throws ParseException, OWLParserException, UnloadableImportException {
    OWLAnnotation anno;
    OWLAxiom ax;
    OWLImportsDeclaration decl;
    //int count = 0;
    IRI versionIRI = null;
    jj_consume_token(ONTOLOGY);
    jj_consume_token(OPENPAR);
    if (jj_2_3(2)) {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

    IRI iri;
    jj_consume_token(IMPORT);
    jj_consume_token(OPENPAR);
    iri = IRI();
    jj_consume_token(CLOSEPAR);
        OWLImportsDeclaration importsDeclaration = dataFactory.getOWLImportsDeclaration(iri);
        return importsDeclaration;
   
  }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

            return true;
        }
        if (!(obj instanceof OWLImportsDeclaration)) {
            return false;
        }
        OWLImportsDeclaration other = (OWLImportsDeclaration) obj;
        return this.iri.equals(other.getIRI());
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

  public void handleTriple(IRI subject, IRI predicate, IRI object) throws UnloadableImportException {

        consumeTriple(subject, predicate, object);
        getConsumer().addOntology(subject);
        getConsumer().addOntology(object);
        OWLImportsDeclaration importsDeclaration = getDataFactory().getOWLImportsDeclaration(object);
        getConsumer().addImport(importsDeclaration);

        if (!getConsumer().getConfiguration().isIgnoredImport(object)) {
            OWLOntologyManager man = getConsumer().getOWLOntologyManager();
            man.makeLoadImportRequest(importsDeclaration, getConsumer().getConfiguration());
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

    }


    public void endElement() throws OWLParserException, UnloadableImportException {
        IRI ontIRI = getIRI(getText().trim());
        OWLImportsDeclaration decl = getOWLDataFactory().getOWLImportsDeclaration(ontIRI);
        getOWLOntologyManager().applyChange(new AddImport(getOntology(), decl));
        getOWLOntologyManager().makeLoadImportRequest(decl, getConfiguration());
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

  {
    try {           
      IRI iri = IRI.create(inputFile);
      iriMapper.addAllowedIRI(iri);

      OWLImportsDeclaration declaration = manager.getOWLDataFactory().getOWLImportsDeclaration( iri );
      manager.applyChange( new AddImport( baseOntology, declaration ) );
      manager.makeLoadImportRequest( declaration );
    }catch (Exception e) {
      if(verbose)
        System.err.println(e.getLocalizedMessage());
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

      }
      else {
        // loading multiple files so each input file should be added as
        // an import to the base ontology we created
        OWLOntology importOnt = manager.loadOntologyFromOntologyDocument( fileIRI )
        OWLImportsDeclaration declaration = manager.getOWLDataFactory()
            .getOWLImportsDeclaration( importOnt.getOntologyID().getOntologyIRI() );
        manager.applyChange( new AddImport( baseOntology, declaration ) );
      }
    } catch( IllegalArgumentException e ) {
      throw new RuntimeException( e );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.