Examples of BinaryOWLOntologyDocumentSerializer


Examples of org.semanticweb.binaryowl.BinaryOWLOntologyDocumentSerializer

                    for (OWLOntologyChange change : ontologyChangeList) {
                        OWLOntologyChangeRecord changeRecord = change.getChangeRecord();
                        infoList.add(changeRecord.getData());
                    }
                    File file = new File(docIRI.toURI());
                    BinaryOWLOntologyDocumentSerializer serializer = new BinaryOWLOntologyDocumentSerializer();
                    serializer.appendOntologyChanges(file, new OntologyChangeDataList(infoList,
                                                                                      System.currentTimeMillis(),
                                                                                      BinaryOWLMetadata.emptyMetadata
                                                                                              ()));

                }
View Full Code Here

Examples of org.semanticweb.binaryowl.BinaryOWLOntologyDocumentSerializer

                for(OWLOntologyChange change : changes) {
                    OWLOntologyChangeRecord rec = change.getChangeRecord();
                    OWLOntologyChangeData info = rec.getData();
                    infoList.add(info);
                }
                BinaryOWLOntologyDocumentSerializer serializer = new BinaryOWLOntologyDocumentSerializer();
                serializer.appendOntologyChanges(notesOntologyDocument, new OntologyChangeDataList(infoList, System.currentTimeMillis()));
            }
            else {
                // Swap it over
                notesOntologyManager.saveOntology(notesOntology, new BinaryOWLOntologyDocumentFormat());
            }
View Full Code Here

Examples of org.semanticweb.binaryowl.BinaryOWLOntologyDocumentSerializer

                for(OWLOntologyChange change : changes) {
                    OWLOntologyChangeRecord rec = change.getChangeRecord();
                    OWLOntologyChangeData info = rec.getData();
                    infoList.add(info);
                }
                BinaryOWLOntologyDocumentSerializer serializer = new BinaryOWLOntologyDocumentSerializer();
                serializer.appendOntologyChanges(notesOntologyDocument, new OntologyChangeDataList(infoList, System.currentTimeMillis()));
            }
            else {
                // Swap it over
                notesOntologyManager.saveOntology(notesOntology, new BinaryOWLOntologyDocumentFormat());
            }
View Full Code Here

Examples of org.semanticweb.binaryowl.BinaryOWLOntologyDocumentSerializer

                IRI documentIRI = ont.getOWLOntologyManager().getOntologyDocumentIRI(ont);
                final ImportedOntologyMetadata value = new ImportedOntologyMetadata(ont.getOntologyID(), documentIRI, timestamp);


                BinaryOWLMetadata metadata = toBinaryOWLMetadata(value);
                BinaryOWLOntologyDocumentSerializer serializer = new BinaryOWLOntologyDocumentSerializer();
                final File file = getFreshImportCacheFile();
                os = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(file)));
                serializer.write(new OWLOntologyWrapper(ont), os, metadata);

                ontologyIDs.add(ont.getOntologyID());
                metadataMap.put(ont.getOntologyID(), value);
                LOGGER.info("Cached imported ontology: " + ont.getOntologyID() + " in " + file.getName());
            }
View Full Code Here

Examples of org.semanticweb.binaryowl.BinaryOWLOntologyDocumentSerializer

        try {
            WRITE_LOCK.lock();
            InputStream is = null;

            try {
                BinaryOWLOntologyDocumentSerializer serializer = new BinaryOWLOntologyDocumentSerializer();
                is = new BufferedInputStream(new FileInputStream(ontologyDocument));
                final Handler handler = new Handler();
                serializer.read(is, handler, new OWLDataFactoryImpl());
                OWLOntologyID id = handler.getOntologyID();
                if(!id.isAnonymous()) {
                    ontologyIDs.add(id);
                    iri2Document.put(id.getOntologyIRI(), IRI.create(ontologyDocument.toURI()));
                    if(id.getVersionIRI() != null) {
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.