Edit Database Schema: %s

""" % (server._dbName, server._dbName))
self.wfile.write("""

The main configuration file may specify one or more schema files that
contain user-provided RDF statements about the database schema and its
associated tables. These are included as the object of an rdfs:seeAlso
statement in the main dbview configuration. This page allows you to
edit one configuration file at a time.

If no files are listed, then add at least one rdfs:seeAlso
statement to the configuration.

Edit Table Schema: %s

The main configuration file may specify one or more schema files
that contain user-provided RDF statements about table schema. These
are included as the object of an rdfs:seeAlso statement in the main
dbview configuration. This page allows you to edit one configuration
file at a time.

If no files are listed, then add at least one rdfs:seeAlso
statement to the configuration.

Other RDF

Additional RDF statements can be included in the schema file which are
also given when the table is described by DBView.

To remove a statement, delete the text in the statement's predicate
and object boxes.

""")
#get all of the user's specified RDF about the table
inputs = ""
statements = []
for s in extraRDF.formula.statementsMatching(subj=tableURI):
statements.append([s.predicate(), s.object()])
for i in range(self.EMPTY_TRIPLES_TO_SHOW):
statements.append([None, None])
#print input elements for each triple
self.wfile.write("""

Column Metadata

Column Options

DBView understands certain configuration options which control how
columns are exported.

hidden - the column does not appear in its table's schema,
foreign keys into the column are exported as literals, and its data
cannot be retrieved

resource - the column's values are URIs rather than literals

relative to - if a column is a resource, then this string
is prepended to the front of all URIs generated by the column's values;
this is useful for appending 'http://' or 'mailto:' to the front of
URIs

Foreign Keys

")
self.wfile.write("""

Foreign key mappings are exported by dbview by exporting a link to a
URI for a column's value rather than a literal. The foreign key
relationships are also used when defining the subclass relationships.

To remove a foreign key relationship, the 'points to' value should be
the empty line at the very top.

""")
self.wfile.write("""

""")
#print all foreign key relationships from this file
cnt = 0
colMap = [x for x in foreignKeys.srcMap(table)]
for i in range(self.EMPTY_TRIPLES_TO_SHOW):
colMap.append([None, None, None])
for col, dt, dc in colMap:
self.wfile.write("""

Links

Links are a special kind of foreign key relationship that use a
separate linking table to connect two columns. The link's entry and
exit columns are transparent; when dereferencing a row in the source
table, all rows in the link table's entry column are searched and
all rows in destination table which are linked to by link exit are
printed.