Package org.dspace.xoai.filter.results

Examples of org.dspace.xoai.filter.results.SolrFilterResult


        return new DatabaseFilterResult("("+leftResult.getQuery()+") AND ("+ rightResult.getQuery() +")", param);
    }

    @Override
    public SolrFilterResult buildSolrQuery() {
        return new SolrFilterResult("("+left.buildSolrQuery().getQuery()+") AND ("+right.buildSolrQuery().getQuery()+")");
    }
View Full Code Here


            if (i < fields.size() - 1)
                cond.append(" OR ");
        }
        cond.append(")");

        return new SolrFilterResult(cond.toString());
    }
View Full Code Here

        return new DatabaseFilterResult("NOT ("+result.getQuery()+")", result.getParameters());
    }

    @Override
    public SolrFilterResult buildSolrQuery() {
        return new SolrFilterResult("NOT("+inFilter.buildSolrQuery()+")");
    }
View Full Code Here

        return new DatabaseFilterResult("("+leftResult.getQuery()+") OR ("+ rightResult.getQuery() +")", param);
    }

    @Override
    public SolrFilterResult buildSolrQuery() {
        return new SolrFilterResult("("+left.buildSolrQuery()+") OR ("+right.buildSolrQuery()+")");
    }
View Full Code Here

    }

    @Override
    public String buildSolrQuery(Scope scope, Condition condition) {
        DSpaceFilter filter = getFilter(condition);
        SolrFilterResult result = filter.buildSolrQuery();
        if (result.hasResult())
        {
            if (scope == MetadataFormat)
                return "(item.deleted:true OR ("
                        + result.getQuery() + "))";
            else
                return "(" + result.getQuery() + ")";
        }
        return "true";
    }
View Full Code Here

        if (this.getField() != null) {
            for (String v : this.getValues())
                this.buildQuery("metadata." + field,
                        ClientUtils.escapeQueryChars(v), parts);
            if (parts.size() > 0) {
                return new SolrFilterResult(StringUtils.join(parts.iterator(),
                        " OR "));
            }
        }
        return new SolrFilterResult();
    }
View Full Code Here

    @Override
    public SolrFilterResult buildSolrQuery()
    {
        String format = dateProvider.format(date).replace("Z", ".999Z"); // Tweak to set the millisecon
        return new SolrFilterResult("item.lastmodified:[* TO "
                + ClientUtils.escapeQueryChars(format) + "]");
    }
View Full Code Here

    }

    @Override
    public SolrFilterResult buildSolrQuery()
    {
        return new SolrFilterResult("item.public:true");
    }
View Full Code Here

    @Override
    public SolrFilterResult buildSolrQuery()
    {
        String format = dateProvider.format(date).replace("Z", ".000Z"); // Tweak to set the milliseconds
        return new SolrFilterResult("item.lastmodified:["
                + ClientUtils.escapeQueryChars(format)
                + " TO *]");
    }
View Full Code Here

    {
        if (setSpec.startsWith("col_"))
        {
            try
            {
                return new SolrFilterResult("item.collections:"
                        + ClientUtils.escapeQueryChars(setSpec));
            }
            catch (Exception ex)
            {
                log.error(ex.getMessage(), ex);
            }
        }
        else if (setSpec.startsWith("com_"))
        {
            try
            {
                return new SolrFilterResult("item.communities:"
                        + ClientUtils.escapeQueryChars(setSpec));
            }
            catch (Exception e)
            {
                log.error(e.getMessage(), e);
            }
        }
        return new SolrFilterResult();
    }
View Full Code Here

TOP

Related Classes of org.dspace.xoai.filter.results.SolrFilterResult

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.