Package org.apache.oodt.cas.filemgr.repository

Examples of org.apache.oodt.cas.filemgr.repository.XMLRepositoryManager


    String rootPolicyPath = this.cleanse(CurationService.config
        .getPolicyUploadPath());
    String policyPath = new File(rootPolicyPath + policy).toURL()
        .toExternalForm();
    String[] policies = { policyPath };
    XMLRepositoryManager repMgr = new XMLRepositoryManager(Arrays
        .asList(policies));
    ProductType productType = repMgr.getProductTypeByName(productTypeName);
   
    return productType.getTypeMetadata();
  }
View Full Code Here


    String rootPolicyPath = this.cleanse(CurationService.config
        .getPolicyUploadPath());
    String policyPath = new File(rootPolicyPath + policy).toURL()
        .toExternalForm();
    String[] policies = { policyPath };
    XMLRepositoryManager repMgr = new XMLRepositoryManager(Arrays
        .asList(policies));

    ProductType productType = repMgr.getProductTypeByName(productTypeName);
    productType.setTypeMetadata(metadata);
   
    CurationXmlStructFactory.writeProductTypeXmlDocument(repMgr
        .getProductTypes(), rootPolicyPath + policy + "/product-types.xml");

    // refresh the config on the fm end
    CurationService.config.getFileManagerClient().refreshConfigAndPolicy();
   
View Full Code Here

    this.stagingAreaPath = stagingAreaPath;
  }

  public Map<String, ProductType> getProductTypes(String dsCollection) {
    Map<String, ProductType> typeMap = new HashMap<String, ProductType>();
    XMLRepositoryManager xmlRepo = getRepo(dsCollection);
    List<ProductType> types = safeGetProductTypes(xmlRepo);

    for (ProductType type : types) {
      typeMap.put(type.getName(), type);
    }
View Full Code Here

    return JSONArray.fromObject(items).toString();
  }

  public String getDatasetsByPolicyAsJSON(String dsCollection) {
    XMLRepositoryManager xmlRepo = getRepo(dsCollection);
    List<ProductType> types = safeGetProductTypes(xmlRepo);
   
    Iterator<ProductType> it = types.iterator();

    List<Map<String, Object>> items = new ArrayList<Map<String, Object>>();
View Full Code Here

    }

  }

  private XMLRepositoryManager getRepo(String dsCollection) {
    XMLRepositoryManager xmlRepo = null;
    String url = "file://" + this.policyDirectoryPath + "/" + dsCollection;

    try {
      xmlRepo = new XMLRepositoryManager(Collections.singletonList(url));
    } catch (Exception e) {
      LOG.log(Level.WARNING, "Error reading product types from: [" + url
          + "]: Message: " + e.getMessage());
    }
View Full Code Here

    String rootPolicyPath = this.cleanse(CurationService.config
        .getPolicyUploadPath());
    String policyPath = new File(rootPolicyPath + policy).toURL()
        .toExternalForm();
    String[] policies = { policyPath };
    XMLRepositoryManager repMgr = new XMLRepositoryManager(Arrays
        .asList(policies));
    ProductType productType = repMgr.getProductTypeByName(productTypeName);
   
    return productType.getTypeMetadata();
  }
View Full Code Here

    String rootPolicyPath = this.cleanse(CurationService.config
        .getPolicyUploadPath());
    String policyPath = new File(rootPolicyPath + policy).toURL()
        .toExternalForm();
    String[] policies = { policyPath };
    XMLRepositoryManager repMgr = new XMLRepositoryManager(Arrays
        .asList(policies));

    ProductType productType = repMgr.getProductTypeByName(productTypeName);
    productType.setTypeMetadata(metadata);
   
    CurationXmlStructFactory.writeProductTypeXmlDocument(repMgr
        .getProductTypes(), rootPolicyPath + policy + "/product-types.xml");

    // refresh the config on the fm end
    CurationService.config.getFileManagerClient().refreshConfigAndPolicy();
   
View Full Code Here

    String rootPolicyPath = this.cleanse(CurationService.config
        .getPolicyUploadPath());
    String policyPath = new File(rootPolicyPath + policy).toURL()
        .toExternalForm();
    String[] policies = { policyPath };
    XMLRepositoryManager repMgr = new XMLRepositoryManager(Arrays
        .asList(policies));
    List<ProductType> types = repMgr.getProductTypes();
    String[] typeNames = new String[types.size()];
    int i = 0;
    for (ProductType type : types) {
      typeNames[i] = type.getName();
      i++;
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.filemgr.repository.XMLRepositoryManager

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.