[ Team LiB ] |
12.8 Ontology Tools: EditorsOntology editors can also be RDFS editors, but they usually have extended services and features to meet the increased demand in sophistication of the ontology. In this section, we'll look at two such editors: SMORE and Protégé. 12.8.1 SMORE—Semantic Markup, Ontology, and RDF EditorMuch of the effort on behalf of both RDF and OWL is predicated on the Semantic Web, so the lack of tools that connect traditional web creation tools such as a WYSIWYG editor for HTML with support for newer technologies, such as an ontology editor, is rather surprising. However, SMORE — the Semantic Markup, Ontology, and RDF Editor — is an application that incorporates four separate applications into one to provide just such support. SMORE, another application written in Java, is one of the interesting products to come out of the Semantic Web Research Group, along with several converters, RDF scrapers, and other useful tools and utilities.
SMORE opens with an interface consisting of four separate windows within one frame. Each window contains a separate application: a web browser in one, a web ontology browser in another, a WYSIWYG HTML editor in a third, and a semantic data representation in the fourth. Figure 12-1 shows the tool just after it opens. Figure 12-1. SMORE when it's first openedAll four applications are integrated with one another. When examining the ontological class in the ontology browser, clicking on the source opens the RDF/XML for the class in the web browser; right-clicking on a term in the WYSIWYG HTML editor adds the term to the semantic data representation under development, and so on.
Documentation on using the tool can be found in Help. 12.8.2 ProtégéProtégé is a Java-based ontology editor that provides the mechanisms to create ontologies and then allows you to save them as plain text, into JDBC-accessible datastores, and as RDF/XML. Installation consists of downloading the tool and then clicking the installer that the Java applet in the installation page recommends for your system.
Figure 12-2 shows the editor when it's first opened up, with the existing demonstration project, Newspaper, loaded. Figure 12-2. Screenshot of Protégé after it opensThe tabbed interface allows you to define new classes and subclasses in the first page, in addition to adding properties (which the tool, in line with much of the ontology effort, calls slots). If a class has a key figure next to it, such as Person in Figure 12-2, clicking on the key displays or hides the class subclasses. Define a new class by clicking the high-level THING and then clicking the C toolbar item in the left toolbar, just over the Classes. The next tab shows the slots (properties) defined in the ontology, as shown in Figure 12-3. Figure 12-3. The Slots tab on the editorFor each property, you can specify a name, provide documentation, restrict the range of classes, specify its cardinality, and create an inverse slot (equivalent to the inverseOf property characteristic described before). The next tab provides a form designer window that allows you to define a form used to record individual ontology members (instances). Clicking on a class in the left window opens the default (or saved customized) form in the right. At that point, you can do things such as move the form fields around, resize them, and so on. The last tab is where the forms customized in the previous tab are displayed, allowing you to record instance data for the ontology. In addition, data that's already been recorded displays when the form is opened, as shown in Figure 12-4, including a mapping between a higher-level class instance and repeating properties. Note in the form that data entry doesn't have to be limited to plain text fields. Figure 12-4. Tab to enter instance dataFinally, the last tab is used to enter queries about the data stored within the project. As with other query systems against RDF data described in earlier chapters, the queries are built as triples—subject, object, and predicate. Several can be combined, and a query can even be used as the object in a triple, as shown in Figure 12-5. Figure 12-5. Queries tab with query made of three triples, one of which has a query as objectAgain, the project can be saved at any time and can also be exported as the previously mentioned RDF/XML, JDBC, or text. In addition, the tool can also generate HTML of the contents, with all the proper hypertext links between classes, subclasses, slots, and so on maintained. Additionally, there's a metrics function available from the Project menu that provides instance information. |
[ Team LiB ] |