本文整理汇总了Java中org.pentaho.di.core.xml.XMLHandler.getTagValue方法的典型用法代码示例。如果您正苦于以下问题:Java XMLHandler.getTagValue方法的具体用法?Java XMLHandler.getTagValue怎么用?Java XMLHandler.getTagValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.core.xml.XMLHandler
的用法示例。
在下文中一共展示了XMLHandler.getTagValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadXML
import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
@Override public void loadXML(Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore)
throws KettleXMLException {
super.loadXML(stepnode, databases, metaStore);
String truncateStr = XMLHandler.getTagValue(stepnode, "truncate");
if (truncateStr.equals("true")) {
setTruncate(true);
} else {
setTruncate(false);
}
int nrStreamFields = XMLHandler.countNodes(stepnode, "stream_fields");
streamFields = new ArrayList<String>(nrStreamFields);
for (int i = 0; i < nrStreamFields; i++) {
Node fieldNode = XMLHandler.getSubNodeByNr(stepnode, "stream_fields", i);
streamFields.add(XMLHandler.getTagValue(fieldNode, "name"));
}
}
示例2: loadXML
import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
/**
* Load the values for this step from an XML Node
*
* @param stepnode the Node to get the info from
* @param databases The available list of databases to reference to
* @param counters Counters to reference.
* @throws KettleXMLException When an unexpected XML error occurred. (malformed etc.)
*/
@Override public void loadXML(Node stepnode, List<DatabaseMeta> databases,
Map<String, Counter> counters) throws KettleXMLException {
try {
databaseName = XMLHandler.getTagValue(stepnode, "databaseName");
tabelName = XMLHandler.getTagValue(stepnode, "TableName");
mdkeySize = XMLHandler.getTagValue(stepnode, "MDKeySize");
measureCount = XMLHandler.getTagValue(stepnode, "Measurecount");
heirAndKeySize = XMLHandler.getTagValue(stepnode, "HeirAndKeySize");
tableName = XMLHandler.getTagValue(stepnode, "tableName");
groupByEnabled = XMLHandler.getTagValue(stepnode, "isGroupByEnabled");
aggregatorClassString = XMLHandler.getTagValue(stepnode, "aggregatorClassString");
aggregatorString = XMLHandler.getTagValue(stepnode, "aggregatorString");
factDimLensString = XMLHandler.getTagValue(stepnode, "factDimLensString");
levelAnddataTypeString = XMLHandler.getTagValue(stepnode, "levelAnddataTypeString");
partitionID = XMLHandler.getTagValue(stepnode, "partitionID");
segmentId = XMLHandler.getTagValue(stepnode, "segmentId");
taskNo = XMLHandler.getTagValue(stepnode, "taskNo");
} catch (Exception e) {
throw new KettleXMLException("Unable to read step info from XML node", e);
}
}
示例3: loadXML
import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
/**
* Load the values for this step from an XML Node
*
* @param stepnode the Node to get the info from
* @param databases The available list of databases to reference to
* @param counters Counters to reference.
* @throws KettleXMLException When an unexpected XML error occurred. (malformed etc.)
*/
public void loadXML(Node stepnode, List<DatabaseMeta> databases, Map<String, Counter> counters)
throws KettleXMLException {
try {
this.tabelName = XMLHandler.getTagValue(stepnode, "TableName");
this.outputRowSize = XMLHandler.getTagValue(stepnode, "outputRowSize");
this.factDimLensString = XMLHandler.getTagValue(stepnode, "factDimLensString");
this.tableName = XMLHandler.getTagValue(stepnode, "tableName");
this.databaseName = XMLHandler.getTagValue(stepnode, "databaseName");
this.dimensionCount = XMLHandler.getTagValue(stepnode, "dimensionCount");
this.noDictionaryDims = XMLHandler.getTagValue(stepnode, "noDictionaryDims");
this.noDictionaryDimsMapping = XMLHandler.getTagValue(stepnode, "noDictionaryDimsMapping");
this.complexDimensionCount = XMLHandler.getTagValue(stepnode, "complexDimensionCount");
this.measureCount = XMLHandler.getTagValue(stepnode, "measureCount");
this.updateMemberRequest = XMLHandler.getTagValue(stepnode, "isUpdateMemberRequest");
this.measureDataType = XMLHandler.getTagValue(stepnode, "measureDataType");
this.partitionID = XMLHandler.getTagValue(stepnode, "partitionID");
this.segmentId = XMLHandler.getTagValue(stepnode, "segmentId");
this.taskNo = XMLHandler.getTagValue(stepnode, "taskNo");
} catch (Exception e) {
throw new KettleXMLException("Unable to read step info from XML node", e);
}
}
示例4: loadXML
import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
@Override
public void loadXML(Node stepnode, List<DatabaseMeta> databases, Map<String, Counter> counters)
throws KettleXMLException {
try {
tableName = XMLHandler.getTagValue(stepnode, "TableName");
aggregateLevels = XMLHandler.getTagValue(stepnode, "AggregateLevels");
numberOfCores = XMLHandler.getTagValue(stepnode, "NumberOfCores");
databaseName = XMLHandler.getTagValue(stepnode, "databaseName");
tableName = XMLHandler.getTagValue(stepnode, "tableName");
noDictionaryDims = XMLHandler.getTagValue(stepnode, "noDictionaryDims");
measureCount = XMLHandler.getTagValue(stepnode, "measureCount");
columnGroupsString = XMLHandler.getTagValue(stepnode, "dimensionsStoreType");
dimensionCount = XMLHandler.getTagValue(stepnode, "dimensionCount");
complexDimsCount = XMLHandler.getTagValue(stepnode, "complexDimsCount");
complexTypeString = XMLHandler.getTagValue(stepnode, "complexTypeString");
measureDataType = XMLHandler.getTagValue(stepnode, "measureDataType");
taskNo = XMLHandler.getTagValue(stepnode, "taskNo");
factTimeStamp = XMLHandler.getTagValue(stepnode, "factTimeStamp");
partitionID = XMLHandler.getTagValue(stepnode, "partitionID");
isUseInvertedIndex = XMLHandler.getTagValue(stepnode, "isUseInvertedIndex");
segmentId = XMLHandler.getTagValue(stepnode, "segmentId");
noDictionaryDimsMapping = XMLHandler.getTagValue(stepnode, "noDictionaryDimsMapping");
} catch (Exception e) {
throw new KettleXMLException("Unable to read step info from XML node", e);
}
}
示例5: loadXML
import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
public void loadXML( Node entryNode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers, Repository rep ) throws KettleXMLException {
try {
super.loadXML( entryNode, databases, slaveServers );
String dbname = XMLHandler.getTagValue( entryNode, CONNECTION );
databaseMeta = DatabaseMeta.findDatabase( databases, dbname );
setManagementAction( XMLHandler.getTagValue( entryNode, MANAGEMENT_ACTION ) );
setReplace( "Y".equalsIgnoreCase( XMLHandler.getTagValue( entryNode, REPLACE ) ) );
setFailIfExists( "Y".equalsIgnoreCase( XMLHandler.getTagValue( entryNode, FAIL_IF_EXISTS ) ) );
setWarehouseName( XMLHandler.getTagValue( entryNode, WAREHOUSE_NAME ) );
setWarehouseSize( XMLHandler.getTagValue( entryNode, WAREHOUSE_SIZE ) );
setWarehouseType( XMLHandler.getTagValue( entryNode, WAREHOUSE_TYPE ) );
setMaxClusterCount( XMLHandler.getTagValue( entryNode, MAX_CLUSTER_COUNT ) );
setMinClusterCount( XMLHandler.getTagValue( entryNode, MIN_CLUSTER_COUNT ) );
setAutoSuspend( XMLHandler.getTagValue( entryNode, AUTO_SUSPEND ) );
setAutoResume( "Y".equalsIgnoreCase( XMLHandler.getTagValue( entryNode, AUTO_RESUME ) ) );
setInitiallySuspended( "Y".equalsIgnoreCase( XMLHandler.getTagValue( entryNode, INITIALLY_SUSPENDED ) ) );
setResourceMonitor( XMLHandler.getTagValue( entryNode, RESOURCE_MONITOR ) );
setComment( XMLHandler.getTagValue( entryNode, COMMENT ) );
setFailIfNotExists( "Y".equalsIgnoreCase( XMLHandler.getTagValue( entryNode, FAIL_IF_NOT_EXISTS ) ) );
} catch ( KettleXMLException dbe ) {
throw new KettleXMLException( BaseMessages.getString( PKG, "SnowflakeWarehouseManager.Error.Exception.UnableLoadXML" ), dbe );
}
}
示例6: ARXFields
import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
/**
* Generating a new ARXFields from XML Type of Storage
* @param parent The XML Node of the field
* @author Florian Wiedner
* @since 1.1
* @category ARXFields
*/
public ARXFields(Node parent){
this.name=XMLHandler.getTagValue(parent,"name");
this.type=XMLHandler.getTagValue(parent,"type");
this.functionMicro=XMLHandler.getTagValue(parent,"functionMicro");
this.hierarchie=XMLHandler.getTagValue(parent,"hierarchie");
this.attributeWeight=Double.parseDouble(XMLHandler.getTagValue(parent,"attributeWeight"));
this.lDiversityC=Double.parseDouble(XMLHandler.getTagValue(parent,"lDiversityC"));
this.tCloseness=Double.parseDouble(XMLHandler.getTagValue(parent,"tCloseness"));
this.transformation=Integer.parseInt(XMLHandler.getTagValue(parent,"transformation"));
this.minimumGen=Integer.parseInt(XMLHandler.getTagValue(parent,"minimumGen"));
this.maximumGen=Integer.parseInt(XMLHandler.getTagValue(parent,"maximumGen"));
this.lDiversity=Integer.parseInt(XMLHandler.getTagValue(parent,"lDiversity"));
this.lDiversityVariant=Integer.parseInt(XMLHandler.getTagValue(parent,"lDiversityVariant"));
this.tClosenessMeasure=Integer.parseInt(XMLHandler.getTagValue(parent,"tClosenessMeasure"));
this.dDisclosure=Double.parseDouble(XMLHandler.getTagValue(parent,"dDisclosure"));
this.missingDataMicro=Boolean.parseBoolean(XMLHandler.getTagValue(parent,"missingDataMicro"));
this.lDiversityEnable=Boolean.parseBoolean(XMLHandler.getTagValue(parent,"lDiversityEnable"));
this.tClosenessEnable=Boolean.parseBoolean(XMLHandler.getTagValue(parent,"tClosenessEnable"));
this.dDisclosureEnable=Boolean.parseBoolean(XMLHandler.getTagValue(parent,"dDisclosureEnable"));
}
示例7: readData
import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
private void readData(Node stepnode) throws KettleXMLException
{
try
{
fieldname = XMLHandler.getTagValue(stepnode, "fieldname"); //$NON-NLS-1$
resultfieldname = XMLHandler.getTagValue(stepnode, "resultfieldname");
cardtype = XMLHandler.getTagValue(stepnode, "cardtype");
notvalidmsg = XMLHandler.getTagValue(stepnode, "notvalidmsg");
onlydigits = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "onlydigits"));
}
catch (Exception e)
{
throw new KettleXMLException(Messages.getString("CreditCardValidatorMeta.Exception.UnableToReadStepInfo"), e); //$NON-NLS-1$
}
}
示例8: readData
import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
private void readData(Node stepnode) throws KettleXMLException
{
try
{
fieldname = XMLHandler.getTagValue(stepnode, "fieldname"); //$NON-NLS-1$
resultfieldname = XMLHandler.getTagValue(stepnode, "resultfieldname");
cardtype = XMLHandler.getTagValue(stepnode, "cardtype");
notvalidmsg = XMLHandler.getTagValue(stepnode, "notvalidmsg");
onlydigits = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "onlydigits"));
}
catch (Exception e)
{
throw new KettleXMLException(BaseMessages.getString(PKG, "CreditCardValidatorMeta.Exception.UnableToReadStepInfo"), e); //$NON-NLS-1$
}
}
示例9: loadXML
import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
public void loadXML(Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers, Repository rep) throws KettleXMLException {
try {
super.loadXML(entrynode, databases, slaveServers);
zipFilename = XMLHandler.getTagValue(entrynode, "zipfilename");
compressionrate = Const.toInt(XMLHandler.getTagValue(entrynode, "compressionrate"), -1);
ifzipfileexists = Const.toInt(XMLHandler.getTagValue(entrynode, "ifzipfileexists"), -1);
afterzip = Const.toInt(XMLHandler.getTagValue(entrynode, "afterzip"), -1);
wildcard = XMLHandler.getTagValue(entrynode, "wildcard");
wildcardexclude = XMLHandler.getTagValue(entrynode, "wildcardexclude");
sourcedirectory = XMLHandler.getTagValue(entrynode, "sourcedirectory");
movetodirectory = XMLHandler.getTagValue(entrynode, "movetodirectory");
addfiletoresult = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "addfiletoresult"));
isfromprevious = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "isfromprevious"));
createparentfolder = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "createparentfolder"));
adddate = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "adddate"));
addtime = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "addtime"));
SpecifyFormat = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "SpecifyFormat"));
date_time_format = XMLHandler.getTagValue(entrynode, "date_time_format");
createMoveToDirectory = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "createMoveToDirectory"));
includingSubFolders = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "include_subfolders"));
} catch (KettleXMLException xe) {
throw new KettleXMLException(BaseMessages.getString(PKG, "JobEntryZipFile.UnableLoadJobEntryXML"), xe);
}
}
示例10: readData
import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
private void readData(Node stepnode) throws KettleXMLException {
try {
fileNameField = XMLHandler.getTagValue(stepnode, "filenamefield");
isFileNameInField = "Y".equalsIgnoreCase(XMLHandler.getTagValue(
stepnode, "isfilenameinfield"));
fileName = XMLHandler.getTagValue(stepnode, "filename");
exportingFeatureName = "Y".equalsIgnoreCase(XMLHandler.getTagValue(
stepnode, "exportingfeaturename"));
featureNameField = XMLHandler.getTagValue(stepnode,
"featurenamefield");
exportingFeatureDesc = "Y".equalsIgnoreCase(XMLHandler.getTagValue(
stepnode, "exportingfeaturedesc"));
featureDescField = XMLHandler.getTagValue(stepnode,
"featuredescfield");
acceptingStepName = XMLHandler.getTagValue(stepnode,
"accept_stepname");
} catch (Exception e) {
throw new KettleXMLException(
Messages.getString("KMLFileOutputMeta.Exception.UnableToReadStepInformationFromXML"), e); //$NON-NLS-1$
}
}
示例11: readData
import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
private void readData( Node stepnode ) throws KettleXMLException {
try {
this.keyFieldName = XMLHandler.getTagValue( stepnode, "keyfield" );
this.valueFieldName = XMLHandler.getTagValue( stepnode, "valuefield" );
this.expirationTime = Integer.parseInt( XMLHandler.getTagValue( stepnode, "expiration" ) );
Node serverNodes = XMLHandler.getSubNode( stepnode, "servers" );
int nrservers = XMLHandler.countNodes( serverNodes, "server" );
allocate( nrservers );
for ( int i = 0; i < nrservers; i++ ) {
Node fnode = XMLHandler.getSubNodeByNr( serverNodes, "server", i );
String hostname = XMLHandler.getTagValue( fnode, "hostname" );
int port = Integer.parseInt( XMLHandler.getTagValue( fnode, "port" ) );
servers.add( new InetSocketAddress( hostname, port ) );
}
} catch ( Exception e ) {
throw new KettleXMLException( BaseMessages.getString( PKG, "MemcachedOutputMeta.Exception.UnableToReadStepInfo" ),
e );
}
}
示例12: loadXML
import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
public void loadXML(Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers, Repository rep) throws KettleXMLException {
try {
super.loadXML(entrynode, databases, slaveServers);
argFromPrevious = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "arg_from_previous")); //$NON-NLS-1$ //$NON-NLS-2$
includeSubfolders = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "include_subfolders")); //$NON-NLS-1$ //$NON-NLS-2$
Node fields = XMLHandler.getSubNode(entrynode, "fields"); //$NON-NLS-1$
// How many field arguments?
int nrFields = XMLHandler.countNodes(fields, "field"); //$NON-NLS-1$
arguments = new String[nrFields];
filemasks = new String[nrFields];
// Read them all...
for (int i = 0; i < nrFields; i++) {
Node fnode = XMLHandler.getSubNodeByNr(fields, "field", i); //$NON-NLS-1$
arguments[i] = XMLHandler.getTagValue(fnode, "name"); //$NON-NLS-1$
filemasks[i] = XMLHandler.getTagValue(fnode, "filemask"); //$NON-NLS-1$
}
} catch (KettleXMLException xe) {
throw new KettleXMLException(Messages.getString("JobEntryDeleteFiles.UnableToLoadFromXml"), xe); //$NON-NLS-1$
}
}
示例13: readData
import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
private void readData(Node stepnode, List<? extends SharedObjectInterface> databases)
throws KettleXMLException
{
try
{
String con = XMLHandler.getTagValue(stepnode, "connection"); //$NON-NLS-1$
database = DatabaseMeta.findDatabase(databases, con);
tablename = XMLHandler.getTagValue(stepnode, "tablename");
schemaname = XMLHandler.getTagValue(stepnode, "schemaname");
istablenameInfield = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "istablenameInfield"));
tablenamefield = XMLHandler.getTagValue(stepnode, "tablenamefield"); //$NON-NLS-1$
columnnamefield = XMLHandler.getTagValue(stepnode, "columnnamefield"); //$NON-NLS-1$
resultfieldname = XMLHandler.getTagValue(stepnode, "resultfieldname"); // Optional, can be null //$NON-NLS-1$
}
catch (Exception e)
{
throw new KettleXMLException(BaseMessages.getString(PKG, "ColumnExistsMeta.Exception.UnableToReadStepInfo"), e); //$NON-NLS-1$
}
}
示例14: loadXML
import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
public void loadXML( Node stepNode, List<DatabaseMeta> databases, IMetaStore metaStore ) throws KettleXMLException {
try {
Node fields = XMLHandler.getSubNode( stepNode, "fields" );
int count = XMLHandler.countNodes( fields, "field" );
allocate( count );
for ( int i = 0; i < count; i++ ) {
Node fieldNode = XMLHandler.getSubNodeByNr( fields, "field", i );
fieldName[ i ] = XMLHandler.getTagValue( fieldNode, "name" );
variableName[ i ] = XMLHandler.getTagValue( fieldNode, "variable" );
defaultValue[ i ] = XMLHandler.getTagValue( fieldNode, "default_value" );
}
useFormatting = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepNode, "use_formatting" ) );
} catch ( Exception e ) {
throw new KettleXMLException(
BaseMessages.getString( PKG, "SetSessionVariable.RuntimeError.UnableToReadXML" ), e );
}
}
示例15: readData
import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
private void readData(Node stepnode) throws KettleXMLException
{
try
{
Node fields = XMLHandler.getSubNode(stepnode, "fields");
int nrfields = XMLHandler.countNodes(fields, "field");
allocate(nrfields);
for (int i = 0; i < nrfields; i++)
{
Node fnode = XMLHandler.getSubNodeByNr(fields, "field", i);
fieldName[i] = XMLHandler.getTagValue(fnode, "name");
String asc = XMLHandler.getTagValue(fnode, "ascending");
if (asc.equalsIgnoreCase("Y"))
ascending[i] = true;
else
ascending[i] = false;
}
}
catch (Exception e)
{
throw new KettleXMLException("Unable to load step info from XML", e);
}
}