Examples of GRefineJsonUtilitiesImpl


Examples of com.google.refine.org.deri.reconcile.util.GRefineJsonUtilitiesImpl

  SindiceBroker mockBroker;
  QueryEndpoint mockEndpoint;
 
  @BeforeMethod
  public void setUp() throws Exception{
    jsonUtil = new GRefineJsonUtilitiesImpl();
    request = new ReconciliationRequest(query, limit);
    urlPairs = new LinkedHashSet<String[]>();
    urlPairs.add(new String[] {"http://doc1.result.url","http://doc1.sindice.cache.url"} );
    urlPairs.add(new String[] {"http://doc2.result.url","http://doc2.sindice.cache.url"} );
View Full Code Here

Examples of com.google.refine.org.deri.reconcile.util.GRefineJsonUtilitiesImpl

  }
 
  @Test
  public void saveServiceTest() throws JSONException, IOException{
    String id = "sparql-test";
    ServiceRegistry registry = new ServiceRegistry(new GRefineJsonUtilitiesImpl(),null);
    GRefineServiceManager manager = new GRefineServiceManager(registry, dir);
   
    ReconciliationService service = new RdfReconciliationService(id, id, new QueryEndpointImpl(new LarqSparqlQueryFactory(), new RemoteQueryExecutor(url, null)), 0);
    manager.addService(service);
   
    assertTrue(registry.hasService(id));
    //verify service is saved
   
    registry = new ServiceRegistry(new GRefineJsonUtilitiesImpl(),null);
    //verify no service
    assertFalse(registry.hasService(id));
   
    File file = new File(dir,"services");
    //verify saved
View Full Code Here

Examples of com.google.refine.org.deri.reconcile.util.GRefineJsonUtilitiesImpl

  }
 
  @Test
  public void saveRdfServiceTest() throws JSONException, IOException{
    String id = "rdf-test";
    ServiceRegistry registry = new ServiceRegistry(new GRefineJsonUtilitiesImpl(),null);
    GRefineServiceManager manager = new GRefineServiceManager(registry, dir);
   
    Model m = ModelFactory.createDefaultModel();
    ReconciliationService service = new RdfReconciliationService(id,id, new QueryEndpointImpl(new LarqSparqlQueryFactory(),
        new DumpQueryExecutor(m)), 0);
    manager.addAndSaveService(service);
   
    assertTrue(registry.hasService(id));
    //verify service is saved
   
    registry = new ServiceRegistry(new GRefineJsonUtilitiesImpl(),null);
    //verify no service
    assertFalse(registry.hasService(id));
   
    File file = new File(dir,"services");
    //verify saved
View Full Code Here

Examples of org.deri.grefine.reconcile.util.GRefineJsonUtilitiesImpl

  //TODO ... ugly, isn't it?
  static public synchronized void initialize(File workingDir) throws JSONException, IOException{
    if(singleton==null){
      InputStream prefixesIn = GRefineServiceManager.class.getResourceAsStream("/files/prefixes");
      PrefixManager prefixManager = new PrefixManager(prefixesIn);
      singleton = new GRefineServiceManager(new ServiceRegistry(new GRefineJsonUtilitiesImpl(),prefixManager), workingDir);
      File servicesFile= new File(workingDir,"services");
      if(servicesFile.exists()){
        FileInputStream in = new FileInputStream(servicesFile);
        singleton.registry.loadFromFile(in);       
      }
View Full Code Here

Examples of org.deri.grefine.reconcile.util.GRefineJsonUtilitiesImpl

        }
       
        SindiceBroker service = new SindiceBroker();
        for(int j=0;j<samples.size();j++){
          String s = samples.get(j);
          List<String> domains = service.guessDomain(s,s_resultsLimit,new GRefineJsonUtilitiesImpl());
          for(String domain:domains){
            if(domainsMap.containsKey(domain)){
              domainsMap.put(domain,domainsMap.get(domain).intValue() + 1);
            }else{
              domainsMap.put(domain, 0);
View Full Code Here

Examples of org.deri.grefine.reconcile.util.GRefineJsonUtilitiesImpl

  private String domain;
  private RdfUtilities rdfUtilities;
  protected PreviewResourceCannedQuery previewResourceCannedQuery;
 
  public SindiceService(String id, String name,String domain){
    this(id,name,domain,new GRefineJsonUtilitiesImpl(), new RdfUtilitiesImpl(), new SindiceBroker(), new QueryEndpointFactory());
  }
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.