Examples of Pedigree


Examples of org.apache.oodt.pcs.pedigree.Pedigree

   * @param model
   */
  public Trace(String id, String fmUrlStr, boolean listNotCat,
      List<String> excludeList, Product product) {
    super(id);
    Pedigree pedigree = new Pedigree(new FileManagerUtils(fmUrlStr),
        listNotCat, excludeList);
    PedigreeTree upstream = pedigree.doPedigree(product, true);
    PedigreeTree downstream = pedigree.doPedigree(product, false);

    add(new TraceNode("upstream_pedigree_tree", "up", upstream.getRoot(), 0, 0));
    add(new TraceNode("downstream_pedigree_tree", "down", downstream.getRoot(), 0, 0));
  }
View Full Code Here

Examples of org.apache.oodt.pcs.pedigree.Pedigree

  private FileManagerUtils fm;

  public PedigreeResource() throws MalformedURLException {
    this.fm = new FileManagerUtils(PCSService.conf.getFmUrl());
    this.trace = new Pedigree(this.fm, PCSService.conf
        .isTraceNotCatalogedFiles(), Arrays.asList(PCSService.conf
        .getTraceProductTypeExcludeList().split(",")));
  }
View Full Code Here

Examples of org.apache.oodt.pcs.pedigree.Pedigree

   */
  public void doTrace(String productName) {

    Product prod = fm.safeGetProductByName(productName);

    Pedigree pedigree = new Pedigree(fm, this.listNotCataloged,
        this.excludeTypeList);

    System.out.println("");
    System.out.println(REPORT_LINE_SEPARATOR);
    System.out.println("Product: " + prod.getProductName());
    System.out.println(REPORT_LINE_SEPARATOR);

    prod.setProductReferences(fm.safeGetProductReferences(prod));
    System.out.println("Location: " + fm.getFilePath(prod));
    System.out.println(REPORT_LINE_SEPARATOR);
    System.out.println("Metadata: ");
    Metadata met = fm.safeGetMetadata(prod);
    if (met != null && met.getHashtable() != null
        && met.getHashtable().keySet().size() > 0) {
      for (Iterator i = met.getHashtable().keySet().iterator(); i.hasNext();) {
        String key = (String) i.next();
        List vals = met.getAllMetadata(key);
        System.out.println(key + "=>" + vals);
      }
    }

    System.out.println(REPORT_LINE_SEPARATOR);
    System.out.println("Generated from workflow:");
    System.out.println("");
    WorkflowInstance inst = null;

    try {
      inst = getWorkflowInstanceById(wm.safeGetWorkflowInstances(), met
          .getMetadata(JOB_ID));

      System.out.println(inst.getWorkflow().getName() + ": ID: ["
          + inst.getId() + "]");
      System.out.println("Status: " + inst.getStatus());
      List wInstProds = pedigree.getWorkflowInstProds(inst.getId());
      if (wInstProds != null && wInstProds.size() > 0) {
        System.out.println("Associated products:");
        System.out.println("");
        for (Iterator i = wInstProds.iterator(); i.hasNext();) {
          Product wInstProd = (Product) i.next();
          System.out.println(wInstProd.getProductName());
        }
      }
    } catch (Exception e) {
      System.out.println("Unable to obtain workflow instance for product!");
    }

    System.out.println(REPORT_LINE_SEPARATOR);
    System.out.println("Full lineage:");
    System.out.println("");
    System.out.println("Downstream:");

    PedigreeTree downstreamLineageTree = pedigree.doPedigree(prod, false);
    downstreamLineageTree.printPedigreeTree();

    System.out.println("");
    System.out.println("Upstream:");
    PedigreeTree upstreamLineageTree = pedigree.doPedigree(prod, true);
    upstreamLineageTree.printPedigreeTree();

  }
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.