Package org.dspace.content.authority

Examples of org.dspace.content.authority.Choices


                        if (cmgr.isChoicesConfigured(fieldKey) &&
                            Params.PRESENTATION_SELECT.equals(cmgr.getPresentation(fieldKey)))
                        {
                            Select mdSelect = mdCell.addSelect("value_"+index);
                            mdSelect.setSize(1);
                            Choices cs = cmgr.getMatches(fieldKey, value.value, collectionID, 0, 0, null);
                            if (cs.defaultSelected < 0)
                                mdSelect.addOption(true, value.value, value.value);
                            for (int i = 0; i < cs.values.length; ++i)
                            {
                                mdSelect.addOption(i == cs.defaultSelected, cs.values[i].value, cs.values[i].label);
View Full Code Here


        // localization
        String locale = parameters.getParameter("locale",null);
        log.debug("AJAX menu generator: field="+field+", query="+query+", start="+sstart+", limit="+slimit+", format="+format+", field="+field+", query="+query+", start="+sstart+", limit="+slimit+", format="+format+", locale = "+locale);

        Choices result = ChoiceAuthorityManager.getManager().getMatches(field, query, collection, start, limit, locale, true);

        log.debug("Result count = "+result.values.length+", default="+result.defaultSelected);

        ChoicesXMLGenerator.generate(result, format, contentHandler);
    }
View Full Code Here

            addMetadata(schema, element, qualifier, lang, values, null, null);
        }
    }

    protected void getAuthoritiesAndConfidences(String fieldKey, String[] values, String[] authorities, int[] confidences, int i) {
        Choices c = ChoiceAuthorityManager.getManager().getBestMatch(fieldKey, values[i], -1, null);
        authorities[i] = c.values.length > 0 ? c.values[0].authority : null;
        confidences[i] = c.confidence;
    }
View Full Code Here

        return new ItemIterator(context, rows);
    }

    @Override
    protected void getAuthoritiesAndConfidences(String fieldKey, String[] values, String[] authorities, int[] confidences, int i) {
        Choices c = ChoiceAuthorityManager.getManager().getBestMatch(fieldKey, values[i], getOwningCollectionID(), null);
        authorities[i] = c.values.length > 0 ? c.values[0].authority : null;
        confidences[i] = c.confidence;
    }
View Full Code Here

        String format = request.getParameter("format");
        int collection = UIUtil.getIntParameter(request, "collection");
        int start = UIUtil.getIntParameter(request, "start");
        int limit = UIUtil.getIntParameter(request, "limit");

        Choices result = cam.getMatches(field, query, collection, start, limit, null);
//        Choice[] testValues = {
//            new Choice("rp0001", "VALUE1","TEST LABEL1"),
//            new Choice("rp0002", "VALUE2","TEST LABEL2"),
//            new Choice("rp0003", "VALUE3","TEST LABEL3"),
//            new Choice("rp0004", "VALUE COGN, LABEL1","TEST COGN, LABEL1"),
View Full Code Here

                if (readonly)
                {
                    select.setDisabled();
                }

                Choices cs = ChoiceAuthorityManager.getManager().getMatches(fieldKey, "", coll.getID(), 0, 0, null);
                if (dcValues.length == 0)
                {
                    select.addOption(true, "", "");
                }
                for (Choice c : cs.values)
View Full Code Here

                        if (cmgr.isChoicesConfigured(fieldKey) &&
                            Params.PRESENTATION_SELECT.equals(cmgr.getPresentation(fieldKey)))
                        {
                            Select mdSelect = mdCell.addSelect("value_"+index);
                            mdSelect.setSize(1);
                            Choices cs = cmgr.getMatches(fieldKey, value.value, collectionID, 0, 0, null);
                            if (cs.defaultSelected < 0)
                            {
                                mdSelect.addOption(true, value.value, value.value);
                            }
                            for (int i = 0; i < cs.values.length; ++i)
View Full Code Here

TOP

Related Classes of org.dspace.content.authority.Choices

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.