Examples of ReconciliationService


Examples of org.deri.grefine.reconcile.model.ReconciliationService

    String propertyId = request.getParameter("id");   
    return registry.previewProperty(service, propertyId, callback);
  }
 
  public String suggestEntity(String serviceName, HttpServletRequest request) throws JsonGenerationException, JsonMappingException, IOException {
    ReconciliationService service = getService(serviceName);
    String callback = request.getParameter("callback");
    String prefix = request.getParameter("prefix");
    return registry.suggestEntity(service, prefix, callback);
  }
View Full Code Here

Examples of org.deri.grefine.reconcile.model.ReconciliationService

    String prefix = request.getParameter("prefix");
    return registry.suggestEntity(service, prefix, callback);
  }
 
  public String previewEntity(String serviceName, HttpServletRequest request) throws Exception {
    ReconciliationService service = getService(serviceName);
    String callback = request.getParameter("callback");
    String entityId = request.getParameter("id");   
    return registry.previewEntity(service, entityId, callback);
  }
View Full Code Here

Examples of org.deri.grefine.reconcile.model.ReconciliationService

    String entityId = request.getParameter("id");   
    return registry.previewEntity(service, entityId, callback);
  }
 
  public String previewResource(String serviceName, HttpServletRequest request) throws Exception {
    ReconciliationService service = getService(serviceName);
    String entityId = request.getParameter("id");   
    return registry.previewResource(service, entityId);
  }
View Full Code Here

Examples of org.deri.grefine.reconcile.model.ReconciliationService

    Set<String> services = this.registry.getServiceIds();
    Pattern pattern = Pattern.compile("rdf-extension\\/services\\/([-.a-zA-Z0-9_]+)");
    Set<String> ids = getServiceIds(urls,pattern);
    services.removeAll(ids);
    for(String id:services){
      ReconciliationService service =registry.removeService(id);
      File modelFile = new File(workingDir,service.getId()+".ttl");
      if(modelFile.exists()){
        modelFile.delete();
      }
    }
    FileOutputStream servicesFile = new FileOutputStream(new File(workingDir,"services"));
View Full Code Here

Examples of org.deri.grefine.reconcile.model.ReconciliationService

  public Set<String> getServiceIds(){
    return new HashSet<String>(services.keySet());
  }
 
  public ReconciliationService getService(String id, FileInputStream in){
    ReconciliationService service = services.get(id);
    if(in!=null){
      service.initialize(in);
    }
    return service;
  }
View Full Code Here

Examples of org.deri.grefine.reconcile.model.ReconciliationService

            JSONObject obj = (JSONObject) tokener.nextValue();
            JSONArray services = obj.getJSONArray("services");
            for(int i=0;i<services.length();i++){
              JSONObject serviceObj = services.getJSONObject(i);
              String type = serviceObj.getString("type");
              ReconciliationService service;
              if(type.equals("rdf")){
                service = loadRdfServiceFromJSON(serviceObj);
              }else if(type.equals("sindice")){
                service = loadSindiceServiceFromJSON(serviceObj);
              }else{
                //unknown service ignore
                continue;
              }
              this.services.put(service.getId(), service);
            }
        }finally {
            in.close();
        }
   
View Full Code Here

Examples of org.deri.grefine.reconcile.model.ReconciliationService

    //validate
    if(name.isEmpty() || url.isEmpty() || propUris.size()==0){
      throw new RuntimeException("name, endpoint URL and at least one label property ar needed");
    }
    String datasource = request.getParameter("datasource");
    ReconciliationService service;
    if(datasource.equals("sparql")){
      service = getSparqlService(name,id,url,propUris,request);
      GRefineServiceManager.singleton.addService(service);
    }else{
      String format = request.getParameter("file_format");
View Full Code Here

Examples of org.deri.grefine.reconcile.model.ReconciliationService

      //plain
      PlainSparqlQueryFactory queryFactory = new PlainSparqlQueryFactory();
      QueryExecutor queryExecutor = new RemoteQueryExecutor(url, graph);
      queryEndpoint = new PlainSparqlQueryEndpoint(queryFactory, queryExecutor);
    }
    ReconciliationService service = new RdfReconciliationService(id, name, propUris, queryEndpoint, DEFAULT_MATCH_THRESHOLD);
    return service;
  }
View Full Code Here

Examples of org.deri.grefine.reconcile.model.ReconciliationService

public class InitializeServicesCommand extends AbstractAddServiceCommand{

  @Override
  protected ReconciliationService getReconciliationService(HttpServletRequest request) throws JSONException, IOException {
    ReconciliationService service = new SindiceService("sindice", "Sindice", null);
    try {
      JSONArray arr = ParsingUtilities.evaluateJsonStringToArray(request.getParameter("services"));
      Set<String> urls = new HashSet<String>();
      for(int i=0;i<arr.length();i++){
        urls.add(arr.getString(i));
View Full Code Here

Examples of org.deri.grefine.reconcile.model.ReconciliationService

      StringWriter sw = new StringWriter();
      JSONWriter w = new JSONWriter(sw);
      w.object();
          w.key("code"); w.value("ok");
          w.key("service");
          ReconciliationService service = getReconciliationService(request);
          service.writeAsJson(w);
          w.endObject();
          sw.flush();
      //out.print("<html><body><textarea>" + sw.toString() + "</textarea></body></html>");
          out.print(sw.toString());
          out.flush();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.