Creates a new graph on an existing Mulgara server. The corresponding command for removing graphs is drop. The general syntax is as follows:
create graph [type];
Where graph is the URI of the graph to create and type is an optional graph type specification. The syntax is case-sensitive; "create" works, "CREATE" doesn't.
<pre> --url = "http://localhost:8088/tql/" -H "Accept: application/sparql-results+json" --data-urlencode "query=create <http://www.example.org/test1#data>;" </pre> Using "Accept: application/sparql-results+json" makes the output more readable. When using the Connection interface, graph URIs may be anything that does not conflict with an RMI-base URL. Graphs can also be located across a network using an RMI-based URL. The are graph URIs that are formed by adding a fragment part to the URL of the server they reside on. This form of URI is required when using any of the automatically connecting interfaces, such as the command UI, the @TqlAutoInterpreter@ interface, or the web UI. The following example creates a graph named _!MyGraph_ on the server at @rmi://mysite.com/server1@. <pre> create <rmi://mysite.com/server1#MyGraph>; </pre> <pre> <pre> --url = "http://localhost:8088/tql/" -H "Accept: application/sparql-results+json" --data-urlencode "query=create <http://www.example.org/test1#data>;" --trace-ascii curl.log </pre> The optional graph types can be found at [[graphTypes]] The Mulgara server must exist before you can create graphs on it. If you try to create a graph on a nonexistent or unreachable server, the command fails with the message Couldn't contact server.
Updated by Eric Kobrin - over 13 years ago · 11 revisions