public final class Demo {
private static final PrintStream out = System.out;
private Demo() {
ResourceManager rm = ResourceManagerFactory.getResourceManager();
rm.load("http://www.wikier.org/foaf.rdf");
out.println("sergio:");
out.println("------");
Person sergio = (Person)rm.find(Person.class, "http://www.wikier.org/foaf#wikier");
out.println(sergio);
out.println();
out.flush();
out.println("diego:");
out.println("-----");
Person diego = (Person)rm.find("http://berrueta.net/foaf.rdf#me");
out.println(diego);
out.println();
out.flush();
out.println("all resources:");
out.println("-------------");
Object[] persons = rm.findAll(Person.class);
for (int i=0; i<persons.length; i++) {
Person person2 = (Person)persons[i];
out.println(person2);
}
out.println();
out.flush();
out.println("serialize:");
out.println("---------");
rm.serialize(sergio, new OutputStreamWriter(out));
out.println();
out.flush();
}