Package org.apache.oodt.cas.filemgr.structs

Examples of org.apache.oodt.cas.filemgr.structs.Product


                ProductType type = (ProductType) i.next();
                try {
                    products = client.query(query, type);
                    if (products != null && products.size() > 0) {
                        for (Iterator j = products.iterator(); j.hasNext();) {
                            Product product = (Product) j.next();
                            prodIds.add(product.getProductId());
                        }
                    }
                } catch (CatalogException e) {
                    LOG.log(Level.WARNING, "Exception querying for: ["
                            + type.getName() + "] products: Message: "
View Full Code Here


    public Product getProductById(String productId) throws CatalogException {
        Connection conn = null;
        Statement statement = null;
        ResultSet rs = null;

        Product product = null;

        try {
            conn = dataSource.getConnection();
            statement = conn.createStatement();
View Full Code Here

    public Product getProductByName(String productName) throws CatalogException {
        Connection conn = null;
        Statement statement = null;
        ResultSet rs = null;

        Product product = null;

        try {
            conn = dataSource.getConnection();
            statement = conn.createStatement();
View Full Code Here

            LOG.log(Level.FINE, "getProducts: Executing: " + getProductSql);
            rs = statement.executeQuery(getProductSql);
            products = new Vector<Product>();

            while (rs.next()) {
                Product product = DbStructFactory.getProduct(rs, false);
                products.add(product);
            }

            if (products.size() == 0) {
                products = null;
View Full Code Here

                    + getProductSql);
            rs = statement.executeQuery(getProductSql);
            products = new Vector<Product>();

            while (rs.next()) {
                Product product = DbStructFactory.getProduct(rs, false);
                products.add(product);
            }

            if (products.size() == 0) {
                products = null;
View Full Code Here

            rs = statement.executeQuery(getProductSql);
            products = new Vector<Product>();

            while (rs.next()) {
                Product product = DbStructFactory.getProduct(rs, false);
                products.add(product);
            }

            if (products.size() == 0) {
                products = null;
View Full Code Here

        if (productIds != null && productIds.size() > 0) {
            List<Product> products = new Vector<Product>(productIds.size());

            for (Iterator<String> i = productIds.iterator(); i.hasNext();) {
                String productId = i.next();
                Product p = getProductById(productId);
                products.add(p);
            }

            retPage.setPageProducts(products);
        }
View Full Code Here

            throw new InstantiationException(e.getMessage());
        }
    }

    private Product getProduct(String productId) {
        Product product = null;

        try {
            product = this.fmClient.getProductById(productId);
        } catch (Exception e) {
            throw new RuntimeException("Unable to retrieve product:["
                    + productId + "] by id");
        }
        try {
            product.setProductReferences(this.fmClient
                    .getProductReferences(product));
        } catch (CatalogException e) {
            LOG.log(Level.WARNING,
                    "Unable to obtain product references! Message: "
                            + e.getMessage());
View Full Code Here

     * @param outDirPath
     *            The path on the local filesystem to write the {@link Product}
     *            xml file to.
     */
    public void dumpProduct(String productId, String outDirPath) {
        Product product = getProduct(productId);
        String fullProdFilePath = outDirPath;
        fullProdFilePath = (fullProdFilePath.endsWith("/")) ? fullProdFilePath
                : fullProdFilePath + "/";
        Metadata met = getMetadata(product);
        String filename = met.getMetadata(FILENAME) != null ? met
View Full Code Here

                            + " = <some product id>: your query was: "
                            + kwdQuery);
        }

        String prodId = kwdQueryToks[1];
        Product product = null;
        try {
            product = this.fm.getProductById(prodId);
            product.setProductReferences(this.fm.getProductReferences(product));
        } catch (CatalogException e) {
            throw new ProductException(
                    "Exception querying file manager for product: [" + prodId
                            + "]: Message: " + e.getMessage());
        }

        try {
            addResultsFromProductId(query, product);
        } catch (URISyntaxException e) {
            throw new ProductException(
                    "URI Syntax Exception deciphering product: ["
                            + product.getProductName() + "]: Message: "
                            + e.getMessage());
        }
        return query;
    }
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.filemgr.structs.Product

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.