Package org.dspace.content.crosswalk

Examples of org.dspace.content.crosswalk.IConverter


            if (itemMetadata != null && itemMetadata.size() > 0)
            {
                for (String mdString : itemMetadata)
                {
                    String converterName = null;
                    IConverter converter = null;
                    Matcher converterMatcher = converterPattern.matcher(mdString);
                    if (converterMatcher.matches())
                    {
                        converterName = converterMatcher.group(1);
                        converter = (IConverter) PluginManager.getNamedPlugin(
                                IConverter.class, converterName);
                        if (converter == null)
                        {
                            log.warn(LogManager.getHeader(null,
                                    "createMetadata",
                                    "no converter plugin found with name "
                                            + converterName + " for metadata "
                                            + mdString));
                        }
                    }

                    DCValue[] dcValues;
                    if (converterName != null)
                    {
                        dcValues = item.getMetadata(mdString.replaceAll("\\("
                                + converterName + "\\)", ""));
                    }
                    else
                    {
                        dcValues = item.getMetadata(mdString);
                    }

                    try
                    {
                    for (DCValue dcValue : dcValues)
                    {
                            if (!MetadataExposure.isHidden(((HarvestedItemInfo) nativeItem).context,
                                                          dcValue.schema, dcValue.element, dcValue.qualifier))
                            {
                        String value;
                        if (converter != null)
                        {
                            value = converter.makeConversion(dcValue.value);
                        }
                        else
                        {
                            value = dcValue.value;
                        }
View Full Code Here

TOP

Related Classes of org.dspace.content.crosswalk.IConverter

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.