Fork me on GitHub

Humane OWL RDF and OWL for humans.

1
2
3
4
5
6
7
8
9
10
11
# Define your prefixes...
PREFIX rdf:> http://www.w3.org/1999/02/22-rdf-syntax-ns#
PREFIX rdfs:> http://www.w3.org/2000/01/rdf-schema#
PREFIX xsd:> http://www.w4.org/2001/XMLSchema#
PREFIX owl:> http://www.w3.org/2002/07/owl#
PREFIX obo:> http://purl.obolibrary.org/obo/
PREFIX ex:> http://example.com/
# then abbreviate your IRIs
# so <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
# can be shortened to: rdf:type
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
# Set a base IRI...
BASE http://example.com/
# then use relative IRIs in angle brackets: < >
# so <http://example.com/howl-demo.owl>
# can be shortened to <howl-demo.owl>
<howl-demo.owl>
rdfs:label: Example Ontology
rdf:type:> owl:Ontology
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Specify your own labels...
LABEL rdf:type: type
LABEL rdfs:label: label
LABEL rdfs:comment: comment
LABEL rdfs:subClassOf: subclass of
LABEL owl:equivalentClass: equivalent to
LABEL obo:IAO_0000115: definition
# then use them in your statements
ex:frog
label: Frog
definition: A circular definition of frog.
# Your 'rdfs:label' statments also specify labels
# that you can use in subsequent statements,
# e.g. 'label: Frog' can be used as Kermit's type
ex:kermit
type:> Frog
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
# Set a language or datatype...
TYPE label:> @en
TYPE comment:> xsd:string
ex:french-fries
# that will apply by default
label: French Fries
comment: A comment string
# but can be overridden
label: Frites@fr
comment: 1000^^xsd:integer
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# It's easy to use tables with HOWL
# and define many terms concisely
SUBJECT label: type:>
obo:BFO_0000040 material entity owl:Class
obo:BFO_0000051 has part owl:ObjectProperty
obo:BFO_0000055 realizes owl:ObjectProperty
obo:IAO_0000030 information content entity owl:Class
obo:IAO_0000112 example of usage owl:AnnotationProperty
obo:IAO_0000115 definition owl:AnnotationProperty
obo:IAO_0000117 term editor owl:AnnotationProperty
obo:IAO_0000118 alternative term owl:AnnotationProperty
obo:IAO_0000119 definition source owl:AnnotationProperty
obo:IAO_0000136 is about owl:ObjectProperty
obo:OBI_0000011 planned process owl:Class
obo:OBI_0000067 evaluant role owl:Class
obo:OBI_0000070 assay owl:Class
obo:OBI_0000293 has_specified_input owl:ObjectProperty
obo:OBI_0000299 has_specified_output owl:ObjectProperty
obo:OBI_0000417 achieves_planned_objective owl:ObjectProperty
obo:OBI_0000441 assay objective owl:Class
obo:RO_0000087 has role owl:ObjectProperty
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
# EDIT ME!
# Then press "Convert" to see the results of your changes below!
# Lines that start with '#' are just comments.
# Set the current subject using a label, prefixed name, or IRI
assay
definition: A planned process with the objective to produce information about the material entity that is the
    evaluant, by physically examining it or its proxies.
type:> owl:Class
equivalent to:>> achieves_planned_objective some 'assay objective'
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Use ': ' for literal values: strings, numbers, dates, etc.
example of usage: Assay the wavelength of light emitted by excited Neon atoms. Count of geese flying over a
    house.
