Author: deepal
Date: Thu Feb  7 21:18:30 2008
New Revision: 13416

Log:

fixing app to support /;atom:mytag

Modified:
   
trunk/registry/modules/core/src/main/java/org/wso2/registry/app/AtomRegistry.java

Modified: 
trunk/registry/modules/core/src/main/java/org/wso2/registry/app/AtomRegistry.java
==============================================================================
--- 
trunk/registry/modules/core/src/main/java/org/wso2/registry/app/AtomRegistry.java
   (original)
+++ 
trunk/registry/modules/core/src/main/java/org/wso2/registry/app/AtomRegistry.java
   Thu Feb  7 21:18:30 2008
@@ -346,8 +346,9 @@
             // seems like some we need to do some filtering
             //Checking whether the parameter is there in the operation , like 
tags:foo
             String parameter = null;
+            String parts[] = null;
             if (operation.indexOf(":") > 0) {
-                String parts[] = operation.split("\\:");
+                parts = operation.split("\\:");
                 parameter = parts[1];
                 operation = parts[0];
             }
@@ -377,11 +378,15 @@
                     feed = getFeedForTags(abdera, resourcePath, baseURI, 
request);
                 } else {
                     try {
-                        resource = getSecureRegistry(request).get(entry_id);
+                        if(parts.length==2){
+                            feed = 
getFeedForTagPaths(abdera,parameter,baseURI,request);
+                        } else {
+                            resource = 
getSecureRegistry(request).get(entry_id);
+                            feed = populateFeed(abdera, baseURI, entry_id, 
resource, false);
+                        }
                     } catch (RegistryException e) {
                         return new StringResponseContext(abdera, e, 500);
                     }
-                    feed = populateFeed(abdera, baseURI, entry_id, resource, 
false);
                 }
 
             } else if (PARAMETER_AVERAGE_RATINGS.equals(operation)) {
@@ -861,7 +866,7 @@
             TaggedResourcePath tagpaths[] = 
getSecureRegistry(request).getResourcePathsWithTag(tag);
             feed.setId("http://wso2.org/jdbcregistry/TagPaths";);
             feed.setUpdated(new Date());
-            feed.setTitle("TagPaths for" + tag);
+            feed.setTitle("Resource path for " + tag);
             for (TaggedResourcePath tagPath : tagpaths) {
                 Entry entry = abdera.getFactory().newEntry();
                 String path = tagPath.getResourcePath();
@@ -883,6 +888,7 @@
                                                            
PropertyExtensionFactory.TAG);
 //                entry.addSimpleExtension(new QName("tagCounts"), "" + 
tagPath.getTagCount())
                 entry.addLink(baseUri + "atom" + path, "path");
+                entry.addLink(baseUri + "atom" + path);
                 feed.addEntry(entry);
             }
             return feed;

_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev

Reply via email to