Index: /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/MatchMode.java
===================================================================
--- /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/MatchMode.java	(revision 6041)
+++ /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/MatchMode.java	(revision 6042)
@@ -19,5 +19,6 @@
 
 /**
- *
+ * Represents four relations of a string X (e.g a target-source's link) to a string Y (e.g an input string fragment);
+ * for instance X STARTS_WITH Y.
  * @author olhsha
  */
Index: /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/MyResource.java
===================================================================
--- /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/MyResource.java	(revision 6041)
+++ /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/MyResource.java	(revision 6042)
@@ -23,5 +23,5 @@
 import javax.ws.rs.Produces;
 
-/** Example reTarget class hosted at the URI path "/myreTarget"
+/** Example resource class hosted at the URI path "/myresource"
  */
 @Path("/myresource")
Index: /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/Resource.java
===================================================================
--- /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/Resource.java	(revision 6041)
+++ /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/Resource.java	(revision 6042)
@@ -19,5 +19,5 @@
 
 /**
- *
+ * Represents five kinds of DASISH resources: a principal, an annotation, a target, a cached representation and a notebook.
  * @author olhsha
  */
Index: /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/AnnotationDao.java
===================================================================
--- /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/AnnotationDao.java	(revision 6041)
+++ /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/AnnotationDao.java	(revision 6042)
@@ -28,7 +28,5 @@
 
 /**
- * Created on : Jun 27, 2013, 10:34:13 AM
- *
- * @author Peter Withers <peter.withers@mpi.nl>
+ * @author olhsha@mpi.nl
  */
 
@@ -57,7 +55,7 @@
      * 
      * @param annotationID the internal (database) identifier of an annotation.
-     * @return the {@link Annotation} object whose fields are filled in partially, 
+     * @return the {@link Annotation} object whose fields are filled partially, 
      * only with the information accessible from the table "annotation". 
-     * Constructing a complete {@link Annotation} object is done in the implementation of {@link DBDispatchter}.)
+     * Constructing a complete {@link Annotation} object is done in the implementation of {@link DBDispatcher}.
      */
     public Annotation getAnnotationWithoutTargetsAndPemissionList(Number annotationID);
@@ -66,9 +64,9 @@
      * 
      * @param ownerID the owner of annotations we search for; if null then the owner may be any.
-     * @param text the text fragment which must occur in an annotation-body; if null, the now requirements on the annotation body.
+     * @param text the text fragment which must occur in an annotation-body; if null, then no requirements on the annotation body.
      * @param namespace (search on the parameter is not implemented).
      * @param after the earliest time of creating/last-update of annotations; if null then search "from the beginning of time".
      * @param before the latest time of creating/last-update of annotations; if null then search "till now".
-     * @return the list of annotation internal database identifiers that satisfy the criteria defined by the parameters.
+     * @return the list of the internal database identifiers of the annotations that satisfy the criteria defined by the parameters.
      */ 
     public List<Number> getFilteredAnnotationIDs(Number ownerID, String text, String namespace, String after, String before);
@@ -76,16 +74,16 @@
     /**
      * 
-     * @param principalID the internal database ID of a principal (user or, in general, a group).
-     * @param acess access level (none, read, write, all).
-     * @return the list of internal (database) annotation identifiers to which "principalID" has access at least "acess".
-     * For instance, on access==write, the method should output id-s of the annotations to which user has "write" (update bodies), 
-     * or "all" access, according to the junction table "annotations-principals-acesses".
-     */
-    public List<Number> getAnnotationIDsPermissionAtLeast(Number principalID, Access acess);
-    
-    /**
-     * 
-     * @param access the value of public assess of an annotation.
-     * @return The list of internal (database identifiers to which public has at least "access" access;
+     * @param principalID the internal database ID of a principal (a user or, in general, a group).
+     * @param access an {@link Access} object representing an access level (none, read, write, all).
+     * @return the list of the internal (database) identifiers of annotations to which "principalID" has access at least "acess".
+     * For instance, if access' value is Access.WRITE, the method should output id-s of the annotations to which user has "write" (update bodies), 
+     * or "all" access, according to the junction table "annotations-principals-accesses".
+     */
+    public List<Number> getAnnotationIDsPermissionAtLeast(Number principalID, Access access);
+    
+    /**
+     * 
+     * @param access an {@link Access} object representing  the public assess level of an annotation.
+     * @return The list of the internal database identifiers of annotations for which "public" attribute has at least "access" access;
      * for instance on "write" the method should output annotations 
      * whose "public" value is "write" or "all".
@@ -97,6 +95,6 @@
     /**
      * 
-     * @return the list of the internal (database) annotation IDs of all the annotations; 
-     * used only by the developers and the admin in the debugging mode to access all the existing annotations.
+     * @return the list of the internal database identifiers of all the annotations, ordered by last-update, with the latest on top; 
+     * used only by developers and the admin in the debugging service to access all the existing annotations.
      */
     public List<Number> getAllAnnotationIDs();
@@ -104,8 +102,8 @@
     /**
      * 
-     * @param annotationIDs the list of internal annotationIDs.
+     * @param annotationIDs the list of internal database annotation identifiers.
      * @param offset the offset parameter for SELECT SQL request.
      * @param limit the limit parameter for SELECT SQL request.
-     * @param orderedBy criterion of ordering according to the SQL syntax (by some field).
+     * @param orderedBy a criterion of ordering according to the SQL syntax (by some field).
      * @param desc direction of ordering according to the SQL syntax.
      * @return the SELECT response on the given parameters: i.e. the list of annotationID's starting from offset and to limit,
@@ -115,8 +113,8 @@
     
      /**
-     * @param annotationIDs
-     * @return annotationInfo for the annotation with the internal annotationID: 
+     * @param annotationIDs the internal database identifier of an annotation.
+     * @return an {@link AnnotationInfo} object for the annotation with the internal annotationID: 
      * i.e. the information which you can take only from the "annotation" table
-     * and not the junction tables connecting the annotations to permissions and targets.
+     * and not from the junction tables connecting the annotations to permissions and targets.
      * 
      */
@@ -125,6 +123,6 @@
     /**
      * 
-     * @param annotationIDs
-     * @return list of target references where the i-th reference is constructed from the external 
+     * @param annotationIDs the list of the internal database annotation identifiers.
+     * @return the list of target h-references where the i-th reference is constructed from the external 
      * identifier of the annotation with the i-th internal identifier from the list.
      */
@@ -134,5 +132,5 @@
     /**
      * 
-     * @param annotationID
+     * @param annotationID the internal database identifier of an annotation.
      * @return the internal database ID of the owner of the annotation.
      */
@@ -141,6 +139,6 @@
     /**
      * 
-     * @param annotationID
-     * @param principalID
+     * @param annotationID the internal database identifier of an annotation.
+     * @param principalID the internal database identifier of a principal.
      * @return access of the principalID w.r.t. annotationID, or Access.NONE if the access is not given.
      */ 
@@ -149,6 +147,6 @@
     /**
      * 
-     * @param annotationID
-     * @param principalID
+     * @param annotationID the internal database identifier of an annotation.
+     * @param principalID the internal database identifier of a principal.
      * @return true if there is triple (annotationID, principalID, access) for some access
      * in the corresponding junction table; false otherwise.
@@ -158,5 +156,5 @@
     /**
      * 
-     * @param annotationID
+     * @param annotationID the internal database identifier of an annotation.
      * @return the value of the "public" field for annotationID; can be one of ACCESS values.
      */
@@ -166,6 +164,6 @@
     /**
      * 
-     * @param notebookID
-     * @return the list of annotationIDs of the annotations from the notebook with notebookID.
+     * @param notebookID the internal database identifier of a notebook.
+     * @return the list of internal database identifiers of the annotations from the notebook with notebookID.
      */
     public List<Number> getAnnotations(Number notebookID);
@@ -173,6 +171,6 @@
     /**
      * 
-     * @param targetID
-     * @return true if at least one annotation refers to this target; false otherwise.
+     * @param targetID the internal database identifier of a target.
+     * @return true if at least one annotation refers to the target with targetID; false otherwise.
      */
     public boolean targetIsInUse(Number targetID);
@@ -184,7 +182,7 @@
     /**
      * 
-     * @param annotationID
-     * @param targetID
-     * @return # updated rows in the joint table "annotations_targets".
+     * @param annotationID the internal database identifier of an annotation.
+     * @param targetID the internal database identifier of a target.
+     * @return # of updated rows in the junction table "annotations_targets".
      * Connects the annotation to its target by adding the pair (annotationID, targetID) 
      * to the junction table.
@@ -195,8 +193,8 @@
     /**
      * 
-     * @param annotationID
-     * @param principalID
-     * @param access
-     * @return # rows added to the table "annotations_principals_access".
+     * @param annotationID the internal database identifier of an annotation.
+     * @param principalID the internal database identifier of a principal.
+     * @param access the {@link Access} object representing an access level.
+     * @return # of rows added to the table "annotations_principals_accesses".
      * Sets the "access" for the "principalID" w.r.t. the annotation with "annotationID".
      */
@@ -207,8 +205,8 @@
     /**
      * 
-     * @param annotationthe the object to be added to the table "annotation".
-     * @param newOwnerID the ownerID,
+     * @param annotation the object to be added to the table "annotation".
+     * @param newOwnerID the ownerID.
      * @return the internal ID of the added annotation, if it is added, or throws NotInDataBaseException otherwise.
-     * @throws NotInDataBaseException if the request on the internal database annotation ID for the added annotation throws this exception.
+     * @throws NotInDataBaseException if the request for the internal database annotation ID for the added annotation throws this exception.
      */
     public Number addAnnotation(Annotation annotation, Number newOwnerID)  throws NotInDataBaseException;
@@ -222,5 +220,5 @@
     * @param text the new body text.
     * @param mimeType the new mime type.
-    * @param isXml if the new body is a text body or an xml.
+    * @param isXml true if the new body is an xml, and false if it is a text.
     * @return # of updated rows in the table "annotation".
     */
@@ -245,6 +243,6 @@
      * 
      * @param annotation the new annotation (including targets and permissions).
-     * @param annotationID the ID of the annotation to be updated.
-     * @param ownerID the Id of the new owner.
+     * @param annotationID the internal database ID of the annotation to be updated.
+     * @param ownerID the internal database Id of the new owner.
      * @return # of updated rows in "annotation" table after this FULL updating the annotation. Should return 1 if update  happens.
      */
@@ -254,8 +252,8 @@
      /**
      * 
-     * @param annotationID
-     * @param principalID
-     * @param access
-     * @return # rows updated to the table "annotations_principals_access".
+     * @param annotationID the internal database identifier of an annotation.
+     * @param principalID the internal database identifier of a principal.
+     * @param access a {@link Access} object representing an access level.
+     * @return # of rows updated in the table "annotations_principals_accesses".
      * Sets the "access" for the "principalID" w.r.t. the annotation with "annotationID".
      */
@@ -266,5 +264,5 @@
      * @param annotationID the internal database ID of the annotation to be updated.
      * @param access access level.
-     * @return # of updated rows in "annotation". should be "1" if updated and "0" otherwise.
+     * @return # of updated rows in "annotation". Should be "1" if updated and "0" otherwise.
      */
     public int updatePublicAccess(Number annotationID, Access access);
@@ -277,16 +275,16 @@
     /**
      * 
-     * @param annotationId
-     * @return # rows in the table "annotation". It should be "1" if the annotation with "annotationID" is successfully deleted, and "0" otherwise.
-     */
-    
-    
-   
-    public int deleteAnnotation(Number annotationId);
-    
-    /**
-     * 
-     * @param annotationId
-     * @return # removed rows in the table "annotations_target_Targets". 
+     * @param annotationID the internal database identifier of an annotation.
+     * @return # of deleted rows in the table "annotation". It should be "1" if the annotation with "annotationID" is successfully deleted, and "0" otherwise.
+     */
+    
+    
+   
+    public int deleteAnnotation(Number annotationID);
+    
+    /**
+     * 
+     * @param annotationID the internal database identifier of an annotation.
+     * @return # of removed rows in the table "annotations_targets". 
      */
     
@@ -296,6 +294,6 @@
    /**
     * 
-    * @param annotationID
-    * @return # removed rows in the table "annotations_principals_access".
+    * @param annotationID the internal database identifier of an annotation.
+    * @return # of removed rows in the table "annotations_principals_accesses".
     */
     public int deletePermissions(Number annotationID);
@@ -303,7 +301,7 @@
     /**
      * 
-     * @param annotationID
-     * @param principalID
-     * @return # removed rows in the table "annotations_principals_access". 
+     * @param annotationID the internal database identifier of an annotation.
+     * @param principalID the internal database identifier of a principal.
+     * @return # removed rows in the table "annotations_principals_accesses". 
      * Should be "1" is removed and "0" otherwise.
      */
@@ -312,6 +310,6 @@
     /**
      * 
-     * @param annotationID
-     * @return # removed rows in the table "notebookds_annotations".
+     * @param annotationID the internal database identifier of an annotation.
+     * @return # of removed rows in the table "notebookds_annotations".
      */
     public int deleteAnnotationFromAllNotebooks(Number annotationID);
@@ -323,6 +321,6 @@
     /**
      * 
-     * @param annotationBody
-     * @return two string components of the annotationBody: the text/xml content and the mime type.
+     * @param annotationBody a {@link AnnotationBody} object.
+     * @return two string components of the annotationBody: the text or xml content, and the mime type.
      */
     public String[] retrieveBodyComponents(AnnotationBody annotationBody);
Index: /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/CachedRepresentationDao.java
===================================================================
--- /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/CachedRepresentationDao.java	(revision 6041)
+++ /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/CachedRepresentationDao.java	(revision 6042)
@@ -37,5 +37,6 @@
      *
      * @param internalID the internal database Id of the cached representation.
-     * @return the object of the class "CachedRepresentationInfo" with the internal id "internalID".
+     * @return a {@link CachedRepresentationInfo} object representing the metadata
+     * of the cached representation with the internal id "internalID".
      */
     public CachedRepresentationInfo getCachedRepresentationInfo(Number internalID);
@@ -43,12 +44,12 @@
     /**
      *
-     * @param internalID
+     * @param internalID the internal database Id of a target.
      * @return the Blob of the cached representation with the internal database id "internalID".
      */
     public InputStream getCachedRepresentationBlob(Number internalID);
 
-    /* 
-     * @param targetID
-     * @return the list of the cached representation's ID-s for the target the internal database ID "targetID". 
+    /** 
+     * @param targetID the internal database Id of a target.
+     * @return the list of the cached representation's ID-s for the target with the internal database ID "targetID". 
      */
     public List<Number> getCachedRepresentationsForTarget(Number targetID);
@@ -59,7 +60,7 @@
     /**
      *
-     * @param cachedInfo the metadata of the cached representation (incl.the date of creation and mime-type.
+     * @param cachedInfo a {@link CachedRepresentationInfo} object representing the metadata of a cached representation.
      * @param cachedBlob the content of the cached representation, considered as BLOB.
-     * @return the internal ID of the just added "cached", or throws the exception if adding fails.
+     * @return the internal ID of the just added cached representation, or throws an exception if adding fails.
      * @throws NotInDataBaseException if there is no object with the generated for the new cached representation external id. 
      * @throws IOException if reading blob fails.
@@ -74,6 +75,6 @@
     /**
      * 
-     * @param internalID the internal database id of the cached representation.
-     * @param cachedInfo the new metadata for it.
+     * @param internalID the internal database id of a cached representation.
+     * @param cachedInfo new metadata for it.
      * @return # of updated rows in the table "cached_representation". Must be 1 if updated, and 0 otherwise.
      */
@@ -82,5 +83,5 @@
     /**
      * 
-     * @param internalID the internal database id of the cached representation.
+     * @param internalID the internal database id of a cached representation.
      * @param cachedBlob the new content considered as BLOB.
      * @return # of updated rows in the table "cached_representation". Must be 1 if updated, and 0 otherwise.
@@ -94,5 +95,5 @@
     /**
      *
-     * @param internalID the internal database id of the cached representation.
+     * @param internalID the internal database id of a cached representation.
      * @return # deleted rows on the table "cached_representation".
      */
Index: /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/DBDispatcher.java
===================================================================
--- /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/DBDispatcher.java	(revision 6041)
+++ /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/DBDispatcher.java	(revision 6042)
@@ -46,11 +46,11 @@
 
 /**
- * This class does not implement access to the database directly but dispatch 
- * the requests to the corresponding dao implementations; each defined in the 
- * interface method implements a request; if the request addresses more then one
- * table in the database then the request is split up in a basic per-table 
- * requests which are ordered so that there will not be constraint violation;
+ * An implementation for this interface does not perform access to the database directly but dispatches 
+ * requests to the corresponding dao implementations. Each defined in the 
+ * interface method implements a simple or complex request. If the request addresses more than one
+ * table in the database then the request is split up in basic per-table 
+ * requests whose calls are ordered to avoid constraint violation;
  * e.g when a target is to be deleted then first it is checked if no annotation 
- * refers to it, and if not it is deleted from "target" table.
+ * refers to it, and if this is the case then it is deleted from "target" table.
  * 
  * @author olhsha
@@ -60,6 +60,6 @@
     
     /**
-     * Sets the server address, e.g. "http://lux16.mpi.nl/ds/webannotator/ ".
-     * @param relServiceURI
+     * Sets the server address, e.g. "ds/webannotator/ ".
+     * @param relServiceURI a string representing a relative service URI.
      * 
      */
@@ -73,6 +73,6 @@
      * 
      * @param externalID the external UUID of the resource.
-     * @param resource the type of resource (annotation, principal, cached representation, target, notebook)
-     * which tell in which table to look for.
+     * @param resource  a {@link Resource} object representing a type of resource (annotation, principal, cached representation, target, notebook);
+     * it tells in which table to look for.
      * @return the internal database id of the resource.
      * @throws NotInDataBaseException 
@@ -83,6 +83,6 @@
      * 
      * @param resourceID the internal database identifier of the resource,
-     * @param resource the type of resource (annotation, principal, cached representation, target, notebook)
-     * which tell in which table to look for.
+     * @param resource a {@link Resource} object representing a type of resource (annotation, principal, cached representation, target, notebook);
+     * it tells in which table to look for.
      * @return the external UUID of the resource.
      */
@@ -92,7 +92,7 @@
      * 
      * @param resourceID the internal database identifier of the resource.
-     * @param resource the type of resource (annotation, principal, cached representation, target, notebook)
-     * which tell in which table to look for.
-     * @return the list of permissions (principal, permission) for the resource; 
+     * @param resource  a {@link Resource} object representing a type of resource (annotation, principal, cached representation, target, notebook);
+     * it tells in which table to look for.
+     * @return a {@link PermissionList} object, representing pairs (principal, permission) for the resource; 
      * currently makes sense  only for annotations and notebooks.
      */
@@ -101,43 +101,42 @@
     /**
      * 
-     * @param ownerId the internal database identifier of the owner whose annotations must be output;
-     * any owner is allowed when "null".
+     * @param ownerId the internal database identifier of the owner whose annotations are searched for;
+     * any owner is considered when "null".
+     * @param link the link which at least one target source of the output annotations must contain;
+     * no limitations on links when "null".
+     * @param matchMode if the link of a target source must contain, beginWith, 
+     * endsWith or be exact match of the "link" parameter above.
+     * @param text that must be in the body of the requested annotations; no limitations when "null".
+     * @param inloggedPrincipalID the internal database id of the inlogged principal.
+     * @param accessMode the access mode that relates the inlogged principal to the requested annotations.
+     * @param namespace not implemented.
+     * @param after the lower limit of the last-update date for requested annotations (the begin of the time, if "null").
+     * @param before the upper limit of the lust-update date (now, if "null"). 
+     * @return the list of the internal database identifiers of annotations satisfying the criteria defined by the parameters.
+     * @throws NotInDataBaseException if one of the getters used in the implementation throws this exception.
+     */
+    List<Number> getFilteredAnnotationIDs(UUID ownerId, String link, MatchMode matchMode, String text, Number inloggedPrincipalID, String  accessMode, String namespace, String after, String before) throws NotInDataBaseException;
+
+    /**
+     * The method must be used only in debug services by principals with "developer" role.
+     * @return the {@link AnotationInfoList} object representing AnnotationInfo's  of all the annotations.
+     */
+    AnnotationInfoList getAllAnnotationInfos();
+
+  /**
+   * 
+     * @param ownerId the internal database identifier of the owner whose annotations are searched for;
+     * any owner is considered when "null".
      * @param link the link which at least one target source of the output annotation(s) must contain;
-     * no limitations on links when null.
-     * @param matchMode if the link of a target source must "contain, beginWith, 
+     * no limitations on links when "null".
+     * @param matchMode tells if the link of a target source must contain, beginWith, 
      * endsWith or be exact match of the "link" parameter above.
      * @param text that must be in the body of the requested annotations; no limitations when null.
      * @param inloggedPrincipalID the internal database id of the inlogged principal.
-     * @param accessMode the access mode that related the inlogged principal to the requested annotations.
+     * @param accessMode the access mode that relate the inlogged principal to the requested annotations.
      * @param namespace not implemented.
-     * @param after the lower limit of the last update date for requested annotations (the begin of the time, if null).
-     * @param before the upper limit of the lust update(now, if null). 
-     * @return the list of the internal database identifiers of the annotations satisfying the criteria defined by the parameters.
-     * @throws NotInDataBaseException if one of the getters used in the implementation throws this exception.
-     */
-    List<Number> getFilteredAnnotationIDs(UUID ownerId, String link, MatchMode matchMode, String text, Number inloggedPrincipalID, String  accessMode, String namespace, String after, String before) throws NotInDataBaseException;
-
-    /**
-     * The method must be used only in debug services by principals with "developer" role.
-     * @return the AnnotationInfo-s of all the annotations (i.e. the information which is taken only from "annotations" table,
-     * and junction tables for permissions and targets are not used.
-     */
-    AnnotationInfoList getAllAnnotationInfos();
-
-  /**
-   * 
-     * @param ownerId the internal database identifier of the owner whose annotations must be output;
-     * any owner is allowed when "null".
-     * @param link the link which at least one target source of the output annotation(s) must contain;
-     * no limitations on links when null.
-     * @param matchMode if the link of a target source must "contain, beginWith, 
-     * endsWith or be exact match of the "link" parameter above.
-     * @param text that must be in the body of the requested annotations; no limitations when null.
-     * @param inloggedPrincipalID the internal database id of the inlogged principal.
-     * @param accessMode the access mode that related the inlogged principal to the requested annotations.
-     * @param namespace not implemented.
-     * @param after the lower limit of the last update date for requested annotations (the begin of the time, if null).
-     * @param before the upper limit of the lust update(now, if null). 
-     * @return the list of the annotation info's (i.e. the information taken only from the table "annotations", and not from junction tables)
+     * @param after the lower limit of the last-update date for requested annotations (the begin of the time, if null).
+     * @param before the upper limit of the lust-update date(now, if null). 
+     * @return the {@link AnotationInfoList} object representing the list of the annotation info's (i.e. the information taken only from the table "annotations", and not from junction tables)
      * of the annotations satisfying the criteria defined by the parameters.
      * @throws NotInDataBaseException if getFileteredAnnotationIDs throws this exception.
@@ -149,6 +148,6 @@
     /**
      *
-     * @param internalID
-     * @return CachedRepresentationInfo (i.e. "metadata") for cached representation with the internal id "intenalID"
+     * @param internalID the internal database id of a cached representation.
+     * @return a {@link CachedRepresentationInfo} object representing the metadata for the cached representation with the internal id "intenalID".
      */
     CachedRepresentationInfo getCachedRepresentationInfo(Number internalID);
@@ -157,5 +156,5 @@
      *
      * @param annotationID an internal database annotation identifier.
-     * @return the {@link Annotation} for this "annotationID, generated from the tables "annotation", "annotations_targets", "target", "annotations_principals_access".
+     * @return the {@link Annotation} object for this "annotationID", generated from the tables "annotation", "annotations_targets", "target", "annotations_principals_accesses".
      * 
      */
@@ -179,5 +178,5 @@
      *
      * @param annotationID an internal database annotation identifier.
-     * @return the {@link ReferenceList} object containing the references of all targets of the annotationID.
+     * @return the {@link ReferenceList} object containing the h-references of all the targets of the annotationID.
      */
     ReferenceList getAnnotationTargets(Number annotationID);
@@ -193,6 +192,6 @@
      * 
      * @param annotationID an internal database annotation identifier.
-     * @return the list of h-references of the principals which are mentioned in 
-     * the junction table "annotations-permissions" in a pair with "annotationID"
+     * @return the list of h-references of the principals which are present in 
+     * the junction table "annotations_principals_accesses" in a pair with "annotationID"
      * and for which principal's name and / or principal's e-mail is missing.
      */
@@ -202,5 +201,5 @@
      *
      * @param targetID an internal database target identifier.
-     * @return the list of the external  ID-s that refers to the same source (link) as targetID
+     * @return the list of the external  ID of targets that refer to the same source (link) as targetID
      */
     ReferenceList getTargetsForTheSameLinkAs(Number targetID);
@@ -208,6 +207,6 @@
     /**
      *
-     * @param cachedID an internal database cached representation identifier.
-     * @return BLOB of the cached representation.
+     * @param cachedID an internal database cached-representation identifier.
+     * @return the BLOB of the cached representation.
      */
     InputStream getCachedRepresentationBlob(Number cachedID);
@@ -216,5 +215,5 @@
      * 
      * @param internalID an internal database target identifier.
-     * @return {@link Taget} object built for "internalID".
+     * @return the {@link Taget} object representing  the target with "internalID".
      */
     Target getTarget(Number internalID);
@@ -223,5 +222,5 @@
      *
      * @param principalID an internal database principal identifier.
-     * @return {@link Principal} object built for "principalID".
+     * @return the {@link Principal} object representing the principal with "principalID".
      */
     Principal getPrincipal(Number principalID) ;
@@ -231,5 +230,5 @@
      * 
      * @param eMail an email address.
-     * @return {@link Principal} object with e-mail "eMail".
+     * @return a {@link Principal} object representing a principal with e-mail "eMail".
      * @throws NotInDataBaseException if an principal with such eMail is not found.
      */
@@ -238,9 +237,9 @@
     /**
      * 
-     * @param internalID the databaseinternalId of a principal.
-     * @return {@link Principal} object with this internalID; will throw runtime 
+     * @param internalID the internal database Id of a principal.
+     * @return a {@link Principal} object with this internalID; will throw runtime 
      * "array out of bound exception" if a principal is not found due to the attempt
-     * to access empty array; not crucial since if you already have the internalId
-     * then the object must exist in the database, but fix it by throwing NotInDataBaseException;
+     * to access the empty array; not crucial since if you already have the internalId
+     * then the object must exist in the database, but fix it by throwing NotInDataBaseException.
      */
     String getPrincipalRemoteID(Number internalID);
@@ -266,7 +265,7 @@
      * @param annotationID the internal database id of an annotation.
      * @param principalID the internal database id of a principal.
-     * @return access of the principalID w.r.t. annotationID, which is a maximal access
+     * @return access of the principalID w.r.t. annotationID, computed is a maximum 
      * from "public" attribute of the annotation and the value "access" in the row 
-     * (annotationId, principalID, access) of the table "annotations_principals_access".
+     * (annotationId, principalID, access) of the table "annotations_principals_accesses".
      */
     Access getAccess(Number annotationID, Number principalID) ;
@@ -275,6 +274,5 @@
      * 
      * @param annotationID the internal database id of an annotation.
-     * @return the public-attribute value for "annotationID" 
-     * (NONE if database return empty result; fix it to be "NotInDataBaseException".
+     * @return the public-attribute value for "annotationID".
      */
     Access getPublicAttribute(Number annotationID);
@@ -283,5 +281,5 @@
      * 
      * @param principalID the internal database id of a principal.
-     * @return user, developer, or admin.
+     * @return "user" or "developer" or "admin".
      */
     String getTypeOfPrincipalAccount(Number principalID);
@@ -289,5 +287,5 @@
     /**
      * 
-     * @return  the {@link Principal} object corresponding to the "first in the list" admin of the database
+     * @return  the {@link Principal} object corresponding to the "first in the list" admin of the database.
      */
     Principal getDataBaseAdmin() ;
@@ -295,12 +293,12 @@
     /**
      * 
-     * @param action {@link Access} object defining which action is to be perfomed.
+     * @param action an {@link Access} object defining which action is to be perfomed.
      * @param principalID the internal Id of the principal who wants to perform "action".
-     * @param resourceID the internal id of the resource on which action must be performed.
+     * @param resourceID the internal id of the resource on which "action" must be performed.
      * @param resource a type of resource (annotation, notebook, cached representation, target, 
-     * principal)
+     * principal).
      * @return true iff "principalId" is allowed to perform "action" on "resourceID"; false
-     * otherwise false; currently is implemented only for "annotation" and return "true" on
-     * all other types of resources.
+     * otherwise; currently is implemented only for "annotation" and return "true" on
+     * all other type of resources.
      */
     boolean canDo(Access action, Number principalID, Number resourceID, Resource resource);
@@ -311,6 +309,6 @@
      * 
      * @param prinipalID the internal database id of a principal.
-     * @param access a {@link Access} object.
-     * @return {@link NotebookInfoList} object containing the list of all notebooks to which 
+     * @param access an {@link Access} object.
+     * @return a {@link NotebookInfoList} object containing the list of all notebooks to which 
      * "principalID" has "access".
      */
@@ -330,5 +328,5 @@
      * @param principalID the internal database id of a principal.
      * @return a {@link ReferenceList} object containing hrefs of notebooks owned
-     * by "principlaID" 
+     * by "principlaID".
      */
     ReferenceList getNotebooksOwnedBy(Number principalID);
@@ -338,5 +336,5 @@
      * @param notebookID the internal database id of a notebook.
      * @param access an {@link Access} object.
-     * @return a {@link ReferenceList} object containing hrefs of principals
+     * @return the {@link ReferenceList} object containing hrefs of principals
      * which have "access" to "notebookID".
      */
@@ -345,5 +343,5 @@
  * 
  * @param notebookID the internal database id of a notebook.
- * @return a {@link Notebook} object corresponding to the notebook with "notebookID".
+ * @return the {@link Notebook} object corresponding to the notebook with "notebookID".
  */
     Notebook getNotebook(Number notebookID);
@@ -352,5 +350,5 @@
      * 
      * @param notebookID the internal database id of a notebook.
-     * @return an internal database Id of the owner of the "notebookID".
+     * @return the internal database Id of the owner of the "notebookID".
      */
     Number getNotebookOwner(Number notebookID);
@@ -360,9 +358,9 @@
      * @param notebookID the internal database id of a notebook.
      * @param startAnnotation the first index for the list (of annotations). min value is "1".
-     * @param maximumAnnotations the maximum # of annotations in the output list expected.
+     * @param maximumAnnotations the maximum # of annotations in the output list.
      * @param orderedBy SQL "orderedBy" string value, must be one of the fields in the table "annotation".
      * @param desc direction of ordering.
-     * @return a {@link ReferenceList} object containing hrefs of annotations for notebookID,
-     * "orderedBy" in "desc" order, starting from "startAnnotation" and and with "maximum" hrefs. 
+     * @return a {@link ReferenceList} object containing "maximum" hrefs of annotations in the notebook with "notebookID",
+     * "orderedBy" in "desc" order, starting from "startAnnotation". 
      */
     ReferenceList getAnnotationsForNotebook(Number notebookID, int startAnnotation, int maximumAnnotations, String orderedBy, boolean desc);
@@ -377,5 +375,5 @@
      * @param oldIdentifier the external UUD of the resource.
      * @param newIdentifier the new external UUID of the resource.
-     * @return # of updated rows in the corresponding table. Must be 1 if the resource with oldIdentifier
+     * @return # of updated rows in the corresponding table. Must be 1 if the resource with "oldIdentifier"
      * gets the external identifier updated by "newIdentifier", and 0 otherwise.
      * @throws NotInDataBaseException if the resource with "oldIdentifier" is not found.
@@ -386,5 +384,5 @@
      * 
      * @param principalExternalID the external UUD of a principle.
-     * @param account new type of account for this principle (a role: user, developer, admin).
+     * @param account a new type of account for this principle (a role: user, developer, admin).
      * @return "true" if the account gets updated, and "false" otherwise.
      * @throws NotInDataBaseException if the principal with the external UUD of a principle.
@@ -396,7 +394,7 @@
      * 
      * @param annotation an {@link Annotation} object.
-     * @param remoteUser 
-     * @return # of rows in "annotation" table. "1" if the annotation gets updated, and "0" otherwise.
-     * @throws NotInDataBaseException if the annotation with the external id given in the annotation object,
+     * @param remoteUser   the remote id of the owner principal.
+     * @return # of updated rows in "annotation" table: "1" if the annotation gets updated, and "0" otherwise.
+     * @throws NotInDataBaseException if the annotation with the external id, given in the annotation object,
      * or the remote user are not found in the database.
      * @throws ForbiddenException if the "remoteUser" does not have "all" rights for the annotation with the external id,
@@ -407,7 +405,7 @@
     /**
      *
-     * @param internalID the internal database id of an annotation whose body to be updated.
-     * @param annotationBody an {@link Annotation} object.
-     * @return # of rows in "annotation" table. "1" if the annotation body gets updated by
+     * @param internalID the internal database id of an annotation whose body must be updated.
+     * @param annotationBody an {@link AnnotationBody} object.
+     * @return # of updated rows in "annotation" table: "1" if the annotation body gets updated by
      * "annotationBody" gets updated, and "0" otherwise.
      */
@@ -416,7 +414,7 @@
     /**
      * 
-     * @param internalID the internal database id of an annotation whose body to be updated.
-     * @param newHeader  the header to be placed in the database for "internalID".
-     * @return # of rows in "annotation" table. "1" if the annotation body gets updated by "newHeader",
+     * @param internalID the internal database id of an annotation whose header must be updated.
+     * @param newHeader  the new header for the annotation with "internalID".
+     * @return # of updated rows in "annotation" table: "1" if the annotation body gets updated by "newHeader",
      * and "0" otherwise.
      */
@@ -427,6 +425,6 @@
      * @param annotationID the internal database id of an annotation.
      * @param principalID the internal database id of a principal.
-     * @param access c
-     * @return # rows updated to the table "annotations_principals_access. "1" if 
+     * @param access an {@link Access} object representing an access level.
+     * @return # rows updated in the table "annotations_principals_access: "1" if 
      * "access" is assigned to the "principlaID" for the "ammotationID".
      */
@@ -436,6 +434,6 @@
      * 
      * @param annotationID the internal database id of an annotation.
-     * @param accessList  {@link PermissionList} object containing the list  representing (principal, access) pairs.
-     * @return  # of rows updated or added in the table "annotations_principals_access"  according to "accessList".
+     * @param accessList  a {@link PermissionList} object containing the list  representing (principal, access) pairs.
+     * @return  # of rows updated or added in the table "annotations_principals_access"  according to "permissionList".
      * @throws NotInDataBaseException if one of the principals mentioned in the list, is not found.
      */
@@ -447,5 +445,5 @@
      * @param publicAttribute  an {@link Access} object.
      * @return # of updated rows in "annotation" table; must be 1 if "public" field for 
-     * "annotationID" has been updated by value "publicAttribute".
+     * "annotationID" has been updated by the value of "publicAttribute".
      */
     int updatePublicAttribute(Number annotationID, Access publicAttribute);
@@ -453,5 +451,5 @@
     /**
      * 
-     * @param principal a {@link Principal} project.
+     * @param principal a {@link Principal} object.
      * @return the internal database id of the updated principal.
      * @throws NotInDataBaseException if the principal with the external id declared in "principal"
@@ -471,9 +469,9 @@
     /**
      * 
-     * @param cachedInfo a {@link CachedRepresentationInfo} object representing metadata of a cached representation.
+     * @param cachedInfo a {@link CachedRepresentationInfo} object representing the metadata of a cached representation.
      * @return # of updated rows in the table "cached_representation"; must be 1 if the
-     * row with the external id declared in "cachedInfo" has got updated.
+     * row with the external id declared in "cachedInfo" has been updated.
      * @throws NotInDataBaseException if the cached representation with the external id declared in the
-     * "cachedInfo" is nit found.
+     * "cachedInfo" is not found.
      */
     int updateCachedMetada(CachedRepresentationInfo cachedInfo)  throws NotInDataBaseException;
@@ -484,5 +482,5 @@
      * @param cachedBlob a new BLOB for the cached representation.
      * @return # of updated rows in "cached_representations_table"; must be "1" if the row with 
-     * "internalID" got updated.
+     * "internalID" has been updated.
      * @throws IOException if reading BLOB fails.
      */
@@ -494,6 +492,6 @@
      * @param notebookID the internal database id of a notebook.
      * @param upToDateNotebookInfo a {@link NotebookInfo} object.
-     * @return true if the "notebooks" table has got updated, namely the row with "notebookID" updated 
-     * by the corresponding values declared in "upToDateNotebookInfo"; false when no updated happens,
+     * @return true if the "notebooks" table has been updated, namely the row with "notebookID" updated 
+     * by the corresponding values declared in "upToDateNotebookInfo"; false when no updated happens.
      * @throws NotInDataBaseException if the notebook with "internalID" is not found.
      */
@@ -504,5 +502,5 @@
      * @param notebookID the internal database id of a notebook.
      * @param annotationID the internal database id of an annotation.
-     * @return true if the junction table "notebook_annotation" is updated by adding row with values (notebookID, annotationID).
+     * @return true if the junction table "notebooks_annotations" is updated by adding row with values (notebookID, annotationID).
      */
     boolean addAnnotationToNotebook(Number notebookID, Number annotationID);
@@ -515,7 +513,7 @@
      * 
      * @param targetID the internal database id of a target.
-     * @param fragmentDescriptor a string that located the target within the cached representation.
+     * @param fragmentDescriptor a string that locates the target within the cached representation.
      * @param cachedInfo a {@link CachedRepresentationInfo} object representing the metadata of the cached representation.
-     * @param cachedBlob a BLOB, representing the content of a cached representation.
+     * @param cachedBlob a BLOB, representing the content of the cached representation.
      * @return result[0] = # updated rows in the table "targets_cached_representations" (must be 1 or 0). result[1] = the
      * internal ID of the added cached (a new one if "cached" was new for the database).
@@ -528,11 +526,10 @@
      *
      * @param annotationID the internal database id of an annotation.
-     * @param targets list of {@link TargetInfo} objects, where {@link targetInfo} represents
-     * the most essential metadata of a target; it is supposed to be a list of targets
-     * for the annotations when annotations is just being added to the database or updated.
+     * @param targets list of {@link TargetInfo} objects, where a {@link TargetInfo} object represents
+     * the most essential metadata of a target.
      * @return a map "temporary targetID |--> target externalID"; its domain is the
      * temporary IDs of all the new targets; while adding a new target, a new
      * external ID is generated for it and it becomes the value of the map; the
-     * targetIDs which are already present in the DB are not in the domain. If
+     * targetIDs which are already present in the database are not in the domain. If
      * all targets are old, then the map is empty.
      * @throws NotInDataBaseException if adding of one of fresh targets fails.
@@ -565,5 +562,5 @@
      * @param strength
      * @param salt
-     * @return the total of updated rows in the tables related to the Spring authentication; must be 
+     * @return the total # of updated rows in the tables related to the Spring authentication; must be 
      * 2=1+1, where 1 is for the table "users", and 1 is for the table "roles".
      */
@@ -585,5 +582,5 @@
      * @param annotation an {@link Annotation} object representing an annotation to be added. 
      * @param ownerID the internal database id of the notebook's owner (principal).
-     * @return true if a new annotation has been added to the database and then it was added  to the notebook.
+     * @return true iff the new annotation has been added to the database and then it was added  to the notebook.
      * @throws NotInDataBaseException if adding annotation to the database fails.
      */
@@ -647,5 +644,5 @@
     /**
      * 
-     * @param internalID he internal database ID of a target to be deleted.
+     * @param internalID the internal database ID of a target to be deleted.
      * @return # of deleted rows in the table "target"; must be one if "internalID" is deleted.
      */
@@ -676,6 +673,6 @@
      * @param annotationID the internal database id of an annotation.
      * @return a {@link ResponseBody} object containing an annotation and a list of actions to do;
-     * for instance if it is a just added annotation, the result object contains this annotation
-     * and list of targets for which cached representations are missing.
+     * for now, the result object contains the {@link Annotation} element representing annotation
+     * with "annotationID" and list of targets for which cached representations are missing.
      */
     ResponseBody makeAnnotationResponseEnvelope(Number annotationID);
@@ -683,5 +680,5 @@
     /**
      * 
-     * @param notebookID the internal database id of an annotation.
+     * @param notebookID the internal database id of a notebook.
      * @return a {@link ResponseBody} object containing a notebook and a list of actions to do;
      * actions are not specified yet.
@@ -696,5 +693,5 @@
      * annotation, principal, notebook, target, cached_representation.
      * @return a {@link ResponseBody} object containing the list of (principal, permission) for this resource;
-     * if information about a principal (e.g. an e-mail) is missing then the corresponding action
+     * if information about a principal (e.g. an e-mail) is missing then the action like "add_principal_info"
      * is added to the list of actions.
      */
@@ -704,5 +701,5 @@
      * 
      * @param fullName a string representing a full name of a principal.
-     * @return the external Id of the (first) principal with with full name.
+     * @return the external Id of the (first) principal with this full name.
      * @throws NotInDataBaseException if such principal is not found.
      */
@@ -711,5 +708,5 @@
     /**
      * 
-     * @param headline a string representing the headline of an annotation.
+     * @param headline the headline of an annotation.
      * @return  the list of UUID's of all the annotations with this headline.
      */
@@ -718,5 +715,5 @@
     /**
      * 
-     * @param headline a string representing the headline of an annotation.
+     * @param headline the headline of an annotation.
      * @return the list of internal database id-s of all the annotations with this headline.
      */
Index: /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/ILambda.java
===================================================================
--- /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/ILambda.java	(revision 6041)
+++ /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/ILambda.java	(revision 6042)
@@ -22,6 +22,5 @@
 
 /**
- * This is a help interface used in wrapper methods for REST requests, see RequestWrappers.java;
- * "R" may stay for resource, e.g. Annotation.
+ * This is a help interface used in wrapper methods for REST requests, see {@link RequestWrappers}.
  * @author olhsha
  */
@@ -30,5 +29,5 @@
     /**
      * 
-     * @param params list of pairs parameter->value, e.g. such map can contain the external Id of a resource, e.g. an annotation.
+     * @param params list of pairs parameter->value; e.g. such map can contain "externalId"->"aaaaaaaaaa".
      * @return an instance of "R" corresponding to these parameter values,e.g. an annotation if R is instantiated as "Annotation".
      * @throws NotInDataBaseException see various implementations in REST resource classes.
Index: /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/ILambdaPrincipal.java
===================================================================
--- /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/ILambdaPrincipal.java	(revision 6041)
+++ /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/ILambdaPrincipal.java	(revision 6042)
@@ -22,5 +22,5 @@
 
 /**
- * This is a help interface used in wrapper methods for REST requests, see RequestWrappers.java;
+ * This is a help interface used in wrapper methods for REST requests, see {@link RequestWrappers}.
  * @author olhsha
  */
Index: /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/NotebookDao.java
===================================================================
--- /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/NotebookDao.java	(revision 6041)
+++ /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/NotebookDao.java	(revision 6042)
@@ -27,7 +27,7 @@
 
 /**
- * Created on : Jun 12, 2013, 1:40:09 PM
- *
- * @author Peter Withers <peter.withers@mpi.nl>
+ * 
+ *
+ * @author olhsha@mpi.nl
  */
 
@@ -54,9 +54,9 @@
      * 
      * @param principalID the internal database id of some principal.
-     * @param acessMode {@link Access} object, representing one of the access modes: 
+     * @param acessMode an {@link Access} object, representing one of the access modes: 
      * "all", "write", "read" or "none".
-     * @return the list of internal database id's of the notebooks for which "principalID" has ""accessMode" access.
-     */
-    List<Number> getNotebookIDs(Number principalID, Access acessMode);
+     * @return the list of internal database id's of the notebooks for which "principalID" has "accessMode" access.
+     */
+    List<Number> getNotebookIDs(Number principalID, Access accessMode);
     
    /** 
@@ -71,5 +71,5 @@
      * 
      * @param notebookID the internal database id of a notebook.
-     * @return the {@link NotebookInfo} object built for the notebook with notebookID upon the corresponding row
+     * @return the {@link NotebookInfo} object representing the notebook with notebookID, built on the corresponding row
      * in the "notebook" table.
      */
@@ -80,6 +80,5 @@
      * 
      * @param notebookID the internal database id of a notebook.
-     * @return the {@link Notebook} object built for the notebook with notebookID upon the corresponding row
-     * in the "notebook" table.
+     * @return the {@link Notebook} object representing the notebook with notebookID.
      */
     Notebook getNotebookWithoutAnnotationsAndAccesssAndOwner(Number notebookID);
@@ -102,6 +101,6 @@
      * @param notebookID the internal database id of a notebook.
      * @param title a new title for the notebook.
-     * @param ownerID the internal database id of the owner principal of the notebook.
-     * @return true if the title "notebookID" is updated to "title", false otherwise.
+     * @param ownerID the internal database id of the owner principal (or possibly, a new owner principal) of the notebook.
+     * @return true if the notebook metadata are updated, false otherwise.
      */
     boolean updateNotebookMetadata(Number notebookID, String title, Number ownerID);
@@ -137,5 +136,5 @@
      * @param ownerID the internal database id of the owner principal.
      * @return the internal id of the created notebook.
-     * @throws NotInDataBaseException if creation the notebook fails. 
+     * @throws NotInDataBaseException if creating the notebook fails. 
      */
     public Number createNotebookWithoutAccesssAndAnnotations(Notebook notebook, Number ownerID) throws NotInDataBaseException;
@@ -145,5 +144,5 @@
      * @param notebookID the internal database ID of a notebook.
      * @param annotationID the internal database ID of an annotation.
-     * @return  true if the row for the (ntebookID,annotationID) has been added to the junction table 
+     * @return  true if the row for the (notebookID,annotationID) has been added to the junction table 
      * "notebooks_annotations".
      */
@@ -172,5 +171,5 @@
      * 
      * @param notebookID the internal database ID of a notebook.
-     * @param annotationID annotationID the internal database ID of an annotation.
+     * @param annotationID the internal database ID of an annotation.
      * @return  true iff the row for the (notebookID,annotationID) has been deleted from the junction table 
      * "notebooks_annotations".
Index: /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/PrincipalDao.java
===================================================================
--- /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/PrincipalDao.java	(revision 6041)
+++ /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/PrincipalDao.java	(revision 6042)
@@ -36,5 +36,5 @@
      * 
      * @param internalID the internal database ID of a principal.
-     * @return the {@link Principal} object with the internal database id "internalID".
+     * @return the {@link Principal} object that represents the principal with the internal database id "internalID".
      */
      public Principal getPrincipal(Number internalID);
@@ -42,7 +42,7 @@
      /**
       * 
-      * @param eMail an e-mail string.
-      * @return the {@link Principal} object with th e-mail "email".
-      * @throws NotInDataBaseException, if such a principal is not found.
+      * @param eMail an e-mail.
+      * @return the {@link Principal} object representing the principal with the e-mail "eMail".
+      * @throws NotInDataBaseException if such a principal is not found.
       */
      public Principal getPrincipalByInfo(String  eMail) throws NotInDataBaseException;
@@ -63,5 +63,5 @@
      /**
       * 
-      * @param remoteID the string representing the remote id of a principal.
+      * @param remoteID the remote id of a principal.
       * @return true iff a principal with "remoteID" exists in the table "principal".
       */
@@ -78,5 +78,5 @@
       * 
       * @param internalID the internal database id of a principal.
-      * @return the string representing the remote id of the principal.
+      * @return the remote id of the principal.
       */
      public String getRemoteID(Number internalID);
@@ -85,6 +85,6 @@
      /**
       * 
-      * @param remoteID the string representing the remote id of a principal.
-      * @return the interna ld database id of the principal with "remotedID".
+      * @param remoteID the remote id of a principal.
+      * @return the internal database id of the principal with "remotedID".
       * @throws NotInDataBaseException if there is no principal with "remoteID".
       */
@@ -93,5 +93,5 @@
      /**
       * 
-      * @param remoteID the string representing the remote id of a principal.
+      * @param remoteID the remote id of a principal.
       * @return the external UUID of the principal with "remotedID".
       * @throws NotInDataBaseException  if there is no principal with "remoteID".
@@ -101,5 +101,5 @@
      /**
       * 
-      * @param fullName the string representing the full name of a principal.
+      * @param fullName the full name of a principal.
       * @return the external UUID of the principal with "fullName.
       * @throws NotInDataBaseException if there is no principal with "fullName".
@@ -119,6 +119,6 @@
    * 
    * @param externalID the external UUID of a principal.
-   * @param account a string representing the type of an account: admin, developer, user.
-   * @return true, if the account of "externalId" has been updated to "account".
+   * @param account the type of an account: admin, developer, user.
+   * @return true, iff the account of "externalId" has been updated to "account".
    * @throws NotInDataBaseException iff no principal with "externalId" is found.
    */
@@ -127,7 +127,7 @@
      /**
       * 
-      * @param principal a {@link Principal} object which must update the principal referred by "externakId" given in this object.
-      * @return the internal id of a principal which has been updated.
-      * @throws NotInDataBaseException if principal with the externalId given in the "principal" is not found.
+      * @param principal a {@link Principal} object which must update the principal referred by "externalId" given in this object.
+      * @return the internal id of the principal which has been updated.
+      * @throws NotInDataBaseException if a principal with the externalId given in the "principal" parameter is not found.
       */
      public Number updatePrincipal(Principal principal) throws NotInDataBaseException;
@@ -136,5 +136,5 @@
       * 
       * @param principal a {@link Principal} object to be added to the database.
-      * @param remoteID a string representing the remote of of the principal to be added.
+      * @param remoteID the remote of of the principal to be added.
       * @return the internal id of the just added principal.
       * @throws NotInDataBaseException if adding the principal fails.
@@ -148,5 +148,5 @@
       * @param strength the strength of a password.
       * @param salt 
-      * @return a number of added rows in "users" table; must be 1 of the user is added.
+      * @return the number of added rows in "users" table; must be 1 if the user is added.
       */
      public int addSpringUser(String username, String password, int strength, String salt);
@@ -155,5 +155,5 @@
       * 
       * @param username the name of a user for spring basic authentication.
-      * @return the amount of rows added o "authorities" tables; "1" if "username" is added with the default "ROLE_USER"; 0 otherwise.
+      * @return the amount of rows added to "authorities" table; "1" if "username" is added with the default "ROLE_USER"; 0 otherwise.
       */
      public int addSpringAuthorities(String username);
@@ -162,5 +162,5 @@
       * 
       * @param intenralID the internal ID of a principal to be deleted,
-      * @return the amount f deleted rows; "1" if deleted, "0" otherwise.
+      * @return the amount of deleted rows; "1" if deleted, "0" otherwise.
       * @throws PrincipalCannotBeDeleted if the principal is in use, i.e. mentioned in one of the junction tables.
       */
Index: /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/ResourceDao.java
===================================================================
--- /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/ResourceDao.java	(revision 6041)
+++ /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/ResourceDao.java	(revision 6042)
@@ -25,6 +25,6 @@
 
 /**
- * This interfaces describes signatures common for all resources: Annotation, Target, Cached Representation, Principal, Notebook;
- * the implementation must contain field "resourceTableName" whose value is one of the five names of resource tables:
+ * This interface defines methods common for all dao's: Annotation, Target, Cached Representation, Principal, Notebook.
+ * An implementation must set a non-null value for the field "resourceTableName". It is one of the five names of resource tables:
  * "annotation", "target", "cached_representation", "principal", "notebook".
  * @author olhsha
@@ -40,5 +40,5 @@
     /**
      * 
-     * @param externalId the external UUId of a resource. 
+     * @param externalId the external UUID of a resource. 
      * @return the internal ID of the resource.
      * @throws NotInDataBaseException if the resource with this id is not found.
@@ -55,7 +55,7 @@
     /**
      * 
-     * @param oldIdentifier the current external UUId of a resource.
-     * @param newIdentifier the new external ID of the resource.
-     * @return true iff the external id of the resource have been updated to the value of "newIDentifier".
+     * @param oldIdentifier the current external UUID of a resource.
+     * @param newIdentifier the new external UUID of the resource.
+     * @return true iff the external id of the resource has been updated to the value of "newIdentifier".
      */
     boolean updateResourceIdentifier(UUID oldIdentifier, UUID newIdentifier);
Index: /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/TargetDao.java
===================================================================
--- /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/TargetDao.java	(revision 6041)
+++ /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/TargetDao.java	(revision 6042)
@@ -21,5 +21,4 @@
 import eu.dasish.annotation.schema.Target;
 import eu.dasish.annotation.schema.TargetInfo;
-import java.sql.SQLException;
 import java.util.List;
 import java.util.Map;
@@ -38,5 +37,5 @@
      *
      * @param inernalID the internal database id of a target.
-     * @return the {@link Target} object with the intrenal Id "internalID".
+     * @return the {@link Target} object representing the target with the internal id "internalID".
      */
     public Target getTarget(Number internalID);
@@ -45,5 +44,5 @@
      *
      * @param targets the list of internal database ids of targets.
-     * @return the list of {@link TargetInfo} objects corresponding to the targets with the internalIds from the list "targets".
+     * @return the list of {@link TargetInfo} objects representing the targets with the internal id-s from the list "targets".
      */
     public List<TargetInfo> getTargetInfos(List<Number> targets);
@@ -67,6 +66,6 @@
     /**
      *
-     * @param link a string representing a link (uri) to a target source.
-     * @return the list of internal database target ID's whose link-fields is exactly "link".
+     * @param link a link (uri) to a target source.
+     * @return the list of internal database target id-s whose link-fields is exactly "link".
      */
     public List<Number> getTargetsForLink(String link);
@@ -75,5 +74,5 @@
    * 
    * @param cachedID the internal database id of a cached representation.
-   * @return true iff "cachedID" is referred to for some target in "targets_cached_representations" table.
+   * @return true iff "cachedID" is connected  to some target in "targets_cached_representations" table.
    */
     boolean cachedIsInUse(Number cachedID);
@@ -91,5 +90,10 @@
      */
 
-   
+   /**
+    * 
+    * @param target a {@link Target} object representing the target to add.
+    * @return the internal database id of the target if it is added to the database.
+    * @throws NotInDataBaseException if adding fails.
+    */
     public Number addTarget(Target target)  throws NotInDataBaseException;
 
@@ -100,10 +104,16 @@
      * @param cachedID the internal database id of a cached representation.
      * @param fragmentDescription a string representing the location of the target in the cached representation.
-     * @return # added rows to the table "targets_cached_representations"; should be "1" if the pair (targetID, cachedID) has been added.
+     * @return # of updated rows in the table "targets_cached_representations"; should be "1" if the row with (targetID, cachedID) has been updated.
      */
     public int updateTargetCachedRepresentationFragment(Number targetID, Number cachedID, String fragmentDescription);
 
-    
-    public int addTargetCachedRepresentation(Number TargetID, Number cachedID, String fragmentDescription);
+    /**
+     * 
+     * @param targetID the internal database id of a target.
+     * @param cachedID the internal database id of a cached representation.
+     * @param fragmentDescription a string representing the location of the target in the cached representation.
+     * @return # of added rows in the table "targets_cached_representations"; should be "1" if the row with (targetID, cachedID, fragmentDescriptor) is added.
+     */
+    public int addTargetCachedRepresentation(Number targetID, Number cachedID, String fragmentDescription);
 
     /**
@@ -114,5 +124,5 @@
      *
      * @param internalID the internal database id of a target.
-     * @return # deleted rows in "target" table. Should be "1" if the target hasbeen deleted.
+     * @return # deleted rows in "target" table. Should be "1" if the target has been removed.
      */
     public int deleteTarget(Number internalID);
Index: /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/impl/JdbcAnnotationDao.java
===================================================================
--- /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/impl/JdbcAnnotationDao.java	(revision 6041)
+++ /DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/impl/JdbcAnnotationDao.java	(revision 6042)
@@ -256,13 +256,5 @@
     };
 
-    /////////////////////////////////////////////////
-    /**
-     *
-     * @param annotationIDs
-     * @return list of annotation references corresponding to the annotation-ids
-     * from the input list if the input list is null or empty (zero elements)
-     * returns an empty list there may be annotationIDs which are not in the DB
-     * (so that's why we need this method).
-     */
+   
     @Override
     public List<String> getAnnotationREFs(List<Number> annotationIDs) {
