[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Handle-info] Question about creating new Handles
As of v8 there is a "mintNewSuffix" flag which can be set on a CreateHandleRequest. This will append a random suffix to the handle included with the request (which needs to include the slash) and will ensure uniqueness within the server's own storage. So, for example, using the Java API:
HandleValue[] values = ...;
AuthenticationInfo authInfo = ...;
byte[] prefix = Util.encodeString("20.500.12345/"); // note ends with a slash
CreateHandleRequest request = new CreateHandleRequest(prefix, values, authInfo);
request.mintNewSuffix = true;
mintNewSuffix=true can also be used as a query parameter to a PUT request in the HTTP API.
Robert
> On 2016-01-10, at 11:59, Kebe, Ousmane <kebe.4@osu.edu> wrote:
>
> Hi,
> I was wondering if I could get some clarification on wether or not the Handle Server only creates handles that you specify or if there is a way to ask it to give you the next available handle.
> So does the handle keep track of the last handle created so it can auto-increment something to give you as the next handle available?
> If not does that mean you have to keep track of your own handles and figure out your own way of giving it a new unique handle to create?
>
> Any insight on this matter would be greatly appreciated.
>
> Thanks,
> Ousmane Kebe
> Web Application Developer
> The Ohio State University
>
>
>
> _______________________________________________
> Handle-Info mailing list
> Handle-Info@cnri.reston.va.us
> http://www.handle.net/mailman/listinfo/handle-info
_______________________________________________
Handle-Info mailing list
Handle-Info@cnri.reston.va.us
http://www.handle.net/mailman/listinfo/handle-info