summaryrefslogtreecommitdiffstats
path: root/template.py
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2013-03-22 21:09:54 +0100
committerJan Pokorný <jpokorny@redhat.com>2013-03-22 21:09:54 +0100
commitb8a250e5d31195163cf1a0655ba19b06a70bec24 (patch)
tree356ccd1b2f22a0006d26314d2543de1cadd4212b /template.py
parent543b5651c7f52a9c257ef3be52bcd9fcd29a0639 (diff)
downloadontogen-b8a250e5d31195163cf1a0655ba19b06a70bec24.tar.gz
ontogen-b8a250e5d31195163cf1a0655ba19b06a70bec24.tar.xz
ontogen-b8a250e5d31195163cf1a0655ba19b06a70bec24.zip
Little reorg
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'template.py')
-rw-r--r--template.py116
1 files changed, 0 insertions, 116 deletions
diff --git a/template.py b/template.py
deleted file mode 100644
index e2a1a39..0000000
--- a/template.py
+++ /dev/null
@@ -1,116 +0,0 @@
-#!/usr/bin/env python
-# Example quickstart template for designing new ontologies
-
-from sys import argv
-#from genshi.input import XML
-
-from ontologygen import Property, Class, Example, Ontology, Ontologies
-
-BASE = 'http://purl.org/net/foo'
-
-
-#
-# classes
-#
-
-
-# v0.1
-
-class Foo(Class):
- """abstract foo item, use only its subclasses"""
-
-
-class TFoo(Foo):
- """T-shaped foo
-
- Represents foos that are special because of the T-shape.
- """
-
-#
-# properties
-#
-
-# v0.1
-
-@Foo.inDomainOf
-class bar(Property):
- """plain bar
-
- Connects resources with foos.
- """
- range = "http://www.w3.org/2001/XMLSchema#string"
-
-
-class baz(bar):
- """bar specialization known as baz"""
-
-
-#
-# examples
-#
-
-# v0.1
-
-class ex_0_1_schema(Example):
- """Illustrative figure of the vocabulary."""
- image = '0.2.svg'
-
-
-class ex_0_1(Example):
- """An example snippet.
-
-<foo:tfoo about="#mytfoo">
- <foo:baz>test</foo:baz>
-</foo:tfoo>
- """
- pfx = 'foo:'
-
-
-#
-# ontology + versions
-#
-
-
-ontologies = Ontologies()
-
-
-class foo(Ontology):
- """Descriptive vocabulary for foos
-
- This vocabulary serves a purpose of shedding light into semantics
- in the field of foos.
- """
- base_uri = BASE
- #creator = XML('''\
- # <dc:foo xmlns:dc="http://purl.org/dc/elements/1.1/"
- # >John Doe</dc:foo>''')
- creator = 'John Doe'
-
-
-@ontologies.include
-class foo_0_1(foo):
- version = '0.1'
- issued = '2013-02-19'
- modified = '2013-03-20'
- classes = [
- Foo,
- TFoo,
- ]
- properties = [
- bar,
- baz,
- ]
- examples = [
- ex_0_1_schema,
- ex_0_1,
- ]
-
-
-#@ontologies.include
-#@foo_0_1.supersededBy
-#class foo_0_2(foo):
-# ...
-
-
-if __name__ == '__main__':
- ontologies.generate_latest(**(len(argv) > 1 and {'outfile': argv[1]} or {}))