how to update the extracted metadata to the repository???
hi all,
i extracted documents from repository and metadata of corresponding objects in xml format to my local m/c.Now i need to update this metadata and upload it to other repository.. i am able to upload by setting some attributes as show in code....but how do i read each xml properties and update the values????pls give ur valuable suggestions!!!!!!!!!!
IDfClientX clientx = new DfClientX();
IDfImportOperation operation = clientx.getImportOperation();
operation.setSession( session );
IDfFolder folder = null;
folder = session.getFolderByPath( destFolderPath ); if( folder == null ) {
System.out.println("Folder or cabinet " + destFolderPath + " does not exist in the Docbase!");
return;
}
operation.setDestinationFolderId(folder.getObjectId()); IDfFile myFile = clientx.getFile( srcFileOrDir );
if( myFile.exists() == false ) {
System.out.println("File or directory " + srcFileOrDir + " does not exist in the file system!");
return;
}
IDfImportNode node = (IDfImportNode) operation.add( srcFileOrDir );
node.setNewObjectName("Import Folder");
operation.execute();
IDfList myNodes = operation.getNodes();
int iCount = myNodes.getCount();
System.out.println("Number of nodes after operation: " + iCount );
for( int i = 0; i < iCount; ++i ) {
IDfImportNode aNode = (IDfImportNode) myNodes.get(i);
IDfSysObject object=aNode.getNewObject();
object.setObjectName("Import_"+object.getObjectName()+"");
object.setTitle("testing");
object.setSubject("doImport");
object.setApplicationType("importing");
object.save();
System.out.print("Object ID " + i + ": " + aNode.getNewObjectId().toString() + " " );
System.out.println("Object name: file "+i+":"+object.getObjectName()+"");
}
}
Comments
-
task wrote:Now i need to update this metadata and upload it to other repository.
Did you consider using a plain dump and load feature, load your objects into other repository and then update metadata in the target repository using DQL/DFC/whatever...? This way you'd eliminate the unnecessary hop of exporting the data locally.
0 -
you can use Buldoser tool to export and import the Data along with the Meta-data.
In your case you need to use XML parser to read the XML file and then set the properties of the objects.
0
Categories
- All Categories
- 107 Developer Announcements
- 53 Articles
- 104 General Questions
- 141 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 898 Cloud Fax and Notifications
- 76 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 118 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management