本文整理匯總了Java中org.pentaho.di.core.exception.KettleXMLException類的典型用法代碼示例。如果您正苦於以下問題:Java KettleXMLException類的具體用法?Java KettleXMLException怎麽用?Java KettleXMLException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
KettleXMLException類屬於org.pentaho.di.core.exception包,在下文中一共展示了KettleXMLException類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: loadXML
import org.pentaho.di.core.exception.KettleXMLException; //導入依賴的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.exception.KettleXMLException; //導入依賴的package包/類
@Override public void loadXML(Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore)
throws KettleXMLException {
setEndpoint(XMLHandler.getTagValue(stepnode, "endpoint"));
setTunnelEndpoint(XMLHandler.getTagValue(stepnode, "tunnelEndpoint"));
setAccessId(XMLHandler.getTagValue(stepnode, "accessId"));
setAccessKey(XMLHandler.getTagValue(stepnode, "accessKey"));
setProjectName(XMLHandler.getTagValue(stepnode, "projectName"));
setTableName(XMLHandler.getTagValue(stepnode, "tableName"));
setPartition(XMLHandler.getTagValue(stepnode, "partition"));
int nrFields = XMLHandler.countNodes(stepnode, "fields");
odpsFields = new ArrayList<OdpsField>(nrFields);
for (int i = 0; i < nrFields; i++) {
Node fieldNode = XMLHandler.getSubNodeByNr(stepnode, "fields", i);
OdpsField field = new OdpsField();
field.setName(XMLHandler.getTagValue(fieldNode, "name"));
field.setType(XMLHandler.getTagValue(fieldNode, "type"));
field.setComment(XMLHandler.getTagValue(fieldNode, "comment"));
odpsFields.add(field);
}
}
示例3: loadXML
import org.pentaho.di.core.exception.KettleXMLException; //導入依賴的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);
}
}
示例4: loadXML
import org.pentaho.di.core.exception.KettleXMLException; //導入依賴的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);
}
}
示例5: loadXML
import org.pentaho.di.core.exception.KettleXMLException; //導入依賴的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);
}
}
示例6: loadXML
import org.pentaho.di.core.exception.KettleXMLException; //導入依賴的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 );
}
}
示例7: loadXML
import org.pentaho.di.core.exception.KettleXMLException; //導入依賴的package包/類
@Override
public void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ) throws KettleXMLException {
super.loadXML( stepnode, databases, metaStore );
setIncomingFieldname( XMLHandler.getTagValue( stepnode, "incomingFieldname" ) );
setOrganizationIdFieldname( XMLHandler.getTagValue( stepnode, "organizationIdFieldname" ) );
setUrlFieldname( XMLHandler.getTagValue( stepnode, "urlFieldname" ) );
setExternalIdFieldname( XMLHandler.getTagValue( stepnode, "externalIdFieldname" ) );
setNameFieldname( XMLHandler.getTagValue( stepnode, "nameFieldname" ) );
setCreatedAtFieldname( XMLHandler.getTagValue( stepnode, "createdAtFieldname" ) );
setUpdatedAtFieldname( XMLHandler.getTagValue( stepnode, "updatedAtFieldname" ) );
setDetailsFieldname( XMLHandler.getTagValue( stepnode, "detailsFieldname" ) );
setNotesFieldname( XMLHandler.getTagValue( stepnode, "notesFieldname" ) );
setGroupIdFieldname( XMLHandler.getTagValue( stepnode, "groupIdFieldname" ) );
setSharedTicketsFieldname( XMLHandler.getTagValue( stepnode, "sharedTicketsFieldname" ) );
setSharedCommentsFieldname( XMLHandler.getTagValue( stepnode, "sharedCommentsFieldname" ) );
setTagFieldname( XMLHandler.getTagValue( stepnode, "tagFieldname" ) );
setDomainNameFieldname( XMLHandler.getTagValue( stepnode, "domainNameFieldname" ) );
setOrgFieldNameFieldname( XMLHandler.getTagValue( stepnode, "orgFieldNameFieldname" ) );
setOrgFieldValueFieldname( XMLHandler.getTagValue( stepnode, "orgFieldValueFieldname" ) );
setOrganizationStepName( XMLHandler.getTagValue( stepnode, "organizationStepName" ) );
setOrganizationTagStepName( XMLHandler.getTagValue( stepnode, "organizationTagStepName" ) );
setOrganizationFieldStepName( XMLHandler.getTagValue( stepnode, "organizationFieldStepName" ) );
setOrganizationDomainStepName( XMLHandler.getTagValue( stepnode, "organizationDomainStepName" ) );
}
示例8: loadXML
import org.pentaho.di.core.exception.KettleXMLException; //導入依賴的package包/類
@Override
public void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ) throws KettleXMLException {
super.loadXML( stepnode, databases, metaStore );
setSuspendedTicketIdFieldname( XMLHandler.getTagValue( stepnode, "suspendedTicketIdFieldname" ) );
setSuspendedTicketUrlFieldname( XMLHandler.getTagValue( stepnode, "suspendedTicketUrlFieldname" ) );
setAuthorFieldname( XMLHandler.getTagValue( stepnode, "authorFieldname" ) );
setSubjectFieldname( XMLHandler.getTagValue( stepnode, "subjectFieldname" ) );
setContentFieldname( XMLHandler.getTagValue( stepnode, "contentFieldname" ) );
setCauseFieldname( XMLHandler.getTagValue( stepnode, "causeFieldname" ) );
setMessageIdFieldname( XMLHandler.getTagValue( stepnode, "messageIdFieldname" ) );
setTicketIdFieldname( XMLHandler.getTagValue( stepnode, "ticketIdFieldname" ) );
setRecipientFieldname( XMLHandler.getTagValue( stepnode, "recipientFieldname" ) );
setCreatedAtFieldname( XMLHandler.getTagValue( stepnode, "createdAtFieldname" ) );
setUpdatedAtFieldname( XMLHandler.getTagValue( stepnode, "updatedAtFieldname" ) );
setViaFieldname( XMLHandler.getTagValue( stepnode, "viaFieldname" ) );
setBrandIdFieldname( XMLHandler.getTagValue( stepnode, "brandIdFieldname" ) );
}
示例9: readData
import org.pentaho.di.core.exception.KettleXMLException; //導入依賴的package包/類
private void readData( Node stepnode ) throws KettleXMLException {
try {
this.structureName = XMLHandler.getTagValue( stepnode, STRUCTNAME_TAG );
// get the metadata
Node fieldsNode = XMLHandler.getSubNode( stepnode, XML_FIELDS_TAG );
RowMeta rowMeta = new RowMeta( XMLHandler.getSubNode( fieldsNode, RowMeta.XML_META_TAG ) );
fields = rowMeta.getValueMetaList();
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, "HazelcastOutputMeta.Exception.UnableToReadStepInfo" ), e );
}
}
示例10: loadXML
import org.pentaho.di.core.exception.KettleXMLException; //導入依賴的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$
success_condition = XMLHandler.getTagValue(entrynode, "success_condition");
limit_folders = XMLHandler.getTagValue(entrynode, "limit_folders");
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];
// 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$
}
} catch (KettleXMLException xe) {
throw new KettleXMLException(BaseMessages.getString(PKG, "JobEntryDeleteFolders.UnableToLoadFromXml"), xe); //$NON-NLS-1$
}
}
示例11: loadXML
import org.pentaho.di.core.exception.KettleXMLException; //導入依賴的package包/類
public void loadXML(Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers, Repository rep) throws KettleXMLException
{
try
{
super.loadXML(entrynode, databases, slaveServers);
smtpCheck = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "smtpCheck"));
timeout=XMLHandler.getTagValue(entrynode, "timeout");
defaultSMTP=XMLHandler.getTagValue(entrynode, "defaultSMTP");
emailSender=XMLHandler.getTagValue(entrynode, "emailSender");
emailAddress=XMLHandler.getTagValue(entrynode, "emailAddress");
}
catch(Exception e)
{
throw new KettleXMLException(BaseMessages.getString(PKG, "JobEntryMailValidator.Meta.UnableToLoadFromXML"), e);
}
}
示例12: readData
import org.pentaho.di.core.exception.KettleXMLException; //導入依賴的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 );
}
}
示例13: loadXML
import org.pentaho.di.core.exception.KettleXMLException; //導入依賴的package包/類
public void loadXML(Node stepnode, List<DatabaseMeta> databases, Map<String, Counter> counters) throws KettleXMLException {
try {
// XML: read the fielname
fieldName = Const.NVL(XMLHandler.getTagValue(stepnode, "field_name"), ""); //$NON-NLS-1$
// XML: read the GUI status
sourceGUIStatus = Const.toInt(XMLHandler.getTagValue(stepnode, "source_gui_status"), STATUS_AUTO); //$NON-NLS-1$
targetGUIStatus = Const.toInt(XMLHandler.getTagValue(stepnode, "target_gui_status"), STATUS_EXISTING); //$NON-NLS-1$
// XML: read the SRS source object
Node sourceSRSMetaNode = XMLHandler.getSubNode(stepnode, "source_srs"); //$NON-NLS-1$
sourceSRS = (sourceSRSMetaNode != null) ? SRSFactory.createSRS(sourceSRSMetaNode) : SRS.UNKNOWN;
// XML: read the SRS target object
Node targetSRSMetaNode = XMLHandler.getSubNode(stepnode, "target_srs"); //$NON-NLS-1$
targetSRS = (targetSRSMetaNode != null) ? SRSFactory.createSRS(targetSRSMetaNode) : SRS.UNKNOWN;
}
catch (Exception e) {
throw new KettleXMLException(Messages.getString("SRSTransformationMeta.Exception.UnableToLoadStepInfoFromXML"), e); //$NON-NLS-1$
}
}
示例14: loadXML
import org.pentaho.di.core.exception.KettleXMLException; //導入依賴的package包/類
public void loadXML(Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers, Repository rep) throws KettleXMLException
{
try
{
super.loadXML(entrynode, databases, slaveServers);
port = XMLHandler.getTagValue(entrynode, "port");
serverName = XMLHandler.getTagValue(entrynode, "servername");
oid = XMLHandler.getTagValue(entrynode, "oid");
message = XMLHandler.getTagValue(entrynode, "message");
comString = XMLHandler.getTagValue(entrynode, "comstring");
timeout = XMLHandler.getTagValue(entrynode, "timeout");
nrretry = XMLHandler.getTagValue(entrynode, "nrretry");
targettype = XMLHandler.getTagValue(entrynode, "targettype");
user = XMLHandler.getTagValue(entrynode, "user");
passphrase = XMLHandler.getTagValue(entrynode, "passphrase");
engineid = XMLHandler.getTagValue(entrynode, "engineid");
}
catch(KettleXMLException xe)
{
throw new KettleXMLException("Unable to load job entry of type 'SNMPTrap' from XML node", xe);
}
}
示例15: readData
import org.pentaho.di.core.exception.KettleXMLException; //導入依賴的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");
rowLimit = Const.toInt(XMLHandler.getTagValue(stepnode, "limit"), 0); //$NON-NLS-1$
rowNrAdded = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "add_rownr")); //$NON-NLS-1$ //$NON-NLS-2$
rowNrField = XMLHandler.getTagValue(stepnode, "field_rownr"); //$NON-NLS-1$
passingThruFields = YES.equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "passing_through_fields"));
acceptingStepName = XMLHandler.getTagValue(stepnode, "accept_stepname");
}
catch(Exception e)
{
throw new KettleXMLException(Messages.getString("GMLFileInputMeta.Exception.UnableToReadStepInformationFromXML"), e); //$NON-NLS-1$
}
}