#!/usr/bin/python
#
# Vocabulary.py - RDF Vocabulary
#

import RDF

class RDF:
    NS = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    first = RDF.Node(uri_string = NS + "first")
    rest = RDF.Node(uri_string = NS + "rest")
    nil = RDF.Node(uri_string = NS + "nil")

def make_vocab(model, ns):
    props = {}
    for statement in model:
        uri = str(statement.predicate.uri)
        if uri.find(ns) > -1:
            name = uri.replace(ns, "")
            props[name] = "\t%s = RDF.Node(uri_string = NS + \"%s\")" % (name.lower(), name)

    keys = props.keys()
    keys.sort()
    print keys
    for k in keys:
        print props[k]
        