本文整理汇总了Java中org.pentaho.di.repository.RepositoryObject.getName方法的典型用法代码示例。如果您正苦于以下问题:Java RepositoryObject.getName方法的具体用法?Java RepositoryObject.getName怎么用?Java RepositoryObject.getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.repository.RepositoryObject
的用法示例。
在下文中一共展示了RepositoryObject.getName方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: selectJob
import org.pentaho.di.repository.RepositoryObject; //导入方法依赖的package包/类
private void selectJob() {
RepositoryObject repositoryObject = DialogHelper.selectRepositoryObject( "*.kjb", log );
if ( repositoryObject != null ) {
String path = DialogUtils
.getPath( jobMeta.getRepositoryDirectory().getPath(), repositoryObject.getRepositoryDirectory().getPath() );
String fullPath = ( path.equals( "/" ) ? "/" : path + "/" ) + repositoryObject.getName();
wPath.setText( fullPath );
}
}
示例2: selectTransformation
import org.pentaho.di.repository.RepositoryObject; //导入方法依赖的package包/类
private void selectTransformation() {
RepositoryObject repositoryObject = DialogHelper.selectRepositoryObject( "*.ktr", log );
if ( repositoryObject != null ) {
String path = DialogUtils
.getPath( jobMeta.getRepositoryDirectory().getPath(), repositoryObject.getRepositoryDirectory().getPath() );
String fullPath = ( path.equals( "/" ) ? "/" : path + "/" ) + repositoryObject.getName();
wPath.setText( fullPath );
}
}
示例3: getXML
import org.pentaho.di.repository.RepositoryObject; //导入方法依赖的package包/类
public String getXML() {
StringBuffer retval = new StringBuffer(200);
retval.append(super.getXML());
// specificationMethod
//
retval.append(" ").append(XMLHandler.addTagValue("specification_method", specificationMethod == null ? null : specificationMethod.getCode()));
retval.append(" ").append(XMLHandler.addTagValue("job_object_id", jobObjectId == null ? null : jobObjectId.toString()));
// Export a little bit of extra information regarding the reference since it doesn't really matter outside the same repository.
//
if (rep!=null && jobObjectId!=null) {
try {
RepositoryObject objectInformation = rep.getObjectInformation(jobObjectId, RepositoryObjectType.JOB);
if (objectInformation!=null) {
jobname = objectInformation.getName();
directory = objectInformation.getRepositoryDirectory().getPath();
}
} catch(KettleException e) {
// Ignore object reference problems. It simply means that the reference is no longer valid.
}
}
retval.append(" ").append(XMLHandler.addTagValue("filename", filename));
retval.append(" ").append(XMLHandler.addTagValue("jobname", jobname));
if (directory != null) {
retval.append(" ").append(XMLHandler.addTagValue("directory", directory));
} else if (directoryPath != null) {
retval.append(" ").append(XMLHandler.addTagValue("directory", directoryPath));
}
retval.append(" ").append(XMLHandler.addTagValue("arg_from_previous", argFromPrevious));
retval.append(" ").append(XMLHandler.addTagValue("params_from_previous", paramsFromPrevious));
retval.append(" ").append(XMLHandler.addTagValue("exec_per_row", execPerRow));
retval.append(" ").append(XMLHandler.addTagValue("set_logfile", setLogfile));
retval.append(" ").append(XMLHandler.addTagValue("logfile", logfile));
retval.append(" ").append(XMLHandler.addTagValue("logext", logext));
retval.append(" ").append(XMLHandler.addTagValue("add_date", addDate));
retval.append(" ").append(XMLHandler.addTagValue("add_time", addTime));
retval.append(" ").append(XMLHandler.addTagValue("loglevel", logFileLevel != null ? logFileLevel.getCode() : DEFAULT_LOG_LEVEL.getCode()));
retval.append(" ").append(XMLHandler.addTagValue("slave_server_name", remoteSlaveServerName));
retval.append(" ").append(XMLHandler.addTagValue("wait_until_finished", waitingToFinish));
retval.append(" ").append(XMLHandler.addTagValue("follow_abort_remote", followingAbortRemotely));
retval.append(" ").append(XMLHandler.addTagValue("create_parent_folder", createParentFolder));
retval.append(" ").append(XMLHandler.addTagValue("pass_export", passingExport));
if (arguments != null) {
for (int i = 0; i < arguments.length; i++) {
// This is a very very bad way of making an XML file, don't use it (or
// copy it). Sven Boden
retval.append(" ").append(XMLHandler.addTagValue("argument" + i, arguments[i]));
}
}
if (parameters != null) {
retval.append(" ").append(XMLHandler.openTag("parameters"));
retval.append(" ").append(XMLHandler.addTagValue("pass_all_parameters", passingAllParameters));
for (int i = 0; i < parameters.length; i++) {
// This is a better way of making the XML file than the arguments.
retval.append(" ").append(XMLHandler.openTag("parameter"));
retval.append(" ").append(XMLHandler.addTagValue("name", parameters[i]));
retval.append(" ").append(XMLHandler.addTagValue("stream_name", parameterFieldNames[i]));
retval.append(" ").append(XMLHandler.addTagValue("value", parameterValues[i]));
retval.append(" ").append(XMLHandler.closeTag("parameter"));
}
retval.append(" ").append(XMLHandler.closeTag("parameters"));
}
retval.append(" ").append(XMLHandler.addTagValue("set_append_logfile", setAppendLogfile));
return retval.toString();
}
示例4: getXML
import org.pentaho.di.repository.RepositoryObject; //导入方法依赖的package包/类
public String getXML() {
StringBuffer retval = new StringBuffer(300);
retval.append(super.getXML());
// specificationMethod
//
retval.append(" ").append(XMLHandler.addTagValue("specification_method", specificationMethod == null ? null : specificationMethod.getCode()));
retval.append(" ").append(XMLHandler.addTagValue("trans_object_id", transObjectId == null ? null : transObjectId.toString()));
// Export a little bit of extra information regarding the reference since it doesn't really matter outside the same repository.
//
if (rep!=null && transObjectId!=null) {
try {
RepositoryObject objectInformation = rep.getObjectInformation(transObjectId, RepositoryObjectType.TRANSFORMATION);
if (objectInformation!=null) {
transname = objectInformation.getName();
directory = objectInformation.getRepositoryDirectory().getPath();
}
} catch(KettleException e) {
// Ignore object reference problems. It simply means that the reference is no longer valid.
}
}
retval.append(" ").append(XMLHandler.addTagValue("filename", filename));
retval.append(" ").append(XMLHandler.addTagValue("transname", transname));
if (directory != null) {
retval.append(" ").append(XMLHandler.addTagValue("directory", directory));
} else if (directoryPath != null) {
// don't loose this info (backup/recovery)
//
retval.append(" ").append(XMLHandler.addTagValue("directory", directoryPath));
}
retval.append(" ").append(XMLHandler.addTagValue("arg_from_previous", argFromPrevious));
retval.append(" ").append(XMLHandler.addTagValue("params_from_previous", paramsFromPrevious));
retval.append(" ").append(XMLHandler.addTagValue("exec_per_row", execPerRow));
retval.append(" ").append(XMLHandler.addTagValue("clear_rows", clearResultRows));
retval.append(" ").append(XMLHandler.addTagValue("clear_files", clearResultFiles));
retval.append(" ").append(XMLHandler.addTagValue("set_logfile", setLogfile));
retval.append(" ").append(XMLHandler.addTagValue("logfile", logfile));
retval.append(" ").append(XMLHandler.addTagValue("logext", logext));
retval.append(" ").append(XMLHandler.addTagValue("add_date", addDate));
retval.append(" ").append(XMLHandler.addTagValue("add_time", addTime));
retval.append(" ").append(XMLHandler.addTagValue("loglevel", logFileLevel!=null ? logFileLevel.getCode() : null));
retval.append(" ").append(XMLHandler.addTagValue("cluster", clustering));
retval.append(" ").append(XMLHandler.addTagValue("slave_server_name", remoteSlaveServerName));
retval.append(" ").append(XMLHandler.addTagValue("set_append_logfile", setAppendLogfile));
retval.append(" ").append(XMLHandler.addTagValue("wait_until_finished", waitingToFinish));
retval.append(" ").append(XMLHandler.addTagValue("follow_abort_remote", followingAbortRemotely));
retval.append(" ").append(XMLHandler.addTagValue("create_parent_folder", createParentFolder));
if (arguments != null)
for (int i = 0; i < arguments.length; i++) {
// This is a very very bad way of making an XML file, don't use it (or
// copy it). Sven Boden
retval.append(" ").append(XMLHandler.addTagValue("argument" + i, arguments[i]));
}
if (parameters != null) {
retval.append(" ").append(XMLHandler.openTag("parameters"));
retval.append(" ").append(XMLHandler.addTagValue("pass_all_parameters", passingAllParameters));
for (int i = 0; i < parameters.length; i++) {
// This is a better way of making the XML file than the arguments.
retval.append(" ").append(XMLHandler.openTag("parameter"));
retval.append(" ").append(XMLHandler.addTagValue("name", parameters[i]));
retval.append(" ").append(XMLHandler.addTagValue("stream_name", parameterFieldNames[i]));
retval.append(" ").append(XMLHandler.addTagValue("value", parameterValues[i]));
retval.append(" ").append(XMLHandler.closeTag("parameter"));
}
retval.append(" ").append(XMLHandler.closeTag("parameters"));
}
return retval.toString();
}
示例5: getXML
import org.pentaho.di.repository.RepositoryObject; //导入方法依赖的package包/类
public String getXML() {
StringBuffer retval = new StringBuffer(300);
retval.append(" ").append(XMLHandler.addTagValue("specification_method", specificationMethod == null ? null : specificationMethod.getCode()));
retval.append(" ").append(XMLHandler.addTagValue("trans_object_id", transObjectId == null ? null : transObjectId.toString()));
// Export a little bit of extra information regarding the reference since it doesn't really matter outside the same repository.
//
if (repository!=null && transObjectId!=null) {
try {
RepositoryObject objectInformation = repository.getObjectInformation(transObjectId, RepositoryObjectType.TRANSFORMATION);
if (objectInformation!=null) {
transName = objectInformation.getName();
directoryPath = objectInformation.getRepositoryDirectory().getPath();
}
} catch(KettleException e) {
// Ignore object reference problems. It simply means that the reference is no longer valid.
}
}
retval.append(" ").append(XMLHandler.addTagValue("trans_name", transName)); //$NON-NLS-1$
retval.append(" ").append(XMLHandler.addTagValue("filename", fileName)); //$NON-NLS-1$
retval.append(" ").append(XMLHandler.addTagValue("directory_path", directoryPath)); //$NON-NLS-1$
retval.append(" ").append(XMLHandler.openTag("mappings")).append(Const.CR); //$NON-NLS-1$ $NON-NLS-2$
retval.append(" ").append(XMLHandler.openTag("input")).append(Const.CR); //$NON-NLS-1$ $NON-NLS-2$
for (int i = 0; i < inputMappings.size(); i++) {
retval.append(inputMappings.get(i).getXML());
}
retval.append(" ").append(XMLHandler.closeTag("input")).append(Const.CR); //$NON-NLS-1$ $NON-NLS-2$
retval.append(" ").append(XMLHandler.openTag("output")).append(Const.CR); //$NON-NLS-1$ $NON-NLS-2$
for (int i = 0; i < outputMappings.size(); i++) {
retval.append(outputMappings.get(i).getXML());
}
retval.append(" ").append(XMLHandler.closeTag("output")).append(Const.CR); //$NON-NLS-1$ $NON-NLS-2$
// Add the mapping parameters too
//
retval.append(" ").append(mappingParameters.getXML()).append(Const.CR); //$NON-NLS-1$
retval.append(" ").append(XMLHandler.closeTag("mappings")).append(Const.CR); //$NON-NLS-1$ $NON-NLS-2$
retval.append(" ").append(XMLHandler.addTagValue("allow_multiple_input", allowingMultipleInputs)); //$NON-NLS-1$
retval.append(" ").append(XMLHandler.addTagValue("allow_multiple_output", allowingMultipleOutputs)); //$NON-NLS-1$
return retval.toString();
}
示例6: getXML
import org.pentaho.di.repository.RepositoryObject; //导入方法依赖的package包/类
public String getXML() {
StringBuffer retval = new StringBuffer(300);
retval.append(" ").append(XMLHandler.addTagValue("specification_method", specificationMethod == null ? null : specificationMethod.getCode()));
retval.append(" ").append(XMLHandler.addTagValue("trans_object_id", transObjectId == null ? null : transObjectId.toString()));
// Export a little bit of extra information regarding the reference since it doesn't really matter outside the same repository.
//
if (repository!=null && transObjectId!=null) {
try {
RepositoryObject objectInformation = repository.getObjectInformation(transObjectId, RepositoryObjectType.TRANSFORMATION);
if (objectInformation!=null) {
transName = objectInformation.getName();
directoryPath = objectInformation.getRepositoryDirectory().getPath();
}
} catch(KettleException e) {
// Ignore object reference problems. It simply means that the reference is no longer valid.
}
}
retval.append(" ").append(XMLHandler.addTagValue("trans_name", transName)); //$NON-NLS-1$
retval.append(" ").append(XMLHandler.addTagValue("filename", fileName)); //$NON-NLS-1$
retval.append(" ").append(XMLHandler.addTagValue("directory_path", directoryPath)); //$NON-NLS-1$
retval.append(" ").append(XMLHandler.addTagValue("batch_size", batchSize)); //$NON-NLS-1$
retval.append(" ").append(XMLHandler.addTagValue("batch_time", batchTime)); //$NON-NLS-1$
retval.append(" ").append(XMLHandler.addTagValue("inject_step", injectStep)); //$NON-NLS-1$
retval.append(" ").append(XMLHandler.addTagValue("retrieve_step", retrieveStep)); //$NON-NLS-1$
if (parameters != null) {
retval.append(" ").append(XMLHandler.openTag("parameters"));
retval.append(" ").append(XMLHandler.addTagValue("pass_all_parameters", passingAllParameters));
for (int i = 0; i < parameters.length; i++) {
// This is a better way of making the XML file than the arguments.
retval.append(" ").append(XMLHandler.openTag("parameter"));
retval.append(" ").append(XMLHandler.addTagValue("name", parameters[i]));
retval.append(" ").append(XMLHandler.addTagValue("value", parameterValues[i]));
retval.append(" ").append(XMLHandler.closeTag("parameter"));
}
retval.append(" ").append(XMLHandler.closeTag("parameters"));
}
return retval.toString();
}
示例7: getXML
import org.pentaho.di.repository.RepositoryObject; //导入方法依赖的package包/类
public String getXML() {
StringBuffer retval = new StringBuffer(200);
retval.append(super.getXML());
// specificationMethod
//
retval.append(" ").append(XMLHandler.addTagValue("specification_method", specificationMethod == null ? null : specificationMethod.getCode()));
retval.append(" ").append(XMLHandler.addTagValue("job_object_id", jobObjectId == null ? null : jobObjectId.toString()));
// Export a little bit of extra information regarding the reference since it doesn't really matter outside the same repository.
//
if (rep!=null && jobObjectId!=null) {
try {
RepositoryObject objectInformation = rep.getObjectInformation(jobObjectId, RepositoryObjectType.JOB);
if (objectInformation!=null) {
jobname = objectInformation.getName();
directory = objectInformation.getRepositoryDirectory().getPath();
}
} catch(KettleException e) {
// Ignore object reference problems. It simply means that the reference is no longer valid.
}
}
retval.append(" ").append(XMLHandler.addTagValue("filename", filename));
retval.append(" ").append(XMLHandler.addTagValue("jobname", jobname));
if (directory != null) {
retval.append(" ").append(XMLHandler.addTagValue("directory", directory));
} else if (directoryPath != null) {
retval.append(" ").append(XMLHandler.addTagValue("directory", directoryPath));
}
retval.append(" ").append(XMLHandler.addTagValue("arg_from_previous", argFromPrevious));
retval.append(" ").append(XMLHandler.addTagValue("params_from_previous", paramsFromPrevious));
retval.append(" ").append(XMLHandler.addTagValue("exec_per_row", execPerRow));
retval.append(" ").append(XMLHandler.addTagValue("set_logfile", setLogfile));
retval.append(" ").append(XMLHandler.addTagValue("logfile", logfile));
retval.append(" ").append(XMLHandler.addTagValue("logext", logext));
retval.append(" ").append(XMLHandler.addTagValue("add_date", addDate));
retval.append(" ").append(XMLHandler.addTagValue("add_time", addTime));
retval.append(" ").append(XMLHandler.addTagValue("loglevel", logFileLevel != null ? logFileLevel.getCode() : DEFAULT_LOG_LEVEL.getCode()));
retval.append(" ").append(XMLHandler.addTagValue("slave_server_name", remoteSlaveServerName));
retval.append(" ").append(XMLHandler.addTagValue("wait_until_finished", waitingToFinish));
retval.append(" ").append(XMLHandler.addTagValue("follow_abort_remote", followingAbortRemotely));
retval.append(" ").append(XMLHandler.addTagValue("create_parent_folder", createParentFolder));
retval.append(" ").append(XMLHandler.addTagValue("pass_export", passingExport));
retval.append(" ").append(XMLHandler.addTagValue("force_separate_logging", forcingSeparateLogging));
if (arguments != null) {
for (int i = 0; i < arguments.length; i++) {
// This is a very very bad way of making an XML file, don't use it (or
// copy it). Sven Boden
retval.append(" ").append(XMLHandler.addTagValue("argument" + i, arguments[i]));
}
}
if (parameters != null) {
retval.append(" ").append(XMLHandler.openTag("parameters"));
retval.append(" ").append(XMLHandler.addTagValue("pass_all_parameters", passingAllParameters));
for (int i = 0; i < parameters.length; i++) {
// This is a better way of making the XML file than the arguments.
retval.append(" ").append(XMLHandler.openTag("parameter"));
retval.append(" ").append(XMLHandler.addTagValue("name", parameters[i]));
retval.append(" ").append(XMLHandler.addTagValue("stream_name", parameterFieldNames[i]));
retval.append(" ").append(XMLHandler.addTagValue("value", parameterValues[i]));
retval.append(" ").append(XMLHandler.closeTag("parameter"));
}
retval.append(" ").append(XMLHandler.closeTag("parameters"));
}
retval.append(" ").append(XMLHandler.addTagValue("set_append_logfile", setAppendLogfile));
return retval.toString();
}
示例8: getXML
import org.pentaho.di.repository.RepositoryObject; //导入方法依赖的package包/类
public String getXML() {
StringBuffer retval = new StringBuffer(300);
retval.append(" ").append(XMLHandler.addTagValue("specification_method", specificationMethod == null ? null : specificationMethod.getCode()));
retval.append(" ").append(XMLHandler.addTagValue("job_object_id", jobObjectId == null ? null : jobObjectId.toString()));
// Export a little bit of extra information regarding the reference since it doesn't really matter outside the same repository.
//
if (repository!=null && jobObjectId!=null) {
try {
RepositoryObject objectInformation = repository.getObjectInformation(jobObjectId, RepositoryObjectType.TRANSFORMATION);
if (objectInformation!=null) {
jobName = objectInformation.getName();
directoryPath = objectInformation.getRepositoryDirectory().getPath();
}
} catch(KettleException e) {
// Ignore object reference problems. It simply means that the reference is no longer valid.
}
}
retval.append(" ").append(XMLHandler.addTagValue("job_name", jobName)); //$NON-NLS-1$
retval.append(" ").append(XMLHandler.addTagValue("filename", fileName)); //$NON-NLS-1$
retval.append(" ").append(XMLHandler.addTagValue("directory_path", directoryPath)); //$NON-NLS-1$
retval.append(" ").append(XMLHandler.addTagValue("group_size", groupSize)); //$NON-NLS-1$
retval.append(" ").append(XMLHandler.addTagValue("group_field", groupField)); //$NON-NLS-1$
retval.append(" ").append(XMLHandler.addTagValue("group_time", groupTime)); //$NON-NLS-1$
// Add the mapping parameters too
//
retval.append(" ").append(parameters.getXML()).append(Const.CR); //$NON-NLS-1$
// The output side...
//
retval.append(" ").append(XMLHandler.addTagValue("execution_result_target_step", executionResultTargetStepMeta==null ? null : executionResultTargetStepMeta.getName())); //$NON-NLS-1$ //$NON-NLS-2$
retval.append(" ").append(XMLHandler.addTagValue("execution_time_field", executionTimeField)); //$NON-NLS-1$ //$NON-NLS-2$
retval.append(" ").append(XMLHandler.addTagValue("execution_result_field", executionResultField)); //$NON-NLS-1$ //$NON-NLS-2$
retval.append(" ").append(XMLHandler.addTagValue("execution_errors_field", executionNrErrorsField)); //$NON-NLS-1$ //$NON-NLS-2$
retval.append(" ").append(XMLHandler.addTagValue("execution_lines_read_field", executionLinesReadField)); //$NON-NLS-1$ //$NON-NLS-2$
retval.append(" ").append(XMLHandler.addTagValue("execution_lines_written_field", executionLinesWrittenField)); //$NON-NLS-1$ //$NON-NLS-2$
retval.append(" ").append(XMLHandler.addTagValue("execution_lines_input_field", executionLinesInputField)); //$NON-NLS-1$ //$NON-NLS-2$
retval.append(" ").append(XMLHandler.addTagValue("execution_lines_output_field", executionLinesOutputField)); //$NON-NLS-1$ //$NON-NLS-2$
retval.append(" ").append(XMLHandler.addTagValue("execution_lines_rejected_field", executionLinesRejectedField)); //$NON-NLS-1$ //$NON-NLS-2$
retval.append(" ").append(XMLHandler.addTagValue("execution_lines_updated_field", executionLinesUpdatedField)); //$NON-NLS-1$ //$NON-NLS-2$
retval.append(" ").append(XMLHandler.addTagValue("execution_lines_deleted_field", executionLinesDeletedField)); //$NON-NLS-1$ //$NON-NLS-2$
retval.append(" ").append(XMLHandler.addTagValue("execution_files_retrieved_field", executionFilesRetrievedField)); //$NON-NLS-1$ //$NON-NLS-2$
retval.append(" ").append(XMLHandler.addTagValue("execution_exit_status_field", executionExitStatusField)); //$NON-NLS-1$ //$NON-NLS-2$
retval.append(" ").append(XMLHandler.addTagValue("execution_log_text_field", executionLogTextField)); //$NON-NLS-1$ //$NON-NLS-2$
retval.append(" ").append(XMLHandler.addTagValue("execution_log_channelid_field", executionLogChannelIdField)); //$NON-NLS-1$ //$NON-NLS-2$
retval.append(" ").append(XMLHandler.addTagValue("result_rows_target_step", resultRowsTargetStepMeta==null ? null : resultRowsTargetStepMeta.getName())); //$NON-NLS-1$ //$NON-NLS-2$
for (int i=0;i<resultRowsField.length;i++) {
retval.append(" ").append(XMLHandler.openTag("result_rows_field"));
retval.append(XMLHandler.addTagValue("name", resultRowsField[i], false)); //$NON-NLS-1$
retval.append(XMLHandler.addTagValue("type", ValueMeta.getTypeDesc(resultRowsType[i]), false)); //$NON-NLS-1$
retval.append(XMLHandler.addTagValue("length", resultRowsLength[i], false)); //$NON-NLS-1$
retval.append(XMLHandler.addTagValue("precision", resultRowsPrecision[i], false)); //$NON-NLS-1$
retval.append(XMLHandler.closeTag("result_rows_field")).append(Const.CR);
}
retval.append(" ").append(XMLHandler.addTagValue("result_files_target_step", resultFilesTargetStepMeta==null ? null : resultFilesTargetStepMeta.getName())); //$NON-NLS-1$ //$NON-NLS-2$
retval.append(" ").append(XMLHandler.addTagValue("result_files_file_name_field", resultFilesFileNameField)); //$NON-NLS-1$ //$NON-NLS-2$
return retval.toString();
}
示例9: getXML
import org.pentaho.di.repository.RepositoryObject; //导入方法依赖的package包/类
public String getXML() {
StringBuilder retval = new StringBuilder( 300 );
retval.append( " " ).append(
XMLHandler.addTagValue( "specification_method", specificationMethod == null ? null : specificationMethod
.getCode() ) );
retval.append( " " ).append(
XMLHandler.addTagValue( "trans_object_id", transObjectId == null ? null : transObjectId.toString() ) );
// Export a little bit of extra information regarding the reference since it doesn't really matter outside the same
// repository.
//
if ( repository != null && transObjectId != null ) {
try {
RepositoryObject objectInformation =
repository.getObjectInformation( transObjectId, RepositoryObjectType.TRANSFORMATION );
if ( objectInformation != null ) {
transName = objectInformation.getName();
directoryPath = objectInformation.getRepositoryDirectory().getPath();
}
} catch ( KettleException e ) {
// Ignore object reference problems. It simply means that the reference is no longer valid.
}
}
retval.append( " " ).append( XMLHandler.addTagValue( "trans_name", transName ) );
retval.append( " " ).append( XMLHandler.addTagValue( "filename", fileName ) );
retval.append( " " ).append( XMLHandler.addTagValue( "directory_path", directoryPath ) );
retval.append( " " ).append( XMLHandler.openTag( "mappings" ) ).append( Const.CR );
retval.append( " " ).append( XMLHandler.openTag( "input" ) ).append( Const.CR );
for ( int i = 0; i < inputMappings.size(); i++ ) {
retval.append( inputMappings.get( i ).getXML() );
}
retval.append( " " ).append( XMLHandler.closeTag( "input" ) ).append( Const.CR );
retval.append( " " ).append( XMLHandler.openTag( "output" ) ).append( Const.CR );
for ( int i = 0; i < outputMappings.size(); i++ ) {
retval.append( outputMappings.get( i ).getXML() );
}
retval.append( " " ).append( XMLHandler.closeTag( "output" ) ).append( Const.CR );
// Add the mapping parameters too
//
retval.append( " " ).append( mappingParameters.getXML() ).append( Const.CR );
retval.append( " " ).append( XMLHandler.closeTag( "mappings" ) ).append( Const.CR );
retval.append( " " ).append( XMLHandler.addTagValue( "allow_multiple_input", allowingMultipleInputs ) );
retval.append( " " ).append( XMLHandler.addTagValue( "allow_multiple_output", allowingMultipleOutputs ) );
return retval.toString();
}
示例10: getXML
import org.pentaho.di.repository.RepositoryObject; //导入方法依赖的package包/类
public String getXML() {
StringBuilder retval = new StringBuilder( 300 );
retval.append( " " ).append( XMLHandler.addTagValue( "specification_method", specificationMethod == null ? null
: specificationMethod.getCode() ) );
retval.append( " " ).append( XMLHandler.addTagValue( "trans_object_id", transObjectId == null ? null
: transObjectId.toString() ) );
// Export a little bit of extra information regarding the reference since it doesn't really matter outside the same
// repository.
//
if ( repository != null && transObjectId != null ) {
try {
RepositoryObject objectInformation =
repository.getObjectInformation( transObjectId, RepositoryObjectType.TRANSFORMATION );
if ( objectInformation != null ) {
transName = objectInformation.getName();
directoryPath = objectInformation.getRepositoryDirectory().getPath();
}
} catch ( KettleException e ) {
// Ignore object reference problems. It simply means that the reference is no longer valid.
}
}
retval.append( " " ).append( XMLHandler.addTagValue( "trans_name", transName ) );
retval.append( " " ).append( XMLHandler.addTagValue( "filename", fileName ) );
retval.append( " " ).append( XMLHandler.addTagValue( "directory_path", directoryPath ) );
retval.append( " " ).append( XMLHandler.addTagValue( "group_size", groupSize ) );
retval.append( " " ).append( XMLHandler.addTagValue( "group_field", groupField ) );
retval.append( " " ).append( XMLHandler.addTagValue( "group_time", groupTime ) );
// Add the mapping parameters too
//
retval.append( " " ).append( parameters.getXML() ).append( Const.CR );
// The output side...
//
retval.append( " " ).append( XMLHandler.addTagValue( F_EXECUTION_RESULT_TARGET_STEP,
executionResultTargetStepMeta == null ? null : executionResultTargetStepMeta.getName() ) );
retval.append( " " ).append( XMLHandler.addTagValue( "execution_time_field", executionTimeField ) );
retval.append( " " ).append( XMLHandler.addTagValue( "execution_result_field", executionResultField ) );
retval.append( " " ).append( XMLHandler.addTagValue( "execution_errors_field", executionNrErrorsField ) );
retval.append( " " ).append( XMLHandler.addTagValue( "execution_lines_read_field", executionLinesReadField ) );
retval.append( " " ).append( XMLHandler.addTagValue( "execution_lines_written_field",
executionLinesWrittenField ) );
retval.append( " " ).append( XMLHandler.addTagValue( "execution_lines_input_field", executionLinesInputField ) );
retval.append( " " ).append( XMLHandler.addTagValue( "execution_lines_output_field",
executionLinesOutputField ) );
retval.append( " " ).append( XMLHandler.addTagValue( "execution_lines_rejected_field",
executionLinesRejectedField ) );
retval.append( " " ).append( XMLHandler.addTagValue( "execution_lines_updated_field",
executionLinesUpdatedField ) );
retval.append( " " ).append( XMLHandler.addTagValue( "execution_lines_deleted_field",
executionLinesDeletedField ) );
retval.append( " " ).append( XMLHandler.addTagValue( "execution_files_retrieved_field",
executionFilesRetrievedField ) );
retval.append( " " ).append( XMLHandler.addTagValue( "execution_exit_status_field", executionExitStatusField ) );
retval.append( " " ).append( XMLHandler.addTagValue( "execution_log_text_field", executionLogTextField ) );
retval.append( " " ).append( XMLHandler.addTagValue( "execution_log_channelid_field",
executionLogChannelIdField ) );
retval.append( " " ).append( XMLHandler.addTagValue( "result_rows_target_step", outputRowsSourceStepMeta == null
? null : outputRowsSourceStepMeta.getName() ) );
for ( int i = 0; i < outputRowsField.length; i++ ) {
retval.append( " " ).append( XMLHandler.openTag( "result_rows_field" ) );
retval.append( XMLHandler.addTagValue( "name", outputRowsField[i], false ) );
retval.append( XMLHandler.addTagValue( "type", ValueMetaFactory.getValueMetaName( outputRowsType[i] ), false ) );
retval.append( XMLHandler.addTagValue( "length", outputRowsLength[i], false ) );
retval.append( XMLHandler.addTagValue( "precision", outputRowsPrecision[i], false ) );
retval.append( XMLHandler.closeTag( "result_rows_field" ) ).append( Const.CR );
}
retval.append( " " ).append( XMLHandler.addTagValue( F_RESULT_FILE_TARGET_STEP, resultFilesTargetStepMeta == null
? null : resultFilesTargetStepMeta.getName() ) );
retval.append( " " ).append( XMLHandler.addTagValue( "result_files_file_name_field",
resultFilesFileNameField ) );
retval.append( " " ).append( XMLHandler.addTagValue( F_EXECUTOR_OUTPUT_STEP, executorsOutputStepMeta == null
? null : executorsOutputStepMeta.getName() ) );
return retval.toString();
}
示例11: getXML
import org.pentaho.di.repository.RepositoryObject; //导入方法依赖的package包/类
public String getXML() {
StringBuilder retval = new StringBuilder( 300 );
retval.append( " " ).append(
XMLHandler.addTagValue( "specification_method", specificationMethod == null ? null : specificationMethod
.getCode() ) );
retval.append( " " ).append(
XMLHandler.addTagValue( "trans_object_id", transObjectId == null ? null : transObjectId.toString() ) );
// Export a little bit of extra information regarding the reference since it doesn't really matter outside the same
// repository.
//
if ( repository != null && transObjectId != null ) {
try {
RepositoryObject objectInformation =
repository.getObjectInformation( transObjectId, RepositoryObjectType.TRANSFORMATION );
if ( objectInformation != null ) {
transName = objectInformation.getName();
directoryPath = objectInformation.getRepositoryDirectory().getPath();
}
} catch ( KettleException e ) {
// Ignore object reference problems. It simply means that the reference is no longer valid.
}
}
retval.append( " " ).append( XMLHandler.addTagValue( "trans_name", transName ) );
retval.append( " " ).append( XMLHandler.addTagValue( "filename", fileName ) );
retval.append( " " ).append( XMLHandler.addTagValue( "directory_path", directoryPath ) );
retval.append( " " ).append( XMLHandler.addTagValue( "batch_size", batchSize ) );
retval.append( " " ).append( XMLHandler.addTagValue( "batch_time", batchTime ) );
retval.append( " " ).append( XMLHandler.addTagValue( "inject_step", injectStep ) );
retval.append( " " ).append( XMLHandler.addTagValue( "retrieve_step", retrieveStep ) );
if ( parameters != null ) {
retval.append( " " ).append( XMLHandler.openTag( "parameters" ) );
retval.append( " " ).append( XMLHandler.addTagValue( "pass_all_parameters", passingAllParameters ) );
for ( int i = 0; i < parameters.length; i++ ) {
// This is a better way of making the XML file than the arguments.
retval.append( " " ).append( XMLHandler.openTag( "parameter" ) );
retval.append( " " ).append( XMLHandler.addTagValue( "name", parameters[i] ) );
retval.append( " " ).append( XMLHandler.addTagValue( "value", parameterValues[i] ) );
retval.append( " " ).append( XMLHandler.closeTag( "parameter" ) );
}
retval.append( " " ).append( XMLHandler.closeTag( "parameters" ) );
}
return retval.toString();
}
示例12: getXML
import org.pentaho.di.repository.RepositoryObject; //导入方法依赖的package包/类
public String getXML() {
StringBuilder retval = new StringBuilder( 300 );
retval.append( " " ).append(
XMLHandler.addTagValue( "specification_method", specificationMethod == null ? null : specificationMethod
.getCode() ) );
retval.append( " " ).append(
XMLHandler.addTagValue( "trans_object_id", transObjectId == null ? null : transObjectId.toString() ) );
// Export a little bit of extra information regarding the reference since it doesn't really matter outside the same
// repository.
//
if ( repository != null && transObjectId != null ) {
try {
RepositoryObject objectInformation =
repository.getObjectInformation( transObjectId, RepositoryObjectType.TRANSFORMATION );
if ( objectInformation != null ) {
transName = objectInformation.getName();
directoryPath = objectInformation.getRepositoryDirectory().getPath();
}
} catch ( KettleException e ) {
// Ignore object reference problems. It simply means that the reference is no longer valid.
}
}
retval.append( " " ).append( XMLHandler.addTagValue( "trans_name", transName ) );
retval.append( " " ).append( XMLHandler.addTagValue( "filename", fileName ) );
retval.append( " " ).append( XMLHandler.addTagValue( "directory_path", directoryPath ) );
retval.append( " " ).append( XMLHandler.openTag( "mappings" ) ).append( Const.CR );
retval.append( " " ).append( XMLHandler.openTag( "input" ) ).append( Const.CR );
retval.append( inputMapping.getXML() );
retval.append( " " ).append( XMLHandler.closeTag( "input" ) ).append( Const.CR );
retval.append( " " ).append( XMLHandler.openTag( "output" ) ).append( Const.CR );
retval.append( outputMapping.getXML() );
retval.append( " " ).append( XMLHandler.closeTag( "output" ) ).append( Const.CR );
// Add the mapping parameters too
//
retval.append( " " ).append( mappingParameters.getXML() ).append( Const.CR );
retval.append( " " ).append( XMLHandler.closeTag( "mappings" ) ).append( Const.CR );
return retval.toString();
}