Manipulating tamino schema through Tamino API?

Dear All,

Is it possible to manipulate tamino schema (i.e. generate, define, update, delete tamino schema) via Tamino API code directly and instantly , instead of using Tamino Schema Editor?

I couldn’t find any example in API docs or forum posts, but we need to complete all these functions in our system without the helping of the GUI Tool. Is there any advice or tips? Thanks very much!!

Hi,

The interface TSchemaDefinition3Accessor is supposed for the access of TSD3 schemas stored in Tamino. The method “newSchemaDefinition3Accessor” of a connection creates an instance of it.

Use the method “getSchema” of the TSchemaDefinition3Accessor to get a schema or set of schemas. You can use the returned TResponse object to obtain a TXMLObjectIterator to iterate over the result set of TXMLObject instances each representing a TSD3 schema. These can be manipulated as all other TXMLObject instances.

The “define” method defines or updates a schema,“undefine” allows to delete a schema.

Best regards,
Oliver Kleber

Thanks a lot, Oliver! <I’m Kung’s partner. :slight_smile: >

Could I ask two more newbie questions,please:

1. Does the “define” method of TSchemaDefinition3Accessor accept only a “Tamino schema definition file”(.TSD)?

2. “The define method defines or updates a schema”=> So, “define a schema whose name is alreay existing in Tamino DB” means to update it? Do I have to drop all the xml documents under this schema?

3. Is there any SQL-like “DDL” of Tamino Schema? Could we create Tamino schema by run-time (DDL) coding instead of defining/importing a pre-prepared schema definition file? If not, could it possibly be expected?

Thanks very much for your help!

Hi.

1. The define method needs a TXMLObject instance. You can create this in various ways: construct it manually, from another object, from a file, a reader, a stream or a string. Please look at the newInstance methods of TXMLObject. The extension of the file is unimportant.

2. As long as your new schema is “update compatible” to your old one, it is not necessary to drop the xml documents under this schema. For more information which modifications are allowed, see the section “Schema Modifications” in the “Tamino XML Schema User Guide”. You can test this by using the define method with a TDefineMode parameter. But please note, that the usage of this method is documented as for Software AG internal use only.

3. Please ask this question in the forum “Schema Editor, Tamino Schema”. There are the experts for this topic.


Best regards,
Oliver Kleber

Hi Oliver,

Thanks again!

I got the picture now,thanks for the detailed explanation which provides lots of info, it really helps a lot! :slight_smile:

Thanks & Regards,
Wang