Package org.apache.oodt.pcs.util

Examples of org.apache.oodt.pcs.util.FileManagerUtils


        item.add(countLink);
      }
    });

    List<Product> prodList = report.getLatestProductsIngested();
    final FileManagerUtils fm = new FileManagerUtils(fmUrlStr);

    add(new ListView<Product>("file_health_list", prodList) {
      /*
       * (non-Javadoc)
       *
       * @see
       * org.apache.wicket.markup.html.list.ListView#populateItem(org.apache
       * .wicket.markup.html.list.ListItem)
       */
      @Override
      protected void populateItem(ListItem<Product> item) {
        final Product product = item.getModelObject();
        product.setProductType(fm.safeGetProductTypeById(product
            .getProductType().getProductTypeId()));
        product.setProductReferences(fm.safeGetProductReferences(product));
        final Metadata prodMet = fm.safeGetMetadata(product);
        final String filePath = fm.getFilePath(product);

        Link link = new Link("view_product_link") {
          /*
           * (non-Javadoc)
           *
 
View Full Code Here


   * @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));
View Full Code Here

  private Pedigree trace;

  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

    return output;
  }

  private void encodeLatestFile(List<Object> latestFilesOutput, Product p)
      throws MalformedURLException {
    FileManagerUtils fm = new FileManagerUtils(PCSService.conf.getFmUrl());
    p.setProductType(fm.safeGetProductTypeById(p.getProductType()
        .getProductTypeId()));
    p.setProductReferences(fm.safeGetProductReferences(p));
    Metadata prodMet = fm.safeGetMetadata(p);
    if (prodMet == null)
      prodMet = new Metadata();
    Map<String, Object> fileOutput = new HashMap<String, Object>();
    fileOutput.put("filepath", fm.getFilePath(p));
    fileOutput.put("receivedTime", prodMet.getMetadata("CAS."
        + CoreMetKeys.PRODUCT_RECEVIED_TIME) != null ? prodMet
        .getMetadata("CAS." + CoreMetKeys.PRODUCT_RECEVIED_TIME) : "UNKNOWN");
    latestFilesOutput.add(fileOutput);
  }
View Full Code Here

   * @param excludeList
   *          A {@link List} of String {@link ProductType} names that should be
   *          excluded from the Pedigree.
   */
  public Pedigree(String fmUrlStr, boolean listNotCat, List excludeList) {
    this(new FileManagerUtils(FileManagerUtils.safeGetUrlFromString(fmUrlStr)),
        listNotCat, excludeList);

  }
View Full Code Here

  private WorkflowStatesFile statesFile;

  public PCSHealthMonitor(String fmUrlStr, String wmUrlStr, String rmUrlStr,
      String crawlPropFilePath, String statesFilePath)
      throws InstantiationException {
    this.fm = new FileManagerUtils(fmUrlStr);
    this.wm = new WorkflowManagerUtils(wmUrlStr);
    this.rm = new ResourceManagerUtils(rmUrlStr);
    this.crawlProps = new CrawlPropertiesFile(crawlPropFilePath);
    this.statesFile = new WorkflowStatesFile(statesFilePath);
  }
View Full Code Here

  private List excludeTypeList;

  private static final String REPORT_LINE_SEPARATOR = "-------------------------------------------------- ";

  public PCSTrace(URL wmgrUrl, URL fmUrl) {
    fm = new FileManagerUtils(fmUrl);
    wm = new WorkflowManagerUtils(wmgrUrl);
  }
View Full Code Here

  private ListingConf conf;

  public PCSLongLister(String fmUrlStr, String confFile)
      throws InstantiationException {
    fm = new FileManagerUtils(fmUrlStr);
    try {
      this.conf = new ListingConf(new File(confFile));
    } catch (Exception e) {
      throw new InstantiationException(e.getMessage());
    }
View Full Code Here

TOP

Related Classes of org.apache.oodt.pcs.util.FileManagerUtils

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.