An RDF Model.
An RDF model is a set of Statements. Methods are provided for creating resources, properties and literals and the Statements which link them, for adding statements to and removing them from a model, for querying a model and set operations for combining models.
Models may create Resources [URI nodes and bnodes]. Creating a Resource does not make the Resource visible to the model; Resources are only "in" Models if Statements about them are added to the Model. Similarly the only way to "remove" a Resource from a Model is to remove all the Statements that mention it.
When a Resource or Literal is created by a Model, the Model is free to re-use an existing Resource or Literal object with the correct values, or it may create a fresh one. [All Jena RDFNodes and Statements are immutable, so this is generally safe.]
This interface defines a set of primitive methods. A set of convenience methods which extends this interface, e.g. performing automatic type conversions and support for enhanced resources, is defined in {@link ModelCon}.
System Properties
Firewalls and Proxies
Some of the methods, e.g. the read methods, may have to traverse a firewall. This can be accomplished using the standard java method of setting system properties. To use a socks proxy, include on the java command line:
-DsocksProxyHost=[your-proxy-domain-name-or-ip-address]
To use an http proxy, include on the command line:
-DproxySet=true -DproxyHost=[your-proxy] -DproxyPort=[your-proxy-port-number]
Alternatively, these properties can be set programatically, e.g.
System.getProperties().put("proxySet","true"); System.getProperties().put("proxyHost","proxy.hostname"); System.getProperties().put("proxyPort",port_number);