This will fetch the RDF Model and Syntax schema, parse it, print it as triples, print it in an RDF serialization generated out of the internal model representation and validate it.
java SM.ginf.TestParser http://www-diglib.stanford.edu/diglib/ginf/1999/05/26-coll
This will fetch the above schema, fetch the schemas used by it (26-core-comm), parse, serialize, validate.
java SM.ginf.TestParser <url or file of your choice>
(Just see what happens...)
Start client on the same machine (it tries to connect to localhost by
default):
java SM.ginf.HelloWorldClient
You should see the following output:
CONNECTING: http://www-diglib.stanford.edu/diglib/ginf/1999/05/26-hello-world
Registred schema http://www.w3.org/1999/02/22-rdf-syntax-ns
of size 13
Registred schema http://www.w3.org/TR/WD-rdf-schema
of size 61
Registred schema http://www-diglib.stanford.edu/diglib/ginf/1999/05/26-core-comm
of size 29
Registred schema http://www-diglib.stanford.edu/diglib/ginf/1999/05/26-hello-world
of size 9
Registred schema http://www-diglib.stanford.edu/diglib/ginf/1999/05/26-core-state
of size 11
Registred schema http://www-diglib.stanford.edu/diglib/ginf/1999/05/26-http
of size 10
Hello world!
Schema http://www-diglib.stanford.edu/diglib/ginf/1999/05/26-hello-worldis
fetched over the network. The server fetches and registeres this schema
upon receiving the client request, too.
HelloWorldServer2 and HelloWorldClient2 load the hello-world schema from the Java class HelloWorld.java. It can be generated using the following command:
java org.ginf.javagen.Main
-d /u/me/here_I_unpacked_it -schema
-use file:/u/me/here_I_unpacked_it/SM/ginf/HelloWorldPackage.rdf
http://www-diglib.stanford.edu/diglib/ginf/1999/05/26-hello-world
Run
java org.ginf.javagen.Main
to get help on the generator.