01: package org.ontoware.rdf2go.example;
02:
03: import java.util.HashSet;
04:
05: import org.ontoware.rdf2go.Reasoning;
06: import org.ontoware.rdf2go.exception.ModelRuntimeException;
07: import org.ontoware.rdf2go.impl.jena24.ModelImplJena24;
08: import org.ontoware.rdf2go.model.Model;
09: import org.ontoware.rdf2go.model.node.URI;
10: import org.ontoware.rdf2go.vocabulary.RDF;
11:
12: public class AccessorExample {
13:
14: public static HashSet<?> getAllValues(Model m, URI resource,
15: URI property, Class<?> returnType)
16: throws ModelRuntimeException {
17: return new HashSet<String>();
18: }
19:
20: @SuppressWarnings("unchecked")
21: public static void main(String[] args) throws ModelRuntimeException {
22: Model m = new ModelImplJena24(Reasoning.rdfs);
23: URI u = RDF.Bag;
24: URI p = RDF.type;
25: @SuppressWarnings("unused")
26: HashSet<String> names = (HashSet<String>) getAllValues(m, u, p,
27: String.class);
28: }
29:
30: }
|