Example #1
0
 public String insertResource(Resource rsce, String contUrl) {
   return "PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>"
       + "PREFIX res:<"
       + this.getRes()
       + "s#>"
       + "INSERT  "
       + " { <"
       + rsce.getUrl()
       + "> res:submitter  \""
       + rsce.getSubmitter().getLogin()
       + "\" ; "
       + "                       res:state  \""
       + rsce.getState()
       + "\" ; "
       + "                       res:vocname  \""
       + rsce.getVoc().getName()
       + "\" ; "
       + "                       res:type  \""
       + rsce.getType()
       + "\" ; "
       + "                       res:language  \""
       + rsce.getLanguage()
       + "\" ; "
       + "                       res:format  \""
       + rsce.getFormat()
       + "\" ; "
       + "                       res:author  \""
       + rsce.getAuthor()
       + "\" ; "
       + "                       res:content  \""
       + contUrl
       + "\"  "
       + "               }";
 }
Example #2
0
 public String insert(Resource rsce) {
   String descr = "";
   for (String term : rsce.getContent()) {
     descr += "  ;  res:content  \"" + term + "\"  ";
   }
   return "PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>"
       + "PREFIX res:<"
       + this.getRes()
       + "s#>"
       + "INSERT  "
       + " { <"
       + rsce.getUrl()
       + "> res:submitter  \""
       + rsce.getSubmitter().getLogin()
       + "\" ; "
       + "                       res:state  \""
       + rsce.getState()
       + "\" ; "
       + "                       res:vocname  \""
       + rsce.getVoc().getName()
       + "\" ; "
       + "                       res:type  \""
       + rsce.getType()
       + "\" ; "
       + "                       res:language  \""
       + rsce.getLanguage()
       + "\" ; "
       + "                       res:format  \""
       + rsce.getFormat()
       + "\" ; "
       + "                       res:author  \""
       + rsce.getAuthor()
       + "\"  "
       + descr
       + "               }";
 }