Hi

I believe I am not the only oene in the community using a handle prefix like 2010.1(not an Integer), so I am submitting a simple patch that fixes this problem.

  thanks

  Paulo Jobim
Index: 
/Users/paulo/workspace/trunk/dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/cocoon/DSpaceMETSGenerator.java
===================================================================
--- 
/Users/paulo/workspace/trunk/dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/cocoon/DSpaceMETSGenerator.java
       (revision 4695)
+++ 
/Users/paulo/workspace/trunk/dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/cocoon/DSpaceMETSGenerator.java
       (working copy)
@@ -180,6 +180,8 @@
          {
                // Internal identifier, format: "type:id".
                String[] parts = internal.split(":");
+               int id =0;
+               String strid = null;
                
                if (parts.length == 2)
                {
@@ -184,7 +186,9 @@
                if (parts.length == 2)
                {
                        String type = parts[0];
-                       int id = Integer.valueOf(parts[1]);
+                       if (!"repository".equals(type))
+                       id = Integer.valueOf(parts[1]);
+                       else strid = parts[1];
                        
                        if ("item".equals(type))
                        {
@@ -206,7 +210,7 @@
                        }
                        else if ("repository".equals(type))
                        {
-                               if 
(ConfigurationManager.getProperty("handle.prefix").equals(String.valueOf(id)))
+                               if 
(ConfigurationManager.getProperty("handle.prefix").equals(strid))
                         adapter = new RepositoryAdapter(context,contextPath);
                        }
                        
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to