How to change a normal file to DCR with datacapture by java program
I first suggest you get training.
Assuming the "normal file" is an XML in the proper format:
However there are external attributes on each DCR (you will learn of those in training). One will be called TeamSite/Templating/DCR/Type that needs to be set to the appropriate DCR type. That type is implementation specific.
You can use a CLT call iwextattr to set it. Or a Java app.
Thanks, it's just what I need, so what Java api can I call?
CSBinaryExtendedAttribute
public CSBinaryExtendedAttribute(java.lang.String name, byte[] value, long offset, int numBytes, boolean truncate)
Create a new CSBinaryExtendedAttribute with the specified name-value pair.
Parameters: name - the name of the extended attribute value - the value for the extended attribute offset - the offset from which to retrieve the extended attribute numBytes - the length of the extended attribute truncate - whether to truncate the extended attribute when setting the value