Examples of ProductType


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

        }

    }

    private ProductType getProductType(String productTypeName) {
        ProductType type = null;

        try {
            type = fmClient.getProductTypeByName(productTypeName);
        } catch (RepositoryManagerException e) {
            LOG.log(Level.WARNING, "Unable to obtain product type: ["
View Full Code Here

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

                    }
                }
            }
        }
       
        ProductType productType = new ProductType();
        productType.setName(name);
        productType.setProductTypeId(id);
        productType.setProductRepositoryPath(repositoryPath);
        productType.setVersioner(versionerClass);
        productType.setDescription(description);
        productType.setTypeMetadata(met);
        productType.setExtractors(extractors);
        productType.setHandlers(handlers);

        return productType;
    }
View Full Code Here

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

            root.setAttribute("xmlns:cas", "http://oodt.jpl.nasa.gov/1.0/cas");
            document.appendChild(root);

            // now add the set of metadata elements in the properties object
            for (Iterator<ProductType> i = productTypes.iterator(); i.hasNext();) {
                ProductType type = i.next();

                Element typeElem = document.createElement("type");
                typeElem.setAttribute("id", type.getProductTypeId());
                typeElem.setAttribute("name", type.getName());

                Element descriptionElem = document.createElement("description");
                descriptionElem.appendChild(document.createTextNode(type
                        .getDescription()));
                typeElem.appendChild(descriptionElem);

                Element repositoryPathElem = document
                        .createElement("repository");
                repositoryPathElem.setAttribute("path", type
                        .getProductRepositoryPath());
                typeElem.appendChild(repositoryPathElem);

                Element versionerClassPathElem = document
                        .createElement("versioner");
                versionerClassPathElem.setAttribute("class", type
                        .getVersioner());
                typeElem.appendChild(versionerClassPathElem);

                root.appendChild(typeElem);
            }
View Full Code Here

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

    public Hashtable<String, Object> pagedQuery(
            Hashtable<String, Object> queryHash,
            Hashtable<String, Object> productTypeHash,
            int pageNum) throws CatalogException {
        ProductType type = XmlRpcStructFactory
                .getProductTypeFromXmlRpc(productTypeHash);
        Query query = XmlRpcStructFactory.getQueryFromXmlRpc(queryHash);

        ProductPage prodPage = null;

        try {
            prodPage = catalog.pagedQuery(this.getCatalogQuery(query, type), type, pageNum);

            if (prodPage == null) {
                prodPage = ProductPage.blankPage();
            } else {
                // it is possible here that the underlying catalog did not
                // set the ProductType
                // to obey the contract of the File Manager, we need to make
                // sure its set here
                setProductType(prodPage.getPageProducts());
            }
        } catch (Exception e) {
            e.printStackTrace();
            LOG.log(Level.WARNING,
                    "Catalog exception performing paged query for product type: ["
                            + type.getProductTypeId() + "] query: [" + query
                            + "]: Message: " + e.getMessage());
            throw new CatalogException(e.getMessage());
        }

        return XmlRpcStructFactory.getXmlRpcProductPage(prodPage);
View Full Code Here

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

        return XmlRpcStructFactory.getXmlRpcProductPage(prodPage);
    }

    public Hashtable<String, Object> getFirstPage(
            Hashtable<String, Object> productTypeHash) {
        ProductType type = XmlRpcStructFactory
                .getProductTypeFromXmlRpc(productTypeHash);
        ProductPage page = catalog.getFirstPage(type);
        try {
            setProductType(page.getPageProducts());
        } catch (Exception e) {
View Full Code Here

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

        return XmlRpcStructFactory.getXmlRpcProductPage(page);
    }

    public Hashtable<String, Object> getLastPage(
            Hashtable<String, Object> productTypeHash) {
        ProductType type = XmlRpcStructFactory
                .getProductTypeFromXmlRpc(productTypeHash);
        ProductPage page = catalog.getLastProductPage(type);
        try {
            setProductType(page.getPageProducts());
        } catch (Exception e) {
View Full Code Here

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

    }

    public Hashtable<String, Object> getNextPage(
            Hashtable<String, Object> productTypeHash,
            Hashtable<String, Object> currentPageHash) {
        ProductType type = XmlRpcStructFactory
                .getProductTypeFromXmlRpc(productTypeHash);
        ProductPage currPage = XmlRpcStructFactory
                .getProductPageFromXmlRpc(currentPageHash);
        ProductPage page = catalog.getNextPage(type, currPage);
        try {
View Full Code Here

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

    }

    public Hashtable<String, Object> getPrevPage(
            Hashtable<String, Object> productTypeHash,
            Hashtable<String, Object> currentPageHash) {
        ProductType type = XmlRpcStructFactory
                .getProductTypeFromXmlRpc(productTypeHash);
        ProductPage currPage = XmlRpcStructFactory
                .getProductPageFromXmlRpc(currentPageHash);
        ProductPage page = catalog.getPrevPage(type, currPage);
        try {
View Full Code Here

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

        return XmlRpcStructFactory.getXmlRpcProductPage(page);
    }

    public String addProductType(Hashtable<String, Object> productTypeHash)
            throws RepositoryManagerException {
        ProductType productType = XmlRpcStructFactory
                .getProductTypeFromXmlRpc(productTypeHash);
        repositoryManager.addProductType(productType);
        return productType.getProductTypeId();

    }
View Full Code Here

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

    public int getNumProducts(Hashtable<String, Object> productTypeHash)
            throws CatalogException {
        int numProducts = -1;

        ProductType type = XmlRpcStructFactory
                .getProductTypeFromXmlRpc(productTypeHash);

        try {
            numProducts = catalog.getNumProducts(type);
        } catch (CatalogException e) {
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.