xContentIdentifierFactory.createContentIdentifier("vnd.sun.star.tdoc:/1");
// get content
XContent xContent = xContentProvider.queryContent(xContentIdentifier);
// actual test: commands to get some properties
XCommandProcessor xCommandProcessor = (XCommandProcessor)UnoRuntime.queryInterface(XCommandProcessor.class, xContent);
// build up the command
Command command = new Command();
command.Name = "getPropertySetInfo";
command.Handle = -1;
// execute the command
Object result = xCommandProcessor.execute(command, 0, null);
// check the result
log.println("Result: "+ result.getClass().toString());
XPropertySetInfo xPropertySetInfo = (XPropertySetInfo)UnoRuntime.queryInterface(XPropertySetInfo.class, result);
Property[] props = xPropertySetInfo.getProperties();
boolean res = false;
for(int i=0; i<props.length; i++) {
String propName = props[i].Name;
res |= propName.equals("DocumentModel");
log.println("Found property: " + propName + " type: " + props[i].Type.getTypeName());
}
assure("Did not find property 'DocumentModel' in the Property array.", res);
// get on property
command.Name = "getPropertyValues";
command.Handle = -1;
Property[] prop = new Property[1];
prop[0] = new Property();
prop[0].Name = "DocumentModel";
prop[0].Handle = -1;
command.Argument = prop;
// execute the command
result = xCommandProcessor.execute(command, 0, null);
// check the result
log.println("Result: "+ result.getClass().toString());
XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class, result);