# Use ':> ' for links: IRIs, prefixed names, or labels
subclass of:> planned process
# Use ':>> ' for complex expressions
subclass of:>> realizes some 'evaluant role'
# Use indentation to continue long lines
subclass of:>> has_specified_input some
('material entity'
and ('has role' some 'evaluant role'))
subclass of:>> has_specified_output some
('information content entity'
and ('is about' some
('material entity'
and ('has role' some 'evaluant role'))))
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
# Easily add OWL annotations, even annotations on annotations...
ex:another-subject
label: Another Subject
comment: A comment on 'label: Another Subject'.
> comment: An annotation on a comment.
>> comment: An annotation on an annotation.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Change to a named graph
GRAPH ex:example-graph
label: Example Graph
ex:first-example-subject
comment: This subject is in the Example Graph.
# Then back to the default graph
GRAPH
ex:second-example-subject
comment: This subject is in the default graph.
# WARNING: OWL only uses the default graph!
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# All the pieces above in a single HOWL file.
### Prefixes
# Define your prefixes...
PREFIX rdf:> http://www.w3.org/1999/02/22-rdf-syntax-ns#
PREFIX rdfs:> http://www.w3.org/2000/01/rdf-schema#
PREFIX xsd:> http://www.w4.org/2001/XMLSchema#
PREFIX owl:> http://www.w3.org/2002/07/owl#
PREFIX obo:> http://purl.obolibrary.org/obo/
PREFIX ex:> http://example.com/
# then abbreviate your IRIs
# so <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
# can be shortened to: rdf:type
### Base
# Set a base IRI...
BASE http://example.com/
# then use relative IRIs in angle brackets: < >
# so <http://example.com/howl-demo.owl>
# can be shortened to <howl-demo.owl>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# The assembled HOWL file converted to N-Quads format:
# https://en.wikipedia.org/wiki/N-Triples#N-Quads
<http://example.com/howl-demo.owl> <http://www.w3.org/2000/01/rdf-schema#label> "Example Ontology" .
<http://example.com/howl-demo.owl> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Ontology> .
<http://example.com/frog> <http://www.w3.org/2000/01/rdf-schema#label> "Frog" .
<http://example.com/frog> <http://purl.obolibrary.org/obo/IAO_0000115> "A circular definition of frog." .
<http://example.com/kermit> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/frog> .
<http://example.com/french-fries> <http://www.w3.org/2000/01/rdf-schema#label> "French Fries"@en .
<http://example.com/french-fries> <http://www.w3.org/2000/01/rdf-schema#comment> "A comment string"^^<http://www.w4.org/2001/XMLSchema#string> .
<http://example.com/french-fries> <http://www.w3.org/2000/01/rdf-schema#label> "Frites"@fr .
<http://example.com/french-fries> <http://www.w3.org/2000/01/rdf-schema#comment> "1000"^^<http://www.w4.org/2001/XMLSchema#integer> .
<http://purl.obolibrary.org/obo/BFO_0000040> <http://www.w3.org/2000/01/rdf-schema#label> "material entity"@en .
<http://purl.obolibrary.org/obo/BFO_0000040> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
<http://purl.obolibrary.org/obo/BFO_0000051> <http://www.w3.org/2000/01/rdf-schema#label> "has part"@en .
<http://purl.obolibrary.org/obo/BFO_0000051> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
<http://purl.obolibrary.org/obo/BFO_0000055> <http://www.w3.org/2000/01/rdf-schema#label> "realizes"@en .
<http://purl.obolibrary.org/obo/BFO_0000055> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
<http://purl.obolibrary.org/obo/IAO_0000030> <http://www.w3.org/2000/01/rdf-schema#label> "information content entity"@en .
<http://purl.obolibrary.org/obo/IAO_0000030> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
<http://purl.obolibrary.org/obo/IAO_0000112> <http://www.w3.org/2000/01/rdf-schema#label> "example of usage"@en .
<http://purl.obolibrary.org/obo/IAO_0000112> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#AnnotationProperty> .
<http://purl.obolibrary.org/obo/IAO_0000115> <http://www.w3.org/2000/01/rdf-schema#label> "definition"@en .
<http://purl.obolibrary.org/obo/IAO_0000115> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#AnnotationProperty> .
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# The assembled HOWL file converted to Turtle format:
# https://en.wikipedia.org/wiki/Turtle_(syntax)
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix xsd: <http://www.w4.org/2001/XMLSchema#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix obo: <http://purl.obolibrary.org/obo/>.
@prefix ex: <http://example.com/>.
<http://example.com/howl-demo.owl> rdfs:label "Example Ontology";
a owl:Ontology.
ex:frog rdfs:label "Frog";
obo:IAO_0000115 "A circular definition of frog.".
ex:kermit a ex:frog.
ex:french-fries rdfs:label "French Fries"@en;
rdfs:comment "A comment string"^^xsd:string;
rdfs:label "Frites"@fr;
rdfs:comment "1000"^^xsd:integer.
obo:BFO_0000040 rdfs:label "material entity"@en;
a owl:Class.
obo:BFO_0000051 rdfs:label "has part"@en;
a owl:ObjectProperty.
obo:BFO_0000055 rdfs:label "realizes"@en;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
© 2016 James A. Overton