当前位置: 首页>>代码示例>>Java>>正文


Java XMLHandler.getNodeValue方法代码示例

本文整理汇总了Java中org.pentaho.di.core.xml.XMLHandler.getNodeValue方法的典型用法代码示例。如果您正苦于以下问题:Java XMLHandler.getNodeValue方法的具体用法?Java XMLHandler.getNodeValue怎么用?Java XMLHandler.getNodeValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.pentaho.di.core.xml.XMLHandler的用法示例。


在下文中一共展示了XMLHandler.getNodeValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: loadXML

import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
public void loadXML(Node stepnode, List<DatabaseMeta> databases, Map<String, Counter> counters) throws KettleXMLException {
  try {

    includeRowNumber = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "rownum"));
    rowNumberField = XMLHandler.getTagValue(stepnode, "rownum_field");

    Node filenode = XMLHandler.getSubNode(stepnode, "file");
    int nrfiles = XMLHandler.countNodes(filenode, "directory");

    allocate(nrfiles);

    for (int i = 0; i < nrfiles; i++) {
      Node filenamenode = XMLHandler.getSubNodeByNr(filenode, "directory", i);
      Node filemasknode = XMLHandler.getSubNodeByNr(filenode, "name_mask", i);
      Node excludefilemasknode = XMLHandler.getSubNodeByNr(filenode, "exclude_name_mask", i);
      Node includeSubFoldersnode = XMLHandler.getSubNodeByNr(filenode, "include_subfolders", i);
      directory[i] = XMLHandler.getNodeValue(filenamenode);
      nameMask[i] = XMLHandler.getNodeValue(filemasknode);
      excludeNameMask[i] = XMLHandler.getNodeValue(excludefilemasknode);
      includeSubFolders[i] = "Y".equalsIgnoreCase( XMLHandler.getNodeValue(includeSubFoldersnode) );
    }
  } catch (Exception e) {
    throw new KettleXMLException("Unable to load step info from XML", e);
  }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:26,代码来源:GetRepositoryNamesMeta.java

示例2: XMLInputField

import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
public XMLInputField(Node fnode) throws KettleValueException
{
    setName( XMLHandler.getTagValue(fnode, "name") );
    setType( ValueMeta.getType(XMLHandler.getTagValue(fnode, "type")) );
    setFormat( XMLHandler.getTagValue(fnode, "format") );
    setCurrencySymbol( XMLHandler.getTagValue(fnode, "currency") );
    setDecimalSymbol( XMLHandler.getTagValue(fnode, "decimal") );
    setGroupSymbol( XMLHandler.getTagValue(fnode, "group") );
    setLength( Const.toInt(XMLHandler.getTagValue(fnode, "length"), -1) );
    setPrecision( Const.toInt(XMLHandler.getTagValue(fnode, "precision"), -1) );
    setTrimType( getTrimTypeByCode(XMLHandler.getTagValue(fnode, "trim_type")) );
    setRepeated( !"N".equalsIgnoreCase(XMLHandler.getTagValue(fnode, "repeat")) ); 
    
    Node positions = XMLHandler.getSubNode(fnode, "positions");
    int nrPositions = XMLHandler.countNodes(positions, "position");
    
    fieldPosition = new XMLInputFieldPosition[nrPositions];
    
    for (int i=0;i<nrPositions;i++)
    {
        Node positionnode = XMLHandler.getSubNodeByNr(positions, "position", i); 
        String encoded = XMLHandler.getNodeValue(positionnode);
        fieldPosition[i] = new XMLInputFieldPosition(encoded);
    }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:26,代码来源:XMLInputField.java

示例3: ClusterSchema

import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
public ClusterSchema(Node clusterSchemaNode, List<SlaveServer> referenceSlaveServers)
{
    this();
    
    name = XMLHandler.getTagValue(clusterSchemaNode, "name"); //$NON-NLS-1$
    basePort = XMLHandler.getTagValue(clusterSchemaNode, "base_port"); //$NON-NLS-1$
    socketsBufferSize = XMLHandler.getTagValue(clusterSchemaNode, "sockets_buffer_size"); //$NON-NLS-1$
    socketsFlushInterval = XMLHandler.getTagValue(clusterSchemaNode, "sockets_flush_interval"); //$NON-NLS-1$
    socketsCompressed = "Y".equalsIgnoreCase(  XMLHandler.getTagValue(clusterSchemaNode, "sockets_compressed") ); //$NON-NLS-1$ //$NON-NLS-2$
    dynamic = "Y".equalsIgnoreCase(  XMLHandler.getTagValue(clusterSchemaNode, "dynamic") ); //$NON-NLS-1$ //$NON-NLS-2$
    
    Node slavesNode = XMLHandler.getSubNode(clusterSchemaNode, "slaveservers"); //$NON-NLS-1$
    int nrSlaves = XMLHandler.countNodes(slavesNode, "name"); //$NON-NLS-1$
    for (int i=0;i<nrSlaves;i++)
    {
        Node serverNode = XMLHandler.getSubNodeByNr(slavesNode, "name", i); //$NON-NLS-1$
        String serverName = XMLHandler.getNodeValue(serverNode);
        SlaveServer slaveServer = SlaveServer.findSlaveServer(referenceSlaveServers, serverName);
        if (slaveServer!=null) 
        {
            slaveServers.add(slaveServer);
        }
    }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:25,代码来源:ClusterSchema.java

示例4: readData

import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
private void readData(Node stepnode) throws KettleXMLException
{
	try
	{
		includeRowNumber  = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "rownum"));
		isFoldernameDynamic  = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "foldername_dynamic"));
		rowNumberField    = XMLHandler.getTagValue(stepnode, "rownum_field");
		dynamicFoldernameField    = XMLHandler.getTagValue(stepnode, "foldername_Field");
		
		// Is there a limit on the number of rows we process?
		rowLimit = Const.toLong(XMLHandler.getTagValue(stepnode, "limit"), 0L);
		
		Node filenode = XMLHandler.getSubNode(stepnode, "file");
		int nrfiles   = XMLHandler.countNodes(filenode, "name");
			
		allocate(nrfiles);

		for (int i = 0; i < nrfiles; i++)
		{
			Node folderNamenode     = XMLHandler.getSubNodeByNr(filenode, "name", i);
			Node folderRequirednode = XMLHandler.getSubNodeByNr(filenode, "file_required", i);
			folderName[i]           = XMLHandler.getNodeValue(folderNamenode);
			folderRequired[i]       = XMLHandler.getNodeValue(folderRequirednode);
		}
	}
	catch (Exception e)
	{
		throw new KettleXMLException("Unable to load step info from XML", e);
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:31,代码来源:GetSubFoldersMeta.java

示例5: readData

import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
private void readData(Node stepnode)
	throws KettleXMLException
{
	try
	{ 
           
           Node keysnode   = XMLHandler.getSubNode(stepnode, "keys"); //$NON-NLS-1$
           Node valuesnode = XMLHandler.getSubNode(stepnode, "values"); //$NON-NLS-1$
           
	    int nrKeys   = XMLHandler.countNodes(keysnode, "key"); //$NON-NLS-1$
           int nrValues = XMLHandler.countNodes(valuesnode, "value"); //$NON-NLS-1$
           
           allocate(nrKeys, nrValues);
           
           for (int i=0;i<nrKeys;i++) 
           {
               Node keynode = XMLHandler.getSubNodeByNr(keysnode, "key", i); //$NON-NLS-1$
               keyFields[i] = XMLHandler.getNodeValue(keynode);
           }
           
           for (int i=0;i<nrValues;i++) 
           {
               Node valuenode = XMLHandler.getSubNodeByNr(valuesnode, "value", i); //$NON-NLS-1$
               valueFields[i] = XMLHandler.getNodeValue(valuenode);
           }
           
           flagField = XMLHandler.getTagValue(stepnode, "flag_field"); //$NON-NLS-1$
           
		compareStepName = XMLHandler.getTagValue(stepnode, "compare"); //$NON-NLS-1$
		referenceStepName = XMLHandler.getTagValue(stepnode, "reference"); //$NON-NLS-1$
	}
	catch(Exception e)
	{
		throw new KettleXMLException(Messages.getString("MergeRowsMeta.Exception.UnableToLoadStepInfo"), e); //$NON-NLS-1$
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:37,代码来源:MergeRowsMeta.java

示例6: readData

import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
private void readData(Node stepnode) throws KettleXMLException
{
	try
	{
		includeRowNumber  = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "rownum"));
		isFoldernameDynamic  = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "foldername_dynamic"));
		rowNumberField    = XMLHandler.getTagValue(stepnode, "rownum_field");
		dynamicFoldernameField    = XMLHandler.getTagValue(stepnode, "foldername_field");
		
		// Is there a limit on the number of rows we process?
		rowLimit = Const.toLong(XMLHandler.getTagValue(stepnode, "limit"), 0L);
		
		Node filenode = XMLHandler.getSubNode(stepnode, "file");
		int nrfiles   = XMLHandler.countNodes(filenode, "name");
			
		allocate(nrfiles);

		for (int i = 0; i < nrfiles; i++)
		{
			Node folderNamenode     = XMLHandler.getSubNodeByNr(filenode, "name", i);
			Node folderRequirednode = XMLHandler.getSubNodeByNr(filenode, "file_required", i);
			folderName[i]           = XMLHandler.getNodeValue(folderNamenode);
			folderRequired[i]       = XMLHandler.getNodeValue(folderRequirednode);
		}
	}
	catch (Exception e)
	{
		throw new KettleXMLException("Unable to load step info from XML", e);
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:31,代码来源:GetSubFoldersMeta.java

示例7: readLiteralFormatFromData

import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
private LiteralFormat readLiteralFormatFromData(Node formatNode){	
	Node supportedUOMsNodes = XMLHandler.getSubNode(formatNode, LiteralFormat.SUPPORTED_UOMS);	
	int count =  XMLHandler.countNodes(supportedUOMsNodes, "UOM");
	List<String> supported_uoms = new ArrayList<String>(count);
	for (int i = 0; i < count; i++) {
		supported_uoms.add(XMLHandler.getNodeValue(XMLHandler.getSubNodeByNr(supportedUOMsNodes, "UOM", i)));
	}
	String default_uom = XMLHandler.getNodeValue(XMLHandler.getSubNode(formatNode, LiteralFormat.DEFAULT_UOM));
	String default_value = XMLHandler.getNodeValue(XMLHandler.getSubNode(formatNode, LiteralFormat.DEFAULT_VALUE));
	String datatype = XMLHandler.getNodeValue(XMLHandler.getSubNode(formatNode, LiteralFormat.DATATYPE));				
	return new LiteralFormat(datatype, supported_uoms, default_uom, default_value);
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:13,代码来源:WPSClientMeta.java

示例8: readData

import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
private void readData(Node stepnode) throws KettleXMLException
{
	try
	{

		urlInField  = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "url_in_field"));
		urlFieldname    = XMLHandler.getTagValue(stepnode, "url_field_name");
		includeRowNumber  = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "rownum"));
		rowNumberField    = XMLHandler.getTagValue(stepnode, "rownum_field");
		includeUrl  = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "include_url"));
		urlField    = XMLHandler.getTagValue(stepnode, "url_Field");
		readfrom    = XMLHandler.getTagValue(stepnode, "read_from");
		Node fields     = XMLHandler.getSubNode(stepnode,  "fields");
		int nrFields    = XMLHandler.countNodes(fields,    "field");
		Node urlnode  = XMLHandler.getSubNode(stepnode,   "urls");
		int nrUrls     = XMLHandler.countNodes(urlnode,  "url");
		allocate(nrUrls,nrFields);
		for (int i=0;i<nrUrls;i++)
		{
			Node urlnamenode = XMLHandler.getSubNodeByNr(urlnode, "url", i); 
			url[i] = XMLHandler.getNodeValue(urlnamenode);
		}

		for (int i=0;i<nrFields;i++)
		{
			Node fnode = XMLHandler.getSubNodeByNr(fields, "field", i);
			RssInputField field = new RssInputField(fnode);
			inputFields[i] = field;
		}
		
		// Is there a limit on the number of rows we process?
		rowLimit = Const.toLong(XMLHandler.getTagValue(stepnode, "limit"), 0L);
	}
	catch(Exception e)
	{
		throw new KettleXMLException("Unable to load step info from XML", e);
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:39,代码来源:RssInputMeta.java

示例9: readData

import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
private void readData(Node stepnode) throws KettleXMLException
{
	try
	{

		includeFilesCount  = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "files_count"));
		filesCountFieldName    = XMLHandler.getTagValue(stepnode, "files_count_fieldname");
		rowsCountFieldName    = XMLHandler.getTagValue(stepnode, "rows_count_fieldname");

		RowSeparator_format    = XMLHandler.getTagValue(stepnode, "rowseparator_format");
		RowSeparator    = XMLHandler.getTagValue(stepnode, "row_separator");
		String addresult  = XMLHandler.getTagValue(stepnode, "isaddresult");
		if(Const.isEmpty(addresult))
			isaddresult=true;
		else
			isaddresult="Y".equalsIgnoreCase(addresult);
		
		filefield  = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "filefield"));
		outputFilenameField    = XMLHandler.getTagValue(stepnode, "filename_Field");
		
		
		Node filenode   = XMLHandler.getSubNode(stepnode,  "file");
		int nrFiles     = XMLHandler.countNodes(filenode,  "name");
		allocate(nrFiles);
		
		for (int i=0;i<nrFiles;i++)
		{
			Node filenamenode = XMLHandler.getSubNodeByNr(filenode, "name", i); 
			Node filemasknode = XMLHandler.getSubNodeByNr(filenode, "filemask", i); 
			fileName[i] = XMLHandler.getNodeValue(filenamenode);
			fileMask[i] = XMLHandler.getNodeValue(filemasknode);
		}
		
	}
	catch(Exception e)
	{
		throw new KettleXMLException("Unable to load step info from XML", e);
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:40,代码来源:GetFilesRowsCountMeta.java

示例10: readData

import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
private void readData(Node stepnode) throws KettleXMLException
{
	try
	{
		includeFilename   = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "include"));
		filenameField     = XMLHandler.getTagValue(stepnode, "include_field");
		
		addResultFile     = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "addresultfile"));
		nameSpaceAware    = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "namespaceaware"));
		ignorecomments    = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "ignorecomments"));
		
		readurl    = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "readurl"));
		validating        = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "validating"));
		usetoken  = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "usetoken"));
		IsIgnoreEmptyFile  = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "IsIgnoreEmptyFile"));
		doNotFailIfNoFile  = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "doNotFailIfNoFile"));
		
		includeRowNumber  = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "rownum"));
		rowNumberField    = XMLHandler.getTagValue(stepnode, "rownum_field");
		encoding          = XMLHandler.getTagValue(stepnode, "encoding");

		Node filenode     = XMLHandler.getSubNode(stepnode,   "file");
		Node fields       = XMLHandler.getSubNode(stepnode,   "fields");
		int nrFiles       = XMLHandler.countNodes(filenode,  "name");
		int nrFields      = XMLHandler.countNodes(fields,    "field");

		allocate(nrFiles, nrFields);
		
		for (int i=0;i<nrFiles;i++)
		{
			Node filenamenode = XMLHandler.getSubNodeByNr(filenode, "name", i); 
			Node filemasknode = XMLHandler.getSubNodeByNr(filenode, "filemask", i); 
			Node excludefilemasknode     = XMLHandler.getSubNodeByNr(filenode, "exclude_filemask", i);
			Node fileRequirednode = XMLHandler.getSubNodeByNr(filenode, "file_required", i);
			Node includeSubFoldersnode = XMLHandler.getSubNodeByNr(filenode, "include_subfolders", i);
			fileName[i] = XMLHandler.getNodeValue(filenamenode);
			fileMask[i] = XMLHandler.getNodeValue(filemasknode);
			excludeFileMask[i]    = XMLHandler.getNodeValue(excludefilemasknode);
			fileRequired[i] = XMLHandler.getNodeValue(fileRequirednode);
			includeSubFolders[i] = XMLHandler.getNodeValue(includeSubFoldersnode);
		}
		
		for (int i=0;i<nrFields;i++)
		{
			Node fnode = XMLHandler.getSubNodeByNr(fields, "field", i);
			GetXMLDataField field = new GetXMLDataField(fnode);
			inputFields[i] = field;
		} 
		
		// Is there a limit on the number of rows we process?
		rowLimit = Const.toLong(XMLHandler.getTagValue(stepnode, "limit"), 0L);
           // Do we skip rows before starting to read
		loopxpath = XMLHandler.getTagValue(stepnode, "loopxpath");
		
		inFields = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "IsInFields"));
		IsAFile = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "IsAFile"));
		
		xmlField = XMLHandler.getTagValue(stepnode, "XmlField");
		prunePath = XMLHandler.getTagValue(stepnode, "prunePath");
           
		shortFileFieldName = XMLHandler.getTagValue(stepnode, "shortFileFieldName");
		pathFieldName = XMLHandler.getTagValue(stepnode, "pathFieldName");
		hiddenFieldName = XMLHandler.getTagValue(stepnode, "hiddenFieldName");
		lastModificationTimeFieldName = XMLHandler.getTagValue(stepnode, "lastModificationTimeFieldName");
		uriNameFieldName = XMLHandler.getTagValue(stepnode, "uriNameFieldName");
		rootUriNameFieldName = XMLHandler.getTagValue(stepnode, "rootUriNameFieldName");
		extensionFieldName = XMLHandler.getTagValue(stepnode, "extensionFieldName");
		sizeFieldName = XMLHandler.getTagValue(stepnode, "sizeFieldName");
	}
	catch(Exception e)
	{
		throw new KettleXMLException(BaseMessages.getString(PKG, "GetXMLDataMeta.Exception.ErrorLoadingXML", e.toString()));
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:75,代码来源:GetXMLDataMeta.java

示例11: Validation

import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
public Validation(Node calcnode) throws KettleXMLException {
	this();

	fieldName = XMLHandler.getTagValue(calcnode, "name");
	name = XMLHandler.getTagValue(calcnode, "validation_name");
	if (Const.isEmpty(name)) name = fieldName; // remain backward compatible 
	
	maximumLength = Const.toInt(XMLHandler.getTagValue(calcnode, "max_length"), -1);
	minimumLength = Const.toInt(XMLHandler.getTagValue(calcnode, "min_length"), -1);

	nullAllowed = "Y".equalsIgnoreCase(XMLHandler.getTagValue(calcnode, "null_allowed"));
	onlyNullAllowed = "Y".equalsIgnoreCase(XMLHandler.getTagValue(calcnode, "only_null_allowed"));
	onlyNumericAllowed = "Y".equalsIgnoreCase(XMLHandler.getTagValue(calcnode, "only_numeric_allowed"));

	dataType = ValueMeta.getType( XMLHandler.getTagValue(calcnode, "data_type") );
	dataTypeVerified = "Y".equalsIgnoreCase( XMLHandler.getTagValue(calcnode, "data_type_verified"));
	conversionMask = XMLHandler.getTagValue(calcnode, "conversion_mask");
	decimalSymbol = XMLHandler.getTagValue(calcnode, "decimal_symbol");
	groupingSymbol = XMLHandler.getTagValue(calcnode, "grouping_symbol");

	minimumValue = XMLHandler.getTagValue(calcnode, "min_value");
	maximumValue = XMLHandler.getTagValue(calcnode, "max_value");

	startString = XMLHandler.getTagValue(calcnode, "start_string");
	endString = XMLHandler.getTagValue(calcnode, "end_string");
	startStringNotAllowed = XMLHandler.getTagValue(calcnode, "start_string_not_allowed");
	endStringNotAllowed = XMLHandler.getTagValue(calcnode, "end_string_not_allowed");

	regularExpression = XMLHandler.getTagValue(calcnode, "regular_expression");
	regularExpressionNotAllowed = XMLHandler.getTagValue(calcnode, "regular_expression_not_allowed");

	errorCode = XMLHandler.getTagValue(calcnode, "error_code");
	errorDescription = XMLHandler.getTagValue(calcnode, "error_description");
	
	sourcingValues = "Y".equalsIgnoreCase( XMLHandler.getTagValue(calcnode, "is_sourcing_values"));
	sourcingStepName = XMLHandler.getTagValue(calcnode, "sourcing_step");
	sourcingField = XMLHandler.getTagValue(calcnode, "sourcing_field");
	
	Node allowedValuesNode = XMLHandler.getSubNode(calcnode, XML_TAG_ALLOWED);
	int nrValues = XMLHandler.countNodes(allowedValuesNode, "value");
	allowedValues = new String[nrValues];
	for (int i=0;i<nrValues;i++) {
		Node allowedNode = XMLHandler.getSubNodeByNr(allowedValuesNode, "value", i);
		allowedValues[i] = XMLHandler.getNodeValue(allowedNode);
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:47,代码来源:Validation.java

示例12: readData

import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
private void readData(Node stepnode) throws KettleXMLException
{
	try
	{

		includeFilesCount  = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "files_count"));
		filesCountFieldName    = XMLHandler.getTagValue(stepnode, "files_count_fieldname");
		rowsCountFieldName    = XMLHandler.getTagValue(stepnode, "rows_count_fieldname");

		RowSeparator_format    = scrubOldRowSeparator(XMLHandler.getTagValue(stepnode, "rowseparator_format"));
		RowSeparator    = XMLHandler.getTagValue(stepnode, "row_separator");
		
		String addresult  = XMLHandler.getTagValue(stepnode, "isaddresult");
		if(Const.isEmpty(addresult))
			isaddresult=true;
		else
			isaddresult="Y".equalsIgnoreCase(addresult);
		
		filefield  = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "filefield"));
		outputFilenameField    = XMLHandler.getTagValue(stepnode, "filename_Field");
		
		
		Node filenode   = XMLHandler.getSubNode(stepnode,  "file");
		int nrFiles     = XMLHandler.countNodes(filenode,  "name");
		allocate(nrFiles);
		
		for (int i=0;i<nrFiles;i++)
		{
			Node filenamenode = XMLHandler.getSubNodeByNr(filenode, "name", i); 
			Node filemasknode = XMLHandler.getSubNodeByNr(filenode, "filemask", i); 
			Node excludefilemasknode     = XMLHandler.getSubNodeByNr(filenode, "exclude_filemask", i);
			Node fileRequirednode = XMLHandler.getSubNodeByNr(filenode, "file_required", i);
			Node includeSubFoldersnode = XMLHandler.getSubNodeByNr(filenode, "include_subfolders", i);
			fileName[i] = XMLHandler.getNodeValue(filenamenode);
			fileMask[i] = XMLHandler.getNodeValue(filemasknode);
			excludeFileMask[i]    = XMLHandler.getNodeValue(excludefilemasknode);
			fileRequired[i] = XMLHandler.getNodeValue(fileRequirednode);
			includeSubFolders[i] = XMLHandler.getNodeValue(includeSubFoldersnode);
		}
		
	}
	catch(Exception e)
	{
		throw new KettleXMLException("Unable to load step info from XML", e);
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:47,代码来源:GetFilesRowsCountMeta.java

示例13: readData

import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
private void readData(Node stepnode) throws KettleXMLException
{
	try
	{
		includeFilename   = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "include"));
		filenameField     = XMLHandler.getTagValue(stepnode, "include_field");
		includeRowNumber  = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "rownum"));
		rowNumberField    = XMLHandler.getTagValue(stepnode, "rownum_field");
		fileBaseURI       = XMLHandler.getTagValue(stepnode, "file_base_uri");
		ignoreEntities  = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "ignore_entities"));
		namespaceAware  = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "namespace_aware"));

		Node filenode  = XMLHandler.getSubNode(stepnode,   "file");
		Node fields    = XMLHandler.getSubNode(stepnode,   "fields");
           Node positions = XMLHandler.getSubNode(stepnode,   "positions");
		int nrFiles     = XMLHandler.countNodes(filenode,  "name");
		int nrFields    = XMLHandler.countNodes(fields,    "field");
           int nrPositions = XMLHandler.countNodes(positions, "position");

		allocate(nrFiles, nrFields, nrPositions);
		
		for (int i=0;i<nrFiles;i++)
		{
			Node filenamenode = XMLHandler.getSubNodeByNr(filenode, "name", i); 
			Node filemasknode = XMLHandler.getSubNodeByNr(filenode, "filemask", i); 
			fileName[i] = XMLHandler.getNodeValue(filenamenode);
			fileMask[i] = XMLHandler.getNodeValue(filemasknode);
		}
		
		for (int i=0;i<nrFields;i++)
		{
			Node fnode = XMLHandler.getSubNodeByNr(fields, "field", i);
			XMLInputField field = new XMLInputField(fnode);
			inputFields[i] = field;
		}
           
           for (int i=0;i<nrPositions;i++)
           {
               Node positionnode = XMLHandler.getSubNodeByNr(positions, "position", i); 
               inputPosition[i] = XMLHandler.getNodeValue(positionnode);
           }
		
		// Is there a limit on the number of rows we process?
		rowLimit = Const.toLong(XMLHandler.getTagValue(stepnode, "limit"), 0L);
           // Do we skip rows before starting to read
           nrRowsToSkip = Const.toInt(XMLHandler.getTagValue(stepnode, "skip"), 0);
	}
	catch(Exception e)
	{
		throw new KettleXMLException("Unable to load step info from XML", e);
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:53,代码来源:XMLInputMeta.java

示例14: readData

import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
private void readData(Node stepnode) throws KettleXMLException
{
	try
	{
		Node filternode         = XMLHandler.getSubNode(stepnode, "filter");
		Node filterfiletypenode = XMLHandler.getSubNode(filternode, "filterfiletype");
		fileTypeFilter          = FileInputList.FileTypeFilter.getByName(XMLHandler.getNodeValue(filterfiletypenode));
		doNotFailIfNoFile  = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "doNotFailIfNoFile"));
		includeRowNumber  = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "rownum"));
		isaddresult  = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "isaddresult"));
		filefield  = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "filefield"));
		rowNumberField    = XMLHandler.getTagValue(stepnode, "rownum_field");
		dynamicFilenameField    = XMLHandler.getTagValue(stepnode, "filename_Field");
		dynamicWildcardField    = XMLHandler.getTagValue(stepnode, "wildcard_Field");
		dynamicExcludeWildcardField    = XMLHandler.getTagValue(stepnode, "exclude_wildcard_Field");
		dynamicIncludeSubFolders    = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "dynamic_include_subfolders"));
		
		// Is there a limit on the number of rows we process?
		rowLimit = Const.toLong(XMLHandler.getTagValue(stepnode, "limit"), 0L);
		
		Node filenode = XMLHandler.getSubNode(stepnode, "file");
		int nrfiles   = XMLHandler.countNodes(filenode, "name");
			
		allocate(nrfiles);

		for (int i = 0; i < nrfiles; i++)
		{
			Node filenamenode     = XMLHandler.getSubNodeByNr(filenode, "name", i);
			Node filemasknode     = XMLHandler.getSubNodeByNr(filenode, "filemask", i);
			Node excludefilemasknode     = XMLHandler.getSubNodeByNr(filenode, "exclude_filemask", i);
			Node fileRequirednode = XMLHandler.getSubNodeByNr(filenode, "file_required", i);
			Node includeSubFoldersnode = XMLHandler.getSubNodeByNr(filenode, "include_subfolders", i);
			fileName[i]           = XMLHandler.getNodeValue(filenamenode);
			fileMask[i]           = XMLHandler.getNodeValue(filemasknode);
			excludeFileMask[i]    = XMLHandler.getNodeValue(excludefilemasknode);
			fileRequired[i]       = XMLHandler.getNodeValue(fileRequirednode);
			includeSubFolders[i] = XMLHandler.getNodeValue(includeSubFoldersnode);
		}
	}
	catch (Exception e)
	{
		throw new KettleXMLException("Unable to load step info from XML", e);
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:45,代码来源:GetFileNamesMeta.java

示例15: readData

import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
private void readData(Node stepnode) throws KettleXMLException
{
	try
	{ 
           
           Node keysNode = XMLHandler.getSubNode(stepnode, "keys"); //$NON-NLS-1$
           
	    int nrKeys = XMLHandler.countNodes(keysNode, "key"); //$NON-NLS-1$
           
           allocateKeys(nrKeys);
           
           for (int i=0;i<nrKeys;i++) 
           {
               Node keynode = XMLHandler.getSubNodeByNr(keysNode, "key", i); //$NON-NLS-1$
               keyFields[i] = XMLHandler.getNodeValue(keynode);
           }

           int nInputStreams = Integer.parseInt(XMLHandler.getTagValue(stepnode, "number_input"));
           
           allocateInputSteps(nInputStreams);
           
           for (int i = 0; i < nInputStreams; i++) {
               getStepIOMeta().addStream(new Stream(StreamType.INFO, null,
                   BaseMessages.getString(PKG, "MultiMergeJoin.InfoStream.Description"), 
                   StreamIcon.INFO, null));
           }
           
           List<StreamInterface> infoStreams = getStepIOMeta().getInfoStreams();
           for (int i = 0; i < infoStreams.size(); i++)
           {
           	String stepName=XMLHandler.getTagValue(stepnode, "step"+i);
		    infoStreams.get(i).setSubject(stepName ); //$NON-NLS-1$
		    inputSteps[i]=stepName;
           }

		joinType = XMLHandler.getTagValue(stepnode, "join_type"); //$NON-NLS-1$
	}
	catch(Exception e)
	{
		throw new KettleXMLException(BaseMessages.getString(PKG, "MultiMergeJoinMeta.Exception.UnableToLoadStepInfo"), e); //$NON-NLS-1$
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:43,代码来源:MultiMergeJoinMeta.java


注:本文中的org.pentaho.di.core.xml.XMLHandler.getNodeValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。