Package org.fcrepo.server.types.gen

Examples of org.fcrepo.server.types.gen.FieldSearchQuery


            String[] displayFields = new String[fields.size()];
            ObjectFactory factory = new ObjectFactory();
            for (int i = 0; i < fields.size(); i++) {
                displayFields[i] = (String) fields.get(i);
            }
            FieldSearchQuery query = new FieldSearchQuery();
            if (m_tabbedPane.getSelectedIndex() == 0) {
                query.setTerms(factory.createFieldSearchQueryTerms(m_simpleQueryField.getText()));
            } else {
                List<Condition> conditions = m_model.getConditions();
                Condition[] cond = new Condition[conditions.size()];
                for (int i = 0; i < conditions.size(); i++) {
                    cond[i] = conditions.get(i);
                }
                FieldSearchQuery.Conditions conds = new FieldSearchQuery.Conditions();
                conds.getCondition().addAll(conditions);
                query.setConditions(factory.createFieldSearchQueryConditions(conds));
            }
            ResultFrame frame =
                    new ResultFrame("Search Results", displayFields, 100, query);
            frame.setVisible(true);
            Administrator.getDesktop().add(frame);
View Full Code Here


    }

    public static Map getServiceLabelMap() throws IOException {
        try {
            HashMap<String, String> labelMap = new HashMap<String, String>();
            FieldSearchQuery query = new FieldSearchQuery();
            FieldSearchQuery.Conditions conds =
                    new FieldSearchQuery.Conditions();
            Condition condition = new Condition();
            condition = new Condition();
            condition.setProperty("fType");
            condition.setOperator(ComparisonOperator.fromValue("eq"));
            condition.setValue("D");
            conds.getCondition().add(condition);
            ObjectFactory factory = new ObjectFactory();
            query.setConditions(factory.createFieldSearchQueryConditions(conds));
            String[] fields = new String[] {"pid", "label"};

            if (true) {
                /* FIXME: find some other way to do this */
                throw new UnsupportedOperationException("This operation uses obsolete field search semantics");
View Full Code Here

     *         If an error occurs in retrieving the list of labels.
     */
    public static Map getDeploymentLabelMap(String sDefPID) throws IOException {
        try {
            HashMap<String, String> labelMap = new HashMap<String, String>();
            FieldSearchQuery query = new FieldSearchQuery();
            Condition[] conditions = new Condition[2];
            conditions[0] = new Condition();
            conditions[0].setProperty("fType");
            conditions[0].setOperator(ComparisonOperator.fromValue("eq"));
            conditions[0].setValue("M");
            conditions[1] = new Condition();
            conditions[1].setProperty("bDef");
            conditions[1].setOperator(ComparisonOperator.fromValue("has"));
            conditions[1].setValue(sDefPID);
            FieldSearchQuery.Conditions conds = new FieldSearchQuery.Conditions();
            conds.getCondition().addAll(Arrays.asList(conditions));
            ObjectFactory factory = new ObjectFactory();
            query.setConditions(factory.createFieldSearchQueryConditions(conds));
            String[] fields = new String[] {"pid", "label"};

            if (true) {
                /*
                 * FIXME: find some other way to do this, if we care. It uses
View Full Code Here

TOP

Related Classes of org.fcrepo.server.types.gen.FieldSearchQuery

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.