Esteban Chiner wrote:
Hello,
I'm trying to insert documents in a collection using an automatic new
ID. I use the CreateNewOID XML-RPC method and I get a huge hexadecimal
number but I would like to have an autoincremental ID value (like 1, 2,
3, etc.).
Is this possible with Xindice? Any workaround?
Thank you very much,
Esteban
Because in my own application I use a single ID generator, I suggested
to Kal Ahmed that we modify his [TM4J] topic map engine to allow a
System.setProperty(String,String), e.g.,
System.setProperty("org.tm4j.topicmap.idGenerator",
"org.ceryle.util.IDFactory");
to set a URI property that TM4j would be sensitive to. TM4J has an
IDGenerator interface with one method, getID(), so now I can set it
to receive a setIDGenerator(IDGenerator) containing my own IDGenerator.
I'm currently crunching for an end-of-month deadline (trying to get ready
for HyperText 2003), but in September I could probably add the code to
Xindice if people wanted it. Then applications could set the style of
auto-generated IDs as they see fit. I'm not sure how this group likes
the idea of system properties being used to alter behaviour.
Murray
[TM4J] http://tm4j.sourceforge.net/
...........................................................................
Murray Altheim http://kmi.open.ac.uk/people/murray/
Knowledge Media Institute
The Open University, Milton Keynes, Bucks, MK7 6AA, UK .
"Shhh. Be vewy, vewy quiet. We're hunting wabbits." -- Elmer Fudd
"I don't know how close we are, closer than we were yesterday,
I guess. All I know is we're on the hunt." -- George W. Bush
BBC News: http://news.bbc.co.uk/1/hi/world/americas/3110615.stm