from Ft.Rdf.Drivers import Memory
from Ft.Rdf.Statement import Statement
from Ft.Xml import Domlette

def Test():
    db = Memory.CreateDb('mydemo')

    from Ft.Rdf import Model
    m = Model.Model('http://spam.com', db)

    stmts = [
        Statement('http://128.230.185.219/servlet/eric#ABBREVIATIONS', 'http://geminfo.syr.edu/thesauri/NISOz3919#RT', 'http://128.230.185.219/servlet/eric#MNEMONICS'),
        Statement('http://128.230.185.219/servlet/eric#ABBREVIATIONS', 'http://geminfo.syr.edu/thesauri/NISOz3919#RT', 'http://128.230.185.219/servlet/eric#ORTHOGRAPHIC SYMBOLS'),
        Statement('http://128.230.185.219/servlet/eric#ABBREVIATIONS', 'http://geminfo.syr.edu/thesauri/NISOz3919#RT', 'http://128.230.185.219/servlet/eric#SHORTHAND'),
        Statement('http://128.230.185.219/servlet/eric#ABBREVIATIONS', 'http://geminfo.syr.edu/thesauri/NISOz3919#RT', 'http://128.230.185.219/servlet/eric#WRITTEN LANGUAGE'),
        ]
    m.add(stmts)
    print m.complete(None, None, None)

    from Ft.Rdf.Serializers.Dom import Serializer
    serializer = Serializer()
    outdoc = serializer.serialize(m)
    Domlette.PrettyPrint(outdoc)
    return


if __name__ == '__main__':
    Test()
