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

Examples of org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException


            // writer.optimize();
        } catch (IOException e) {
            LOG.log(Level.WARNING, "Unable to index product: ["
                    + cp.getProduct().getProductName() + "]: Message: "
                    + e.getMessage(), e);
            throw new CatalogException("Unable to index product: ["
                    + cp.getProduct().getProductName() + "]: Message: "
                    + e.getMessage());
        } finally {
            try {
                writer.close();
View Full Code Here


        } catch (IOException e) {
            LOG.log(Level.WARNING,
                    "IOException when opening index directory: ["
                            + indexFilePath + "] for search: Message: "
                            + e.getMessage());
            throw new CatalogException(e.getMessage());
        } finally {
            if (searcher != null) {
                try {
                    searcher.close();
                } catch (Exception ignore) {
View Full Code Here

            e.printStackTrace();
            LOG.log(Level.WARNING,
                    "IOException when opening index directory: ["
                            + indexFilePath + "] for search: Message: "
                            + e.getMessage());
            throw new CatalogException(e.getMessage());
        } finally {
            if (searcher != null) {
                try {
                    searcher.close();
                } catch (Exception ignore) {
View Full Code Here

                occur = BooleanClause.Occur.MUST_NOT;
                booleanQuery.add(new WildcardQuery(new Term(((BooleanQueryCriteria) queryCriteria)
                        .getTerms().get(0).getElementName(), "*")), BooleanClause.Occur.SHOULD);
                break;
            default:
                throw new CatalogException("Invalid BooleanQueryCriteria opertor ["
                        + ((BooleanQueryCriteria) queryCriteria).getOperator() + "]");
            }
            for (QueryCriteria qc : ((BooleanQueryCriteria) queryCriteria).getTerms())
                booleanQuery.add(this.getQuery(qc), occur);

            return booleanQuery;
        } else if (queryCriteria instanceof TermQueryCriteria) {
            String val = ((TermQueryCriteria) queryCriteria).getValue();
            return new TermQuery(new Term(queryCriteria.getElementName(), val));
        } else if (queryCriteria instanceof RangeQueryCriteria) {
            String startVal = ((RangeQueryCriteria) queryCriteria).getStartValue();
            String endVal = ((RangeQueryCriteria) queryCriteria).getEndValue();
            boolean inclusive = ((RangeQueryCriteria) queryCriteria).getInclusive();
            Term startTerm = null, endTerm = null;
            if (!startVal.equals("")) {
                startTerm = new Term(queryCriteria.getElementName(), startVal);
            }

            if (!endVal.equals("")) {
                endTerm = new Term(queryCriteria.getElementName(), endVal);
            }

            return new RangeQuery(startTerm, endTerm, inclusive);
        }else {
            throw new CatalogException("Invalid QueryCriteria ["
                    + queryCriteria.getClass().getCanonicalName() + "]");
        }
    }
View Full Code Here

        try {
            success = ((Boolean) client.execute("filemgr.modifyProduct",
                    argList)).booleanValue();
        } catch (XmlRpcException e) {
            throw new CatalogException(e.getMessage());
        } catch (IOException e) {
            throw new CatalogException(e.getMessage());
        }

        return success;

    }
View Full Code Here

        try {
            success = ((Boolean) client.execute("filemgr.removeProduct",
                    argList)).booleanValue();
        } catch (XmlRpcException e) {
            throw new CatalogException(e.getMessage());
        } catch (IOException e) {
            throw new CatalogException(e.getMessage());
        }

        return success;

    }
View Full Code Here

        try {
            pageHash = (Hashtable<String, Object>) client.execute(
                    "filemgr.pagedQuery", argList);
        } catch (XmlRpcException e) {
            throw new CatalogException(e.getMessage());
        } catch (IOException e) {
            throw new CatalogException(e.getMessage());
        }

        return XmlRpcStructFactory.getProductPageFromXmlRpc(pageHash);
    }
View Full Code Here

        try {
            pageHash = (Hashtable<String, Object>) client.execute(
                    "filemgr.getFirstPage", argList);
        } catch (XmlRpcException e) {
            throw new CatalogException(e.getMessage());
        } catch (IOException e) {
            throw new CatalogException(e.getMessage());
        }

        if (pageHash != null) {
            page = XmlRpcStructFactory.getProductPageFromXmlRpc(pageHash);
        }
View Full Code Here

        try {
            pageHash = (Hashtable<String, Object>) client.execute(
                    "filemgr.getLastPage", argList);
        } catch (XmlRpcException e) {
            throw new CatalogException(e.getMessage());
        } catch (IOException e) {
            throw new CatalogException(e.getMessage());
        }

        if (pageHash != null) {
            page = XmlRpcStructFactory.getProductPageFromXmlRpc(pageHash);
        }
View Full Code Here

        try {
            pageHash = (Hashtable<String, Object>) client.execute(
                    "filemgr.getNextPage", argList);
        } catch (XmlRpcException e) {
            throw new CatalogException(e.getMessage());
        } catch (IOException e) {
            throw new CatalogException(e.getMessage());
        }

        if (pageHash != null) {
            page = XmlRpcStructFactory.getProductPageFromXmlRpc(pageHash);
        }
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException

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.