how to create ,delete,modify collection?

hi,I want to delete a collection in the database or delete all documents in a collection,how can I do that using the Tamino API for java?

Hi,

You can use TSchemaDefinition3Accessor for deleting (undefine) collection.

e.g.
//Get connection
TConnection connection = TConnectionFactory.getInstance().newConnection(“http://localhost/tamino/mydb”);

//Get Accessor.
TSchemaDefinition3Accessor tsd3Accessor = connection.newSchemaDefinition3Accessor( TDOMObjectModel.getInstance() );

// Undefine collection “temp”
tsd3Accessor.undefine(“temp”,null);



Regards,

Vikram

Vikram Shinde


Thanks you very much!
Best regards,
GavinZheng