Package org.deri.grefine.rdf.vocab

Examples of org.deri.grefine.rdf.vocab.VocabularyImporter


      }
      con.add(in, "", rdfFromat);
      con.close();
     
      getRdfSchema(request).addPrefix(prefix, uri);
          getRdfContext().getVocabularySearcher().importAndIndexVocabulary(prefix, uri, repository, projectId, new VocabularyImporter());
          //success
          PrintWriter out = response.getWriter();
      out.print("<html><body><textarea>\n{\"code\":\"ok\"}\n</textarea></body></html>");
      out.flush();
    } catch (Exception e) {
View Full Code Here


      try {
        String name = tokenizer.nextToken();
        String uri = tokenizer.nextToken();
        String url = tokenizer.nextToken();
        //import and index
        this.applicationContext.getVocabularySearcher().importAndIndexVocabulary(name, uri,url, new VocabularyImporter());
        this.predefinedVocabulariesMap.put(name,new Vocabulary(name, uri));
      } catch (Exception e) {
        // predefined vocabularies are not defined properly
        // ignore the exception, just log it
        logger.warn("unable to add predefined vocabularies", e);
View Full Code Here

    String projectId = request.getParameter("project");
    getRdfSchema(request).removePrefix(name);
   
    getRdfContext().getVocabularySearcher().deleteTermsOfVocab(name, projectId);
    try{
      getRdfContext().getVocabularySearcher().importAndIndexVocabulary(name, uri, uri, projectId,new VocabularyImporter());
        } catch (PrefixExistException e) {
            respondException(response, e);
            return;
        } catch (Exception e){
          response.setCharacterEncoding("UTF-8");
View Full Code Here

          if(fetchOption.equals("web")){
            String fetchUrl = request.getParameter("fetch-url");
            if(fetchUrl==null || fetchOption.trim().isEmpty()){
              fetchUrl = uri;
            }
            getRdfContext().getVocabularySearcher().importAndIndexVocabulary(name, uri, fetchUrl, projectId,new VocabularyImporter());
          }
            respondJSON(response, new Jsonizable() {
               
                @Override
                public void write(JSONWriter writer, Properties options)
View Full Code Here

TOP

Related Classes of org.deri.grefine.rdf.vocab.VocabularyImporter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.