Esempio n. 1
0
 /** Parse a string to get one Node (the first token in the string) */
 public static Node parse(String string) {
   Tokenizer tokenizer = TokenizerFactory.makeTokenizerString(string);
   if (!tokenizer.hasNext()) return null;
   Token t = tokenizer.next();
   Node n = profile.create(null, t);
   if (tokenizer.hasNext())
     Log.warn(RiotLib.class, "String has more than one token in it: " + string);
   return n;
 }
Esempio n. 2
0
 static {
   PrefixMap pmap = profile.getPrologue().getPrefixMap();
   pmap.add("rdf", ARQConstants.rdfPrefix);
   pmap.add("rdfs", ARQConstants.rdfsPrefix);
   pmap.add("xsd", ARQConstants.xsdPrefix);
   pmap.add("owl", ARQConstants.owlPrefix);
   pmap.add("fn", ARQConstants.fnPrefix);
   pmap.add("op", ARQConstants.fnPrefix);
   pmap.add("ex", "http://example/ns#");
   pmap.add("", "http://example/");
 }