Author: deepal
Date: Sun Dec 23 08:37:45 2007
New Revision: 11695

Log:

Code clean up and fixing some typos 
- I think we should need to write some more comments   :)

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/RemoteRegistry.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
   Sun Dec 23 08:37:45 2007
@@ -60,11 +60,11 @@
     }
 
     /**
-     * To post an entry we can use  this method , howevere when it come to 
regitry posting means
+     * To post an entry we can use  this method , however when it come to 
registry posting means
      * adding new resources , adding comments , adding tags , rating etc..
      * <p/>
-     * Depending on the type of the operation url will change , and the url 
will contaim opertaion
-     * as "/reoures;operation" ,the entry value differ one to another
+     * Depending on the type of the operation URl will change , and the URL 
will contain operation
+     * as "/resource;operation" ,the entry value differ one to another
      *
      * @param request : RequestContext
      * @return EmptyResponseContext(200) if everything has gone well else 
EmptyResponseContext(500)
@@ -77,7 +77,7 @@
             Document<Entry> entry_doc = 
(Document<Entry>)request.getDocument(parser).clone();
             if (entry_doc != null) {
                 if ("".equals(entry_id)) {
-                    //seems like path is emtry , what we should do in this case
+                    //seems like path is empty , what we should do in this case
                 } else {
                     String values[] = splitPath(entry_id);
                     if (values.length > 1) {
@@ -122,7 +122,7 @@
                         
resource.setAuthorUserName(entry.getAuthor().getName());
                         resource.setDescription(entry.getSummary());
                         if (attValue != null && "true".equals(attValue)) {
-                            // Directoy
+                            // Directory
                             resource.setDirectory(true);
                         } else {
                             // Resource
@@ -174,8 +174,8 @@
     }
 
     /**
-     * This method is used for PUT operation and depending on the URL opertion 
will be identify and
-     * perform that, not only that depending on the operation the strcuture of 
entry may vary
+     * This method is used for PUT operation and depending on the URL 
operation will be identify and
+     * perform that, not only that depending on the operation the structure of 
entry may vary
      *
      * @param request : RequestContext
      * @return : EmptyResponseContext(200) if everything has gone well else
@@ -229,7 +229,7 @@
 
 
     /**
-     * This method used to get an atom feed representing the regsitry and the 
depending on the url
+     * This method used to get an atom feed representing the registry and the 
depending on the URL
      * the format of the feed will differ
      *
      * @param request : RequestContext
@@ -266,7 +266,7 @@
                 operation = parts[0];
             }
             if (RegistryConstants.PARAMETER_VERSION.equals(operation)) {
-                // Need to retuen list of version for the given resource , 
[resourcePath]
+                // Need to return list of version for the given resource , 
[resourcePath]
                 try {
                     String[] versions = registry.getVersions(resourcePath);
                     Factory factory = abdera.getFactory();
@@ -289,7 +289,7 @@
                 if (parameter == null) {
                     feed = getFeedForTags(abdera, resourcePath, baseURI);
                 } else {
-                    // Need to return only the tags which are doen by given 
user
+                    // Need to return only the tags which are done by given 
user
                     // TODO registry need to provide this feature
                 }
 
@@ -317,7 +317,7 @@
                 }
             } else if (RegistryConstants.PARAMETER_QUERY.equals(operation)) {
                 try {
-                    // Trying to excute a query for a given path for a given 
paramater
+                    // Trying to execute a query for a given path for a given 
paramater
                     String parms = request.getHeader("parameters");
                     String[] parameters =
                             RemoteRegistry.decodeParametesAsString(parms);
@@ -362,21 +362,21 @@
 
     /**
      * This method will serialized Resource for the given path into a Atom 
feed. If the resource is
-     * a directory , then there will be mutiple entry inside that representing 
the child nodes. Here
+     * a directory , then there will be multiple entry inside that 
representing the child nodes. Here
      * there will be special simpleExtension to represent called "directory" 
and the value would be
      * "true"
      * <p/>
-     * If the return resource is a resource which contains commenet then the 
same thing will happen
+     * If the return resource is a resource which contains comment then the 
same thing will happen
      * <p/>
      * if the resource is actual resource then there will be one entry inside 
the feed and that
-     * entery will have the content of the resource as byte array and when 
serialize , which will
+     * entry will have the content of the resource as byte array and when 
serialize , which will
      * become base64 , if the content is String then that will appear as it is.
      *
      * @param abdera       : Reference to Abdera object
      * @param baseURI      : BaseURI of the registry
      * @param path         : resource path
      * @param resource     : Resource object that we need to generate feed
-     * @param exceuteQuery : To indicate whether the method call is for query 
exceute result or
+     * @param exceuteQuery : To indicate whether the method call is for query 
execute result or
      *                     something else
      * @return Feed : which represent the atom feed of the resource.
      */
@@ -396,7 +396,7 @@
                 feed.setAttributeValue(key, (String)properties.get(key));
             }
         }
-        //if the resourse is deleted then there will be comment saying that 
the resource is
+        //if the resource is deleted then there will be comment saying that 
the resource is
         // deleted
         if (resource.getState() == RegistryConstants.DELETED_STATE) {
             feed.addSimpleExtension(new QName("state"), "Deleted");
@@ -475,7 +475,7 @@
      * This will create incomplete entry for a given String array
      *
      * @param values  : String array
-     * @param baseURI : Base URI of the regsitry
+     * @param baseURI : Base URI of the registry
      * @param abdera  : Instance of Abdera object
      * @param rel     : The rel value
      * @param feed    : Feed object where we need to add the created entry
@@ -554,7 +554,7 @@
     }
 
     /**
-     * This method will return the path by romving the atom and the base uri 
from it , For example
+     * This method will return the path by removing the atom and the base URL 
from it , For example
      * if the path is "localhost:8080/wso2registry/atom/r2" , then the method 
will return "/r2"
      *
      * @param request : RequestContext
@@ -571,7 +571,7 @@
      * This method will split the path into two part by the path separator , 
here the path separator
      * is ";" if the path is r1;rate , then the return array would contains r1 
and rate
      *
-     * @param path : url path
+     * @param path : URL path
      * @return String array of the splited string
      */
     private String[] splitPath(String path) {
@@ -592,11 +592,11 @@
     }
 
     /**
-     * This will generate Feed element represnting all the tags for the given 
path Title of the
+     * This will generate Feed element representing all the tags for the given 
path Title of the
      * entry will be the tag name and the there will be an extension element 
called "taggings" to
      * represent the tag count
      *
-     * @param abdera  : Instance of Abdera objcet
+     * @param abdera  : Instance of Abdera object
      * @param path    : Path of which need to get the tags
      * @param baseUri : Base URI of the registry
      * @return : Feed object which contains the tags
@@ -635,7 +635,7 @@
      *
      * @param abdera  : Abdera instance
      * @param path    : Resource path
-     * @param baseUri : Base URI of the regsitry
+     * @param baseUri : Base URI of the registry
      * @return Feed representing the average feed
      */
     private Feed getRatingsFeed(Abdera abdera, String path, String baseUri) {
@@ -658,10 +658,10 @@
     }
 
     /**
-     * This method will create a feed elemenet to representing rating value 
for a given path by
+     * This method will create a feed element to representing rating value for 
a given path by
      * given user. The rating value will be there in the text of the feed
      *
-     * @param abdera   : An instance of Abder
+     * @param abdera   : An instance of Abdera
      * @param path     : Resource path
      * @param userName : user name
      * @return : Created feed
@@ -681,11 +681,11 @@
     }
 
     /**
-     * To get the collection of comments for a given path a feed element will 
be generted with a set
+     * To get the collection of comments for a given path a feed element will 
be generated with a set
      * of entry . And each entry will represent - commented Author - Commented 
Time - And the
-     * conent
+     * content
      *
-     * @param abdera : An instance of Abder
+     * @param abdera : An instance of Abdera
      * @param path   : Resource path
      * @return : created Feed object
      */
@@ -713,10 +713,10 @@
 
     /**
      * To get the the resource paths for a given tag , we can use this method. 
And the method will
-     * generate Feed containig entries , where each represent one resource 
path.
+     * generate Feed containing entries , where each represent one resource 
path.
      * <p/>
      * Link with the path will represent the path and the and the tag count 
will be represent using
-     * an extention element called "taggings"
+     * an extension element called "taggings"
      *
      * @param abdera  : An instance of Abdera
      * @param tag     : Nam of the tag
@@ -767,9 +767,9 @@
     }
 
     /**
-     * Will creat a feed element for user asked logs , there will be separate 
entry for log and each
+     * Will create a feed element for user asked logs , there will be separate 
entry for log and each
      * entry will contain - edited date : Log date - content : log action data 
- Author : Log author
-     * - Extenion element for action - Extension element for path
+     * - Extension element for action - Extension element for path
      *
      * @param abdera : An instance of an Abdera
      * @param path   : Resource path

Modified: 
trunk/registry/modules/core/src/main/java/org/wso2/registry/app/RemoteRegistry.java
==============================================================================
--- 
trunk/registry/modules/core/src/main/java/org/wso2/registry/app/RemoteRegistry.java
 (original)
+++ 
trunk/registry/modules/core/src/main/java/org/wso2/registry/app/RemoteRegistry.java
 Sun Dec 23 08:37:45 2007
@@ -49,7 +49,7 @@
      * To create a remote registry need to provide a URL of a remote registry 
and the URL should be
      * something like http://localhost:8080/wso2registry/atom/r1
      *
-     * @param registryURL : URL to the registry ror to the resource
+     * @param registryURL : URL to the registry or to the resource
      * @throws RegistryException : If something went wrong
      */
     public RemoteRegistry(URL registryURL) throws RegistryException {
@@ -74,13 +74,13 @@
     }
 
     /**
-     * This method will generate a resource objcet representing the Feed object
-     * and the logic will be simply the reverse of the cretae feed of the Atom
+     * This method will generate a resource object representing the Feed object
+     * and the logic will be simply the reverse of the create feed of the Atom
      * registry
      *
-     * @param feed    : Feed objcet which represent a resource object
-     * @param isQuery : To tell whether we are going to exceute a query of 
trying to
-     *                just get a resorce
+     * @param feed    : Feed object which represent a resource object
+     * @param isQuery : To tell whether we are going to execute a query of 
trying to
+     *                just get a resource
      * @return : Created resource
      */
     private Resource createResourceFromFeed(Feed feed, boolean isQuery) {
@@ -481,7 +481,7 @@
     }
 
     /**
-     * This method can be used to export a local file system into a runing 
instanse of a registry.
+     * This method can be used to export a local file system into a running 
instance of a registry.
      * Need to create a file object representing the local file and the need 
to tell where to add
      * the resource in the registry.
      *
@@ -501,9 +501,9 @@
     }
 
     /**
-     * This method can be used to export registry instance or node in a 
regsitry to a local file
-     * system. When we call this method a file srcuture will be created to 
match the structure to
-     * map the strcuture in the registry
+     * This method can be used to export registry instance or node in a 
registry to a local file
+     * system. When we call this method a file structure will be created to 
match the structure to
+     * map the structure in the registry
      *
      * @param toFile : File in the local file system
      * @param path   : To which node export

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

Reply via email to