Skip to content

Commit acd75b9

Browse files
inital commit
1 parent 502c3b4 commit acd75b9

34 files changed

+6537
-2
lines changed

README.MD

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# Simple RDFS Editor
2+
3+
You are also overwhelmed by [Protégé](https://protege.stanford.edu/)'s graphical user interface?
4+
You do not need the expressiveness of [OWL](https://www.w3.org/TR/owl-ref/)?
5+
You just want to create an [RDFS](https://www.w3.org/TR/rdf-schema/) ontology, maybe while talking with
6+
your [subject-matter expert](https://en.wikipedia.org/wiki/Subject-matter_expert)?
7+
8+
Then, this open-source tool called Simple RDFS Editor, written in Java 8, is just the right tool for you.
9+
10+
![Screenshot](img/main.png)
11+
12+
## Tutorial: how to use the tool
13+
14+
In this section I cover all features of the tool and how you use them.
15+
16+
### Ontology Prefix and URI
17+
18+
![Prefix and URI](img/prefix-and-uri.png)
19+
20+
Choose a prefix and a namespace for your ontology. When the ontology is saved to file,
21+
the tool uses the prefix for the file name, e.g. `msco.ttl`.
22+
23+
### Create Classes and Properties
24+
25+
![Create a Class](img/creation.png)
26+
27+
When the text fields are blue, you create a fresh class resp. property.
28+
Click on `New Class` (or press `Control+K`) or `New Prop` (or press `Control+B`) to get into this mode.
29+
If you hold `Control` while clicking, the text fields are not reset and thus can be reused.
30+
In any case the label text field is automatically focused.
31+
The `Sync` feature, by default enabled, synchronizes label and localname while typing.
32+
I recommend to enter always the label and let the localname be generated, e.g. when you write `price in $`
33+
the tool generates the localname `priceIn%24` using camel case and URL encoding.
34+
Use the dropdown-list to select the language tag that should be assigned to label and comment.
35+
36+
Press `Enter` in localname or label text field to create the resource.
37+
Press `Control+Enter` in comment text field to achive the same.
38+
However, press `Control+Enter` in localname or label text field to directly enter another resource.
39+
This is handy for entering in bulk.
40+
The resource is always added as top level concept.
41+
42+
![Create a Class](img/edit.png)
43+
44+
After the resource is created, the text fields' background become white.
45+
You now focus the resource and can edit all three aspects: localname, label and comment.
46+
By switching the language tag with the dropdown-list, you can enter texts in other languages.
47+
48+
#### Property Creation with Domain and Range
49+
50+
![Create a Property](img/drag-and-drop.png)
51+
52+
Drag a class from the domain tree and drop it on a class from the range tree.
53+
54+
![Create a Property](img/drag-and-drop-done.png)
55+
56+
This creates a property and automatically labels it "has " + localname of the range class.
57+
The created property is focused, so you could change its label directly.
58+
59+
#### Edit Property's Domain and Range
60+
61+
In order to reset the domain of a selected property press `Control+D`.
62+
In order to reset the range of a selected property press `Control+R`.
63+
64+
![Edit Property](img/edit-domain-range.png)
65+
66+
However, you can also update the domain and range by drag&drop from the corresponding class tree.
67+
68+
### Class and Property Taxonomy
69+
70+
![Taxonomy](img/taxonomy.png)
71+
72+
There are three trees: domain, properties and range tree.
73+
They show the localname of the resource.
74+
Domain and range class trees are mirrored to allow domain and range editing as stated above.
75+
Use drag&drop in the trees to build the taxonomy resulting in subClassOf resp. subPropertyOf relations.
76+
77+
For properties, their domain and range are additionally shown in gray.
78+
If domain or range is not defined, you see an empty set sign ``.
79+
Once a property is selected having domain and range, the classes are highlighted
80+
in green in the corresponding trees.
81+
82+
### Remove Classes and Properties
83+
84+
Select a class or property of your ontology in the tree and press `Delete`.
85+
In order to remove imported ontologies, select their tree node and also press `Delete`.
86+
87+
### Import Other Ontologies
88+
89+
![Import Menu](img/import.png)
90+
91+
You can import other ontologies and reuse their classes and properties.
92+
Imported ontologies can not be changed.
93+
94+
This is possible by loading them from file.
95+
The following ontologies are shipped within the editor:
96+
* [XML Schema Definition Datatypes](https://www.w3.org/TR/xmlschema11-2/) (XSD)
97+
* [Friend of a Friend](http://xmlns.com/foaf/spec/) (FOAF)
98+
* [DC Terms](http://dublincore.org/specifications/dublin-core/dcmi-terms/2012-06-14/?v=terms) (DCT)
99+
100+
XSD is useful when defining datatype properties, e.g. hasName with range xsd:string.
101+
102+
![Reuse FOAF](img/foaf-reuse.png)
103+
104+
Classes and properties can be reused from imported ontologies using drag&drop.
105+
You recognize imported resources by the attached ontology prefix.
106+
107+
### New, Open and Save
108+
109+
![New, Open and Save](img/new-save-load.png)
110+
111+
`New` resets everything in order to start a fresh ontology.
112+
`Open` loads an RDFS ontology from file. The following formats are tried in this order: "TURTLE", "N-TRIPLE", "N3", "RDF/XML".
113+
`Save` saves your ontology in turtle format. If a file was not selected yet, a file chooser pops up.
114+
Look at the application's title to see in which file the ontology is stored.
115+
116+
## Accepted Limitations of the Tool
117+
118+
* No multi-inheritance with subClassOf and subPropertyOf
119+
* No multiple domains or ranges
120+
* One label and comment for each language tag
121+
* Edit only one ontology at the same time
122+
123+
## TODOs
124+
125+
* Use Wikipedia, Wiktionary and other sources to autocomplete class and property creation
126+
* Filter Domain, Properties and Range Tree by using the text field above
127+
* Allow [Datatype](https://www.w3.org/TR/rdf-schema/#ch_datatype) creation
128+
* Suggested translation in other languages for label
129+
* Fix focus cycle among localname, label and comment text field
130+
* Configurable language tag list
131+
* Support undo and redo
132+
* When class is removed also reset domain or range of properties if they refer to the class
133+
* Support seeAlso and isDefinedBy
134+
* json-ld ontology loading
135+
* maybe allow saving ontology in other formats then turtle
136+
* always sort the resources in the tree by localname
137+
* maybe show label in trees if available instead of localname
138+
* publish and versioning mechanism
139+
140+
## Contribution
141+
142+
If you find a bug, create an issue for it.
143+
In case you would like to contribute, feel free to contact me.
144+
The GUI of the tool is created with netbeans 11.0.

README.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

img/creation.png

7.54 KB
Loading

img/drag-and-drop-done.png

6.81 KB
Loading

img/drag-and-drop.png

8.67 KB
Loading

img/edit-domain-range.png

12.5 KB
Loading

img/edit.png

13 KB
Loading

img/foaf-reuse.png

16.2 KB
Loading

img/import.png

9.99 KB
Loading

img/main.png

16 KB
Loading

0 commit comments

Comments
 (0)