Examples of generateSourceKey()


Examples of com.ikanow.infinit.e.data_model.store.config.source.SourcePojo.generateSourceKey()

      catch (Exception e) {
        rp.setResponse(new ResponseObject("Test Source",false,"Error deserializing source (JSON is valid but does not match schema): " + e.getMessage()));           
        return rp;       
      }
      if (null == source.getKey()) {
        source.setKey(source.generateSourceKey()); // (a dummy value, not guaranteed to be unique)
      }
      if ((null == source.getExtractType()) || !source.getExtractType().equals("Federated")) {
        String testUrl = source.getRepresentativeUrl();
        if (null == testUrl) {
          rp.setResponse(new ResponseObject("Test Source",false,"Error, source contains no URL to harvest"));           
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.config.source.SourcePojo.generateSourceKey()

      newSource.setApproved(isApproved);
      newSource.setCreated(new Date());
      newSource.setModified(new Date());
      newSource.generateShah256Hash();
     
      newSource.setKey(validateSourceKey(newSource.getId(), newSource.generateSourceKey()));
     
      ///////////////////////////////////////////////////////////////////////
      // Add the new source to the harvester.sources collection
      try
      {
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.config.source.SourcePojo.generateSourceKey()

        source.setCreated(new Date());
        source.setModified(new Date());
        source.setUrl(source.getUrl());
          // (key generated below from representative URL - don't worry about the fact this field is sometimes not present)
 
        source.setKey(validateSourceKey(source.getId(), source.generateSourceKey()));
 
        source.generateShah256Hash();
          // Note: Create/update the source's Shah-256 hash
     
        ///////////////////////////////////////////////////////////////////////
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.config.source.SourcePojo.generateSourceKey()

   
    // API: Variable community source pojo...
    ResponsePojo rp1 = new ResponsePojo();
    SourcePojo sp = new SourcePojo();
    sp.setUrl("http://test");
    sp.setKey(sp.generateSourceKey());
    sp.addToCommunityIds(new ObjectId("a0000000000000000000000a"));
    sp.addToCommunityIds(new ObjectId("c0000000000000000000000c"));
    //CHECK THIS DOESN'T COMPILE
    //rp1.setData(sp); // (Not allowed SourcePojo isn't a BaseApiPojo)
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.