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


Java XMLHandler.closeTag方法代码示例

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


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

示例1: copyJobEntries

import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
public void copyJobEntries(JobMeta jobMeta, JobEntryCopy jec[])
{
	if (jec == null || jec.length == 0)
		return;

	String xml = XMLHandler.getXMLHeader();
	xml += XMLHandler.openTag(Spoon.XML_TAG_JOB_JOB_ENTRIES) + Const.CR; //$NON-NLS-1$

	for (int i = 0; i < jec.length; i++)
	{
		if (jec[i]==null)
			continue;
		
		xml += jec[i].getXML();
	}

	xml += "    " + XMLHandler.closeTag(Spoon.XML_TAG_JOB_JOB_ENTRIES) + Const.CR; //$NON-NLS-1$

	spoon.toClipboard(xml);
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:21,代码来源:SpoonJobDelegate.java

示例2: copyJobEntries

import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
public void copyJobEntries(JobMeta jobMeta, List<JobEntryCopy> jec)
{
	if (jec == null || jec.size() == 0)
		return;

	String xml = XMLHandler.getXMLHeader();
	xml += XMLHandler.openTag(Spoon.XML_TAG_JOB_JOB_ENTRIES) + Const.CR;

	for (int i = 0; i < jec.size(); i++)
	{
		xml += jec.get(i).getXML();
	}

	xml += "    " + XMLHandler.closeTag(Spoon.XML_TAG_JOB_JOB_ENTRIES) + Const.CR; //$NON-NLS-1$

	spoon.toClipboard(xml);
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:18,代码来源:SpoonJobDelegate.java

示例3: getXML

import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
public String getXML(int level) throws KettleValueException
{
	String retval="";
	String indent1 = Const.rightPad(" ", level);
	String indent2 = Const.rightPad(" ", level+1);
	String indent3 = Const.rightPad(" ", level+2);

	retval+= indent1+XMLHandler.openTag(XML_TAG)+Const.CR;

	retval+=indent2+XMLHandler.addTagValue("negated",    isNegated());

	if (getOperator()!=OPERATOR_NONE)
	{
		retval+=indent2+XMLHandler.addTagValue("operator",  Const.rtrim(getOperatorDesc()));
	}

	if (isAtomic())
	{
		retval+=indent2+XMLHandler.addTagValue("leftvalue",  getLeftValuename());
		retval+=indent2+XMLHandler.addTagValue("function",   getFunctionDesc());
		retval+=indent2+XMLHandler.addTagValue("rightvalue", getRightValuename());
		if (getRightExact()!=null) 
		{
			retval+=indent2+getRightExact().getXML();
		}
	}
	else
	{
		retval+=indent2+"<conditions>"+Const.CR;
		for (int i=0;i<nrConditions();i++)
		{
			Condition c = getCondition(i);
			retval+=c.getXML(level+2);
		}
		retval+=indent3+"</conditions>"+Const.CR;
	}

	retval+=indent2+XMLHandler.closeTag(XML_TAG)+Const.CR;

	return retval;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:42,代码来源:Condition.java

示例4: copySelected

import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
public void copySelected(TransMeta transMeta, StepMeta stepMeta[], NotePadMeta notePadMeta[]) {
	if (stepMeta == null || stepMeta.length == 0)
		return;

	String xml = XMLHandler.getXMLHeader();
	try {
		xml += XMLHandler.openTag(Spoon.XML_TAG_TRANSFORMATION_STEPS) + Const.CR;
		xml += " <steps>" + Const.CR;

		for (int i = 0; i < stepMeta.length; i++) {
			xml += stepMeta[i].getXML();
		}

		xml += "    </steps>" + Const.CR;

		// 
		// Also check for the hops in between the selected steps...
		//

		xml += "<order>" + Const.CR;
		if (stepMeta != null)
			for (int i = 0; i < stepMeta.length; i++) {
				for (int j = 0; j < stepMeta.length; j++) {
					if (i != j) {
						TransHopMeta hop = transMeta.findTransHop(stepMeta[i], stepMeta[j], true);
						if (hop != null) // Ok, we found one...
						{
							xml += hop.getXML() + Const.CR;
						}
					}
				}
			}
		xml += "  </order>" + Const.CR;

		xml += "  <notepads>" + Const.CR;
		if (notePadMeta != null)
			for (int i = 0; i < notePadMeta.length; i++) {
				xml += notePadMeta[i].getXML();
			}
		xml += "   </notepads>" + Const.CR;

		xml += " " + XMLHandler.closeTag(Spoon.XML_TAG_TRANSFORMATION_STEPS) + Const.CR;

		toClipboard(xml);
	} catch (Exception ex) {
		new ErrorDialog(getShell(), "Error", "Error encoding to XML", ex);
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:49,代码来源:Spoon.java

示例5: copySelected

import org.pentaho.di.core.xml.XMLHandler; //导入方法依赖的package包/类
public void copySelected(TransMeta transMeta, List<StepMeta> steps, List<NotePadMeta> notes) {
  if (steps == null || steps.size() == 0)
    return;

  String xml = XMLHandler.getXMLHeader();
  try {
    xml += XMLHandler.openTag(Spoon.XML_TAG_TRANSFORMATION_STEPS) + Const.CR;
    xml += " <steps>" + Const.CR;

    for (int i = 0; i < steps.size(); i++) {
      xml += steps.get(i).getXML();
    }

    xml += "    </steps>" + Const.CR;

    // 
    // Also check for the hops in between the selected steps...
    //

    xml += "<order>" + Const.CR;
    if (steps != null)
      for (int i = 0; i < steps.size(); i++) {
        for (int j = 0; j < steps.size(); j++) {
          if (i != j) {
            TransHopMeta hop = transMeta.findTransHop(steps.get(i), steps.get(j), true);
            if (hop != null) // Ok, we found one...
            {
              xml += hop.getXML() + Const.CR;
            }
          }
        }
      }
    xml += "  </order>" + Const.CR;

    xml += "  <notepads>" + Const.CR;
    if (notes != null)
      for (int i = 0; i < notes.size(); i++) {
        xml += notes.get(i).getXML();
      }
    xml += "   </notepads>" + Const.CR;

    xml += " " + XMLHandler.closeTag(Spoon.XML_TAG_TRANSFORMATION_STEPS) + Const.CR;

    toClipboard(xml);
  } catch (Exception ex) {
    new ErrorDialog(getShell(), "Error", "Error encoding to XML", ex);
  }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:49,代码来源:Spoon.java


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