Package aQute.bnd.osgi.resource

Examples of aQute.bnd.osgi.resource.FilterParser$BundleExpression


     * @param req
     *            The requirement searched
     * @return a query string where p: is for package and bsn: is for bundle symbolic name.
     */
    public static String requirementToUrl(Requirement req) throws IOException {
        FilterParser fp = new FilterParser();
        Expression expression = fp.parse(req);

        String s = expression.query();

        return "http://jpm4j.org/#!/search?q=" + URLEncoder.encode(s, "UTF-8");
    }
View Full Code Here


                    String category = FilterParser.namespaceToCategory(namespace);
                    if (category != null && category.length() > 0)
                        label.append(category + ": ", StyledString.QUALIFIER_STYLER);
                }

                FilterParser fp = new FilterParser();
                String filterStr = requirement.getDirectives().get("filter");
                if (filterStr == null) {
                    label.append("<no filter>", UIConstants.ERROR_STYLER);
                } else {
                    Expression exp = fp.parse(filter);
                    if (exp instanceof WithRangeExpression) {
                        label.append(((WithRangeExpression) exp).printExcludingRange(), UIConstants.BOLD_STYLER);
                        RangeExpression range = ((WithRangeExpression) exp).getRangeExpression();
                        if (range != null)
                            label.append(" ").append(formatRangeString(range), StyledString.COUNTER_STYLER);
View Full Code Here

TOP

Related Classes of aQute.bnd.osgi.resource.FilterParser$BundleExpression

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.