Skip to content
This repository
Browse code

DS-1816 add missing DSO type to DRI (focus.containerType)

  • Loading branch information...
commit 340c8b12358d3fbaaffa7cb5b00f4de2cc9bbc56 1 parent d7df347
helix84 authored
11  dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/aspect/artifactbrowser/Navigation.java
@@ -211,13 +211,22 @@ public void addPageMeta(PageMeta pageMeta) throws SAXException,
211 211
         {
212 212
             if (dso instanceof Item)
213 213
             {
  214
+                pageMeta.addMetadata("focus","containerType").addContent("type:item");
214 215
                 pageMeta.addMetadata("focus","object").addContent("hdl:"+dso.getHandle());
215 216
                 this.getObjectManager().manageObject(dso);
216 217
                 dso = ((Item) dso).getOwningCollection();
217 218
             }
218 219
             
219  
-            if (dso instanceof Collection || dso instanceof Community)
  220
+            if (dso instanceof Collection)
  221
+            {
  222
+                pageMeta.addMetadata("focus","containerType").addContent("type:collection");
  223
+                pageMeta.addMetadata("focus","container").addContent("hdl:"+dso.getHandle());
  224
+                this.getObjectManager().manageObject(dso);
  225
+            }
  226
+            
  227
+            if (dso instanceof Community)
220 228
             {
  229
+                pageMeta.addMetadata("focus","containerType").addContent("type:community");
221 230
                 pageMeta.addMetadata("focus","container").addContent("hdl:"+dso.getHandle());
222 231
                 this.getObjectManager().manageObject(dso);
223 232
             }
13  dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/aspect/viewArtifacts/Navigation.java
@@ -135,13 +135,22 @@ public void addPageMeta(PageMeta pageMeta) throws SAXException,
135 135
         {
136 136
             if (dso instanceof Item)
137 137
             {
  138
+                pageMeta.addMetadata("focus","containerType").addContent("type:item");
138 139
                 pageMeta.addMetadata("focus","object").addContent("hdl:"+dso.getHandle());
139 140
                 this.getObjectManager().manageObject(dso);
140 141
                 dso = ((Item) dso).getOwningCollection();
141 142
             }
142  
-
143  
-            if (dso instanceof Collection || dso instanceof Community)
  143
+            
  144
+            if (dso instanceof Collection)
  145
+            {
  146
+                pageMeta.addMetadata("focus","containerType").addContent("type:collection");
  147
+                pageMeta.addMetadata("focus","container").addContent("hdl:"+dso.getHandle());
  148
+                this.getObjectManager().manageObject(dso);
  149
+            }
  150
+            
  151
+            if (dso instanceof Community)
144 152
             {
  153
+                pageMeta.addMetadata("focus","containerType").addContent("type:community");
145 154
                 pageMeta.addMetadata("focus","container").addContent("hdl:"+dso.getHandle());
146 155
                 this.getObjectManager().manageObject(dso);
147 156
             }

0 notes on commit 340c8b1

Please sign in to comment.
Something went wrong with that request. Please try again.