Difference between revisions of "Protege-OWL 3 FAQ"
From Protege Wiki
(added link to belorusian translation)
|Line 2:||Line 2:|
[[Protege-OWL_4_FAQ|Protege-OWL 4.x FAQ]]
[http://protege.stanford.edu/doc/faq.html Protege-Frames FAQ]
[http://protege.stanford.edu/doc/file_encodings.html Protege file encoding FAQ]
Latest revision as of 18:22, May 20, 2011
Protege-OWL 3.x Frequently Asked Questions
- Belorusian translation of this FAQ by Bohdan Zograf
- Protege-OWL 4.x FAQ
- Protege-Frames FAQ
- Protege file encoding FAQ
 How do I install Protege-OWL?
If you are new user, we ask that you register before downloading Protege:
Once you've registered, navigate to the download page on the Protege website to launch the platform-independent installer program:
 Where do I ask questions and report bugs?
Please post comments, questions, and bug reports on the protege-owl mailing list. You must be subscribed to the list to post messages. See instructions for subscribing: http://goo.gl/GmQ2y. If you have trouble subscribing and/or posting to the list, send a message to the list owners.
 Where can I look at a list known bugs and feature requests?
Go to the Protege Bugzilla Main Page and click "Search existing bug reports". On the Advanced Search tab, choose Protege as the Product, choose Protege-OWL as the Component, specify a version number, and click the Search button.
 How do I load an OWL file?
- In Protege versions 3.2.1 and later, choose File | Open..., specify the location of your OWL file in the "Open Project" dialog, and click OK.
- In Protege 3.1.1, choose File | New Project... to bring up the "Create New Project" wizard. Check the "Create from Existing Sources" checkbox, choose "OWL Files (.owl or .rdf)" from the list of project types, and click Next. Specify the location of your OWL file in the "OWL file name or URL" field, and click Finish.
 Why can't I load my OWL or RDF file?
If Protege fails to load a given OWL or RDF file, please try the following:
- Run it through the University of Manchester's OWL Validator to make sure your file is well formed.
- Run it through the OWL Syntax patcher and try reloading the result.
- If your file still does not load, post a question to the protege-owl mailing list with a link to your ontology file.
 How do I work with multiple files and the import mechanism?
Please refer to our guide on managing imports.
 Why does my Protege OWL/RDF file look strange?
Many people examine the OWL files produced by Protege and remark that they look strange and irregular. In particular, they find the files difficult to parse back with an XML parser. It is important to note that Protege uses the Jena parser library to save files, and thus we have little impact on the details of the output. This also means that however complex or irregular the OWL files look, you can always use Jena to parse the file for use in your Java application. The reason why the files may look strange is that Jena does some optimizations to shorten the files, e.g. to remove duplicate links and to streamline parsing. You could try alternative output formats such as N3 or RDF/XML (without abbrev) and see whether you prefer them to the RDF/XML abbrev.
 How do I execute a reasoner?
Please refer to our guide on using reasoners.
 How do I create numeric value restrictions such as "wheels with diameter over 10"?
OWL restrictions are optimized for cardinality expressions, i.e. you can easily say that a property must have at least 1 and at most 4 values. However, it is currently not possible to specify numeric range constraints such as "wheels with diameter over 10". An OWL working group is currently collaborating with the XML Schema group to allow for the definition of user-defined datatypes such as (integer greater than 10), which will then be used in allValuesFrom restrictions in OWL. As soon as this feature is standardized, Protege-OWL will support it.
Update: As of the Protege 3.2 beta release, we will include support for user-defined XML Schema datatypes, albeit with a native solution first.
[Response from Bernard Vatant]: OWL makes provision for logical 'qualitative' definition of classes, but definitely not for 'quantitative' definition, like "wheels with diameter over 10". This is not a bug, it's a feature :) . Cardinality is a logical feature, but numerical value of a DatatypeProperty is not one. There are arcane reasons for this dealing with structure of integers vs real numbers. There are some workarounds though. You can define properties minDiameter and maxDiameter and define subclasses of Wheel by hasValue restrictions on those. But this will be only declarative - logical reasoners will not detect any inconsistency if you have set minDiameter to 10 for BigWheel class, and an instance of BigWheel has declared a diameterValue of 9.
 How do I create properties with duplicates and/or ordered values (with rdf:Lists)?
OWL/RDF property values are normally unsorted, i.e. the order of values for a property may be different the next time you load your ontology. Also, OWL/RDF does not allow you to assign duplicates to property values. Trying to assign a duplicate value is usually prevented from by user interface. However, if the order of values or duplicates are important to you, you can use rdf:Lists. rdf:List is a predefined system class in RDF, and it is normally hidden in Protege. You can activate rdf:List in OWL | Preferences..., after which you can change the range of your property to rdf:List and set "Functional" to true, so that the property can take exactly one rdf:List as a value. Then, if you create an instance of a class where the property is used, you will get an RDFListWidget to create/add/remove/delete values for the property. This creates an rdf:List in the background.
An advanced scenario is illustrated in the list-example.owl file. You can import this file into Protege to see how it looks. It defines a subclass of rdf:List in which the entries in the list are restricted to the class Person. While rdf:List would allow values of any owl:Thing, this solution restricts the list entries, similar to a range definition on the property.
 I like the traditional Protege-Frames interface, but Protege-OWL looks completely different...
For those users who are familiar with the traditional Protege-Frames user interface, the look and feel of the Protege-OWL UI may be a shock. There are many new symbols and widgets on the screen, and some of the traditional Protege-Frames features have been moved or obscured.
Sorry, but OWL is different! We tried to build an editor that provides access to as many of the advanced OWL features (such as logical class definitions) as possible. This means that the Protege-OWL UI is necessarily different from Protege-Frames.
Also, the language paradigms are different. While Protege-Frames is traditionally rather object-oriented (frame-based) with classes and slots, OWL is based on Description Logics. As a result, the usual metaphor of building a class with its attributes is not directly applicable in OWL. Rather, you use OWL to define classes by their logical characteristics and then take advantage of reasoning support.
If you want to build an OWL ontology, but still want to interact with the Protege-Frames UI, you have the following options:
- Work in Protege-Frames mode and export your file to OWL as necessary using the File | Export to Format menu item. If you use this approach, it should be noted that you won't be able to take advantage of advanced OWL features such as namespaces. Furthermore, you run the risk of using features that are not supported by OWL, such as abstract classes.
- In the Protege-OWL editor, use the simpler "Properties View" on the OWL Classes tab, instead of the "Logic View". The Properties View has a look and feel that is closer to the traditional Protege-Frames UI. You can switch to the Properties View by clicking on the Properties View radio button at the bottom right-hand corner of the OWL Classes tab.
- You could manually modify the Protege-OWL UI to make it simpler. The core Protege system supports the ability to customize the forms that the user sees for class creation, etc. For example, go to OWL | Preferences... and activate owl:Class on the Visibility tab. Then, you can navigate to the Forms tab, where you can easily replace or remove widgets you don't want to appear. For example, you could remove the conditions widget, remove the disjoint classes widget, and make the properties at class widget bigger.
- Only use RDF(S) concepts in your project (see next question).
 How do I edit RDF(S) files with Protege?
OWL is an extension of RDF. Therefore, any RDF project can also be regarded as an OWL project which simply does not use advanced OWL features. While the focus of the Protege-OWL editor is on editing OWL ontologies, it can also be used to edit RDF ontologies and RDF Schema files or databases. To activate this support, go to the OWL | Preferences dialog and activate an RDF profile. When RDF is activated, Protege will display additional buttons to create pure RDFS classes and RDF properties. In particular, there will be a new button on the Properties tab, which can be used to create RDF properties. You can also decide whether new classes will be RDFS classes or OWL classes using "Create class using metaclass", or you can make rdfs:Class the default metaclass (both are done with a right-click on the classes tree in the OWL Classes tab). If you are creating a new project, you can select an RDF profile in one of the wizard pages.
Note that we generally don't recommend mixing pure RDF(S) elements with OWL elements in OWL ontologies, but Protege at least allows you to load, import and edit RDF if needed. This may be particularly important if your project requires access to ontologies or structured data that is only available as RDF(S). Also note that the support in Protege for editing RDF should not be confused with the older RDF back-end that was developed for Protege-Frames. More information about the Protege-Frames RDF back-end is available on this wiki.
If you are interested in RDF, you may want to take a look at some of the other RDF-related plug-ins that have been developed for Protege:
- RDF(s)-DB back-end: Store and load ontology and instance data from a Sesame repository.
- Oracle RDF Data Model: Manage OWL ontologies developed in Protege in the Oracle RDF store.
Please refer to the troubleshooting section in the OWLViz documentation.