Examples of CrosswalkException


Examples of org.dspace.content.crosswalk.CrosswalkException

          
           // Handles can be either items or containers.
           if (dso instanceof Item)
             return (Item)dso;
           else
             throw new CrosswalkException("ORE dissemination only available for DSpace Items.");
         }
         else if (internal != null)
         {
          // Internal identifier, format: "type:id".
           String[] parts = internal.split(":");
          
           if (parts.length == 2)
           {
             String type = parts[0];
             int id = Integer.valueOf(parts[1]);
            
             if ("item".equals(type))
             {
               Item item = Item.find(context,id);
               return item;
             }
             else
                 throw new CrosswalkException("ORE dissemination only available for DSpace Items.");
            
           }
         }
     return null;
  }
View Full Code Here

Examples of org.dspace.content.crosswalk.CrosswalkException

             {
                 return (Item) dso;
             }
           else
             {
                 throw new CrosswalkException("ORE dissemination only available for DSpace Items.");
             }
         }
         else if (internal != null)
         {
          // Internal identifier, format: "type:id".
           String[] parts = internal.split(":");
          
           if (parts.length == 2)
           {
             String type = parts[0];
             int id = Integer.valueOf(parts[1]);
            
             if ("item".equals(type))
             {
                     return Item.find(context,id);
             }
             else
                 {
                     throw new CrosswalkException("ORE dissemination only available for DSpace Items.");
                 }
            
           }
         }
     return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.