[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Handle-info] AdminRecord.toString() Discrepancy?



Hi:

In playing with the JavaScript library (and clients based on that) I noted a
discrepancy in the HCL (6.2.3). The toString() method in the AdminRecord
class (listed at end of this mail) seems to be shortchanging on the number
of admin permissions. Specifically, DELETE_NAMING_AUTH, MODIFY_VALUE, and
REMOVE_VALUE don't seem to be reported. (Only 9 of the 12 permissions are
added to the string.)

I couldn't understand why the OpenHandle clients were out of sync with the
web form.

=== hdl.handle.net ===

Handle Values for: 10.1000/1
Index    Type    Timestamp    Data
100    HS_ADMIN    Thu Apr 13 2000 11:08:57 EDT     handle=0.NA/10.1000;
index=200; [create hdl,delete hdl,create NA,add val,read val,modify val,del
admin,add admin]
1    URL    Fri Sep 10 2004 15:49:59 EDT     http://www.doi.org/index.html


=== OpenHandle: Handle Client #1 ===

The handle <hdl:10.1000/1> has 2 values:

value #1:
  index = 100
  type = HS_ADMIN
  data = {...}
  permission = adminRead, adminWrite, publicRead
  ttl = relative, 24h
  timestamp = Thu, 13 Apr 2000 15:08:57 GMT
  reference = []

  (100, HS_ADMIN = hdl:0.NA/10.1000?index=200 [ readValue, addNa,
deleteHandle, addAdmin, removeValue, deleteNa, addValue, addHandle,
removeAdmin, modifyValue, modifyAdmin ] )

value #2:
  index = 1
  type = URL
  data = http://www.doi.org/index.html
  permission = adminRead, adminWrite, publicRead
  ttl = relative, 24h
  timestamp = Fri, 10 Sep 2004 19:49:59 GMT
  reference = []

  (1, URL = http://www.doi.org/index.html)

===

Probably not the place to ask this, but is there any reason why the web form
does not support GET as well as POST? (I seem to recall that this may have
something to do with dispatching on the GET which is certainly a shame since
there is no way of building a link to a query - only to the form itself.)

Cheers,

Tony


###¢


  public String toString() {
    StringBuffer sb = new StringBuffer(20);
    
    sb.append("handle=");
    sb.append(Util.decodeString(adminId));
    
    sb.append("; index=");
    sb.append(adminIdIndex);
    
    sb.append("; [");
    
    int len = sb.length();
    
    if (perms[ADD_HANDLE])
      sb.append("create hdl,");
    if (perms[DELETE_HANDLE])
      sb.append("delete hdl,");
    if (perms[ADD_NAMING_AUTH])
      sb.append("create NA,");
    if (perms[ADD_VALUE])
      sb.append("add val,");
    if (perms[READ_VALUE])
      sb.append("read val,");
    if (perms[MODIFY_ADMIN])
      sb.append("modify val,");
    if (perms[REMOVE_ADMIN])
      sb.append("del admin,");
    if (perms[ADD_ADMIN])
      sb.append("add admin,");
    if (perms[LIST_HANDLES])
      sb.append("list,");
    
    if (len != sb.length())
      sb.deleteCharAt(sb.length()-1);
    
    sb.append("]");
    
    return sb.toString();
  }


********************************************************************************   
DISCLAIMER: This e-mail is confidential and should not be used by anyone who is
not the original intended recipient. If you have received this e-mail in error
please inform the sender and delete it from your mailbox or any other storage
mechanism. Neither Macmillan Publishers Limited nor any of its agents accept
liability for any statements made which are clearly the sender's own and not
expressly made on behalf of Macmillan Publishers Limited or one of its agents.
Please note that neither Macmillan Publishers Limited nor any of its agents
accept any responsibility for viruses that may be contained in this e-mail or
its attachments and it is your responsibility to scan the e-mail and 
attachments (if any). No contracts may be concluded on behalf of Macmillan 
Publishers Limited or its agents by means of e-mail communication. Macmillan 
Publishers Limited Registered in England and Wales with registered number 785998 
Registered Office Brunel Road, Houndmills, Basingstoke RG21 6XS   
********************************************************************************


_______________________________________________
Handle-Info mailing list
Handle-Info@cnri.reston.va.us
http://www.handle.net/mailman/listinfo/handle-info