save an .owl file where opened from url in protégé - owl

I downloaded dron ontology using protégé "open from url".In it's .owl file is just a series of urls that protégé using these urls to load them from internet.
I'm saving the project but the only thing that is saving is the original file(the file witch contain urls) and every time I should get all of data from the internet.what should I do to save complete file on my computer disk?

Save a copy of the ontology and of each imported ontology to the same folder. Next time you open it in Protege, a catalog.xml file should be created, and Protege will use the local copies.
This should work as long as the ontology IRI for the imported ontologies matches the import IRI in the main ontology - i.e., if the ontology IRI matches the URL for the ontology document. If that's not the case, Protege won't be able to know which ontology is at the remote site without downloading it; in that case you have to follow AKSW's comment and change the import axioms.

Related

How do I export data with attachments from a Lotus Notes Database into an Excel Spreadsheet or into a Microsoft Access Database?

Not a Lotus Notes Developer but have to get data in a Lotus Notes database into SharePoint. All of the LN entries have attachments. I tried to export to a csv file but that doesn't include the attachments. I think created a new view with the Attachments field but that only returns the number of attachments. How can I extract the associated attachments with each LN form. Thanks in advance
Your question is pretty broad. Attachments are (sometimes) treated as embedded objects in a Rich Text Field. This URL has some sample code:
https://www.ibm.com/support/knowledgecenter/en/SSVRGU_9.0.1/basic/H_EXAMPLES_EMBEDDEDOBJECTS_PROPERTY_RTITEM.html
Copy/paste may not work for you because the attachments may not be in a field called "Body" or there may be multiple "Body" fields on the document (which requires other considerations beyond the scope of this question), or the attachment may be embedded objects in the document. Or all the of the above. That that code will give you a sense of what you need to do.
Also, see this:
How to retrieve Lotus Notes attachments?
I have done this by writing LotusScript code to detach all the attachments from all docs into a single folder, using the document's UNID plus the attachment name for the filename in the folder. Adding the UNID covers cases where attachments with the same name exist in mulitple documents and might actually have different content. I do not attempt to de-duplicate.
The agent adds a NotesItem to each document giving the filename(s) of the detached attachment(s).
I then create a view containing all the fields that I want to export, including the new field with the filenames. I export that view to CSV. I hand the CSV and a zip file containing the attachments over to the SharePoint team.
Maybe a bit late but... I do have extensive experience (approx. 15 years) with data extraction from IBM Notes applications/databases - independent of the type of application - and have supported migrations of quite a few large IBM Notes applications to various targets for companies around the world.
You can access IBM Notes databases using the native C-API, LotusScript, COM or Java, for example or make a document available for further processing by exporting it to Domino XML (DXL) format.
The C-API is the foundation of IBM Notes, meaning that COM and Java APIs only offer a subset of the C-API's functionality. Any of the APIs should give you the ability to extract a document's metadata and attachments. However:
A document, including it's attachment, can be encrypted using an IBM Notes ID. If you do not have access to the ID that was used to encrypt the document, you will neither be able to extract the document nor the attachment.
Attachments can be "real attachments" or so called "embedded objects". Depending on the type of attachment, the attachment needs to be handled differently if it comes to the API calls required to do the export.
Attachments can be compressed. In most cases, the API should handle the decompression transparently. However, there is at least one proprietary compression algorithm (based on Hufman) that is widely used. If you extract documents in DXL format, you will not be able to read those attachments, as they are embedded into the DXL in compressed form.
Objects being embedded into a document using (Object Linking and Embeddeding (OLE)) cannot be extracted using the COM or Java API. I.e. even if you gain access to the documents, you will not be able to transform them into a readable format.
If the information you are trying to transfer from IBM Notes to SharePoint is important to the company you work for, I would recommend to rely on a proven solution for the export/migration rather than developing this on your own, as the details can really be tricky.
Should you have any further questions, don't hesitate to get in touch.

OWL-API IRIMapper usage

I'm mapping a remote ontology to a local copy as following:
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
IRI documentIRI = IRI.create(new File("ontologies/localOntology.owl"));
IRI remoteIRI=IRI.create("https://protege.stanford.edu/ontologies/pizza/pizza.owl");
SimpleIRIMapper mapper = new SimpleIRIMapper(remoteIRI, documentIRI);
manager.getIRIMappers().add(mapper);
OWLOntology ontology = manager.loadOntology(remoteIRI);
manager.saveOntology(ontology, new OWLXMLDocumentFormat());
Is this the correct way to use IRIMap? What if localOntology.owl contains something different from the remote ontology? It seems that I'm manipulating the local ontology regardless the content of the remote ontology, since, for example, if we use ontology.getAxiomCount() with localOntology.owl an empty ontology, we get "0", coherently with the content of localOntology but not with the remote ontology. Should "ontology" be aligned with the remote ontology but stored in localOntology.owl after the mapping? Thank you.
The purpose of IRI mapping is just to redirect from one IRI to another - the most common use case is to avoid downloading a remote ontology multiple times. However, ensuring the local copy is in sync with the remote one (assuming the remote one is the 'master' ontology, the one other users will be using in their systems) is a task that no IRI mapper implementation undertakes.
There is no universal strategy for resolving diffs between local and remote ontology - for example, in some situations synchronizing the remote and local ontology will always be the right thing to do; when the local copy is used as a cache, losing remote updates is a bug.
In other situations, updating from the remote ontology is wrong - for example, when testing the performance of different reasoners on an ontology, if the ontology imports remote ontologies that might change during the experiment, then using an unchanging local copy is better than picking the latest updates; a change might affect the comparison results in undetectable ways, and break repeatability.
Therefore, OWL API leaves the implementation of the correct strategy to the calling code, rather than take decisions which might cause issues that are difficult to detect.

naming owl ontology in protege

I am using Protege 4.2.0.
When I write a new ontology, I can save it to a local file on my machine, e.g.,
GreatNewUpperOntology.owl
If I now want to import that ontology into a new ontology, I can find the file on my hard disk using the Active Ontology tab, Ontology imports panel (lower panel), Direct Imports +, "Import an ontology using a specific file"
The GreatNewUpperOntology imports properly, but shows up with a name like:
untitled-ontology-93 (http://www.semanticweb.org/myname/ontologies/2014/9/untitled-ontology-93)
QUESTION: Is there a way for me to save my ontology to the semanticweb.org site with the descriptive name I gave the file on my own computer, e.g., "GreatNewUpperOntology"?
Thank you!
A colleague helped me with this one....
Open the file in Protégé and go to the Active Ontology Tab, if I’m not mistaken you’ll see the “untitled-ontology-93” in the Ontology IRI field. Replace that field with whatever you want the name to be and you should be all set.
That works!

Couldn't Load OWL file using OWLAPI

I’m trying to load .owl file using owlapi thorough net beans to insert individual and its data properties using the code listed in owlapi documentation but it couldn't load the file, but when I converted the .owl file to .rdf format it was loaded successfully and i was able to insert the required data. I need to manipulate .owl file not .rdf format
Following is the code I have used to load the .owl without succeed
File fileBase = new File("src/java/ontology.owl);
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
OWLOntology ontology= manager.loadOntologyFromOntologyDocument(fileBase);
but when i have used the rdf fromat as shown below it was loaded succefully
File fileBase = new File("src/java/ontology.rdf);
So how can I overcome this issue and load the .owl file?
Is the following command is the best command to save the axioms to ontology file?
manager.saveOntology(ontology);
I would suggest you checking your OWL file. If it can't parse the ontology it will throw an exception. You need to catch and read the exception. Most probably is a parsing problem. Your commands are totally fine.
Saving the ontology by your command is fine, but the best way according to OWL documentation is to "apply changes" after each change. Something like:
manager.applyChange(axiom);
Its an issue with the .owl file of yours. Use the link below to validate your ontology file
http://mowl-power.cs.man.ac.uk:8080/validator/

Uploading and saving files in CakePHP 2.1

I want to save my uploads in a specific folder for each app_id. For example, when an applicant with app_id of 45 uploads the files it must save in a folder named 45 whilst all his/her uploads such as birth certificate, college certificate, profile picture and high school certificate will be in that folder, same to the other app_id eg 89 must have his/her own folder but all the uploaded files will be located in one parent folder for example webroot/files/uploads/....
I managed to implement Uploader v3.6 from Miles Johnson, so any help on that plugin or any other solutions
Any tutorial or link to tackle this challenge
Thank you
A huge security fail in your idea is to store high school certificates in the public (!) accessible /webroot/files/uploads folder. You can be sure to get in pretty unpleasant situations in many countries that have privacy laws if everyone can download these proivate documents from your server.
Storing the files in folders 1, 2, 3... using the incremental ids is also a bad idea performance wise: Read the section "File System Performance" of this article.
Storing all files attached to a user in the same folder might be a good idea if you want to delete all of them in one action when you delete the user but you should not forget about sanitizing the file names properly. But again: If you store thousands of files in the same (sub) folder you might get into issues again.
For a file storage solution for CakePHP 2.x I can suggest you to read the readme.md of my FileStorage plugin that covers nearly all common problems and gives you a solid base for a file storage.

Resources