Package gr.ekt.bte.core

Examples of gr.ekt.bte.core.Record


            Element xmlRoot = inDoc.getDocumentElement();
            Element queryResult = XMLUtils.getSingleElement(xmlRoot, "query_result");
            Element body        = XMLUtils.getSingleElement(queryResult, "body");
            Element dataRoot    = XMLUtils.getSingleElement(body, "query");
            Record record = CrossRefUtils.convertCrossRefDomToRecord(dataRoot);
            recordSet.addRecord(convertFields(record));

        }
        catch (FileNotFoundException e)
        {
View Full Code Here


    // Methods
    public void merge(String formName, Item item, Record record)
    {

        Record itemLookup = record;

        Set<String> addedMetadata = new HashSet<String>();
        for (String field : itemLookup.getFields())
        {
            String metadata = getMetadata(formName, itemLookup, field);
            if (StringUtils.isBlank(metadata))
            {
                continue;
            }
            if (item.getMetadataByMetadataString(metadata).length == 0
                    || addedMetadata.contains(metadata))
            {
                addedMetadata.add(metadata);
                String[] md = splitMetadata(metadata);
                if (isValidMetadata(formName, md))
                { // if in extra metadata or in the spefific form
                    List<Value> values = itemLookup.getValues(field);
                    if (values != null && values.size() > 0)
                    {
                        if (isRepeatableMetadata(formName, md))
                        { // if metadata is repeatable in form
                            for (Value value : values)
View Full Code Here

    private Map<String, Object> getDetails(ItemSubmissionLookupDTO item,
            Context context)
    {
        List<String> fieldOrder = getFieldOrder();
        Record totalData = item.getTotalPublication(service.getProviders());
        Set<String> availableFields = totalData.getFields();
        List<String[]> fieldsLabels = new ArrayList<String[]>();
        for (String f : fieldOrder)
        {
            if (availableFields.contains(f))
            {
                try
                {
                  if (totalData.getValues(f)!=null && totalData.getValues(f).size()>0)
                    fieldsLabels.add(new String[] {f, I18nUtil.getMessage("jsp.submission-lookup.detail."+ f, context) });
                }
                catch (MissingResourceException e)
                {
                    fieldsLabels.add(new String[] { f, f });
                }
            }
        }
        Map<String, Object> data = new HashMap<String, Object>();
        String uuid = item.getUUID();

        Record pub = item.getTotalPublication(service.getProviders());
        Map<String, List<String>> publication1 = new HashMap<String, List<String>>();
        for (String field : pub.getFields())
        {
            publication1
                    .put(field, SubmissionLookupUtils.getValues(pub, field));
        }
View Full Code Here

        if (result != null && result.size() > 0)
        {
            for (ItemSubmissionLookupDTO item : result)
            {
                String uuid = item.getUUID();
                Record pub = item.getTotalPublication(service.getProviders());
                Map<String, Object> data = new HashMap<String, Object>();
                data.put("uuid", uuid);
                data.put("providers", item.getProviders());
                data.put("title",
                        SubmissionLookupUtils.getFirstValue(pub, "title"));
                data.put(
                        "authors",
                        pub.getValues("authors") != null ? StringUtils.join(
                                SubmissionLookupUtils.getValues(pub, "authors")
                                        .iterator(), ", ") : "");
                data.put("issued",
                        SubmissionLookupUtils.getFirstValue(pub, "issued"));
View Full Code Here

TOP

Related Classes of gr.ekt.bte.core.Record

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.