IDataCursor idc = pipeline.getCursor(); IData doc = IDataFactory.create(); if (idc.first("document")) { doc = IDataUtil.getIData(idc,"document"); } else { throw new ServiceException("Parameter 'document' is required"); } //get a cursor for the "document" IData IDataCursor idcDoc = doc.getCursor(); //position the cursor to the first entry in the document. This should be another IData idcDoc.first(); //get the name of the key of the first entry in the "document" IData String docName = idcDoc.getKey(); //rename document removing prefix, if present. Changes the name of the child document in place. if (docName.indexOf(":") > 0) { idcDoc.setKey(docName.substring(docName.indexOf(":") + 1)); } idc.destroy();