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


Java Digester.addSetNext方法代码示例

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


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

示例1: createStopDigester

import org.apache.commons.digester.Digester; //导入方法依赖的package包/类
/**
 * Create and configure the Digester we will be using for shutdown.
 */
protected Digester createStopDigester() {

    // Initialize the digester
    Digester digester = new Digester();
    if (debug)
        digester.setDebug(999);

    // Configure the rules we need for shutting down
    digester.addObjectCreate("Server",
                             "org.apache.catalina.core.StandardServer",
                             "className");
    digester.addSetProperties("Server");
    digester.addSetNext("Server",
                        "setServer",
                        "org.apache.catalina.Server");

    return (digester);

}
 
开发者ID:c-rainstorm,项目名称:jerrydog,代码行数:23,代码来源:Catalina.java

示例2: addExpressionRules

import org.apache.commons.digester.Digester; //导入方法依赖的package包/类
protected <T> void addExpressionRules(Digester digester, String expressionPattern,
		Class<T> factoryClass, String setterMethod, boolean jrNamespace)
{
	String originalNamespace = digester.getRuleNamespaceURI();
	if (jrNamespace)
	{
		digester.setRuleNamespaceURI(JRXmlWriter.JASPERREPORTS_NAMESPACE.getNamespaceURI());
	}
	
	digester.addFactoryCreate(expressionPattern, factoryClass);
	digester.addCallMethod(expressionPattern, "setText", 0);
	digester.addSetNext(expressionPattern, setterMethod,
			JRExpression.class.getName());
	
	if (jrNamespace)
	{
		digester.setRuleNamespaceURI(originalNamespace);
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:20,代码来源:ComponentsXmlDigesterConfigurer.java

示例3: addBarcodeRules

import org.apache.commons.digester.Digester; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
protected <T> void addBarcodeRules(Digester digester, 
		String barcodePattern, Class<T> barcodeComponentClass,
		String[] ignoredProperties)
{
	digester.addObjectCreate(barcodePattern, barcodeComponentClass);
	digester.addSetProperties(barcodePattern,
			//properties to be ignored by this rule
			ignoredProperties, 
			new String[0]);
	//rule to set evaluation time
	digester.addRule(barcodePattern, 
			new XmlConstantPropertyRule(
					JRXmlConstants.ATTRIBUTE_evaluationTime, "evaluationTimeValue",
					EvaluationTimeEnum.values()));
	
	String codeExpressionPattern = barcodePattern + "/codeExpression";
	digester.addFactoryCreate(codeExpressionPattern, 
			JRExpressionFactory.StringExpressionFactory.class.getName());
	digester.addCallMethod(codeExpressionPattern, "setText", 0);
	digester.addSetNext(codeExpressionPattern, "setCodeExpression", 
			JRExpression.class.getName());
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:24,代码来源:ComponentsXmlDigesterConfigurer.java

示例4: addListRules

import org.apache.commons.digester.Digester; //导入方法依赖的package包/类
protected void addListRules(Digester digester)
{
	String listPattern = "*/componentElement/list";
	digester.addObjectCreate(listPattern, StandardListComponent.class);
	digester.addSetProperties(listPattern,
			//properties to be ignored by this rule
			new String[]{"printOrder"}, 
			new String[0]);
	digester.addRule(listPattern, new XmlConstantPropertyRule(
			"printOrder", "printOrderValue", PrintOrderEnum.values()));
	
	String listContentsPattern = listPattern + "/listContents";
	digester.addObjectCreate(listContentsPattern, DesignListContents.class);
	digester.addSetProperties(listContentsPattern);
	digester.addSetNext(listContentsPattern, "setContents");
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:17,代码来源:ComponentsXmlDigesterConfigurer.java

示例5: getWebworkPackages

import org.apache.commons.digester.Digester; //导入方法依赖的package包/类
/**
 * Parse file to webwork configuration
 *
 * @param webworkConfigurationFile Webwork configuration file
 * @return Webwork configuration package list
 * @throws IOException IOException
 * @throws SAXException SAXException
 */
@SuppressWarnings("unchecked")
public List<WebworkPackage> getWebworkPackages(File webworkConfigurationFile) throws IOException, SAXException {
	final Digester digester = new Digester();
	digester.addObjectCreate("xwork", ArrayList.class);
	digester.addObjectCreate("xwork/package", WebworkPackage.class);
	digester.addSetProperties("xwork/package", "name", "name");
	digester.addSetProperties("xwork/package", "namespace", "namespace");
	digester.addObjectCreate("xwork/package/action", WebworkAction.class);
	digester.addSetProperties("xwork/package/action", "name", "name");
	digester.addSetProperties("xwork/package/action", "class", "className");
	digester.addSetNext("xwork/package/action", "addAction");
	digester.addSetNext("xwork/package", "add");

	return (List<WebworkPackage>)digester.parse(webworkConfigurationFile);
}
 
开发者ID:unchai,项目名称:maven-precheck-plugin,代码行数:24,代码来源:WebworkConfigurationParser.java

示例6: processSources

import org.apache.commons.digester.Digester; //导入方法依赖的package包/类
/**
 * <p>Read xml configuration for source directories into SourceDirectory instances.</p>
 * <p/>
 * <p>package scope so that it could be individually tested</p>
 *
 * @param xml String xml to parse
 * @throws IOException  when an input/output error occurs
 * @throws SAXException when given xml can not be parsed
 */
void processSources(final String xml)
        throws IOException, SAXException {

    final Digester digester = getDigester();

    digester.addObjectCreate(XmlConfiguration.sources, ArrayList.class);
    digester.addObjectCreate(XmlConfiguration.source, SourceDirectory.class);
    digester.addCallMethod(XmlConfiguration.source, "setPath", 0);
    digester.addSetProperties(XmlConfiguration.source, "not-found", "notFound");
    digester.addSetNext(XmlConfiguration.source, "add");

    final StringReader reader = new StringReader(xml);
    Object o = digester.parse(reader);

    if ((o != null) && o instanceof List) {

        final List<SourceDirectory> parsedSources = (ArrayList<SourceDirectory>) o;

        for (final SourceDirectory sourceDirectory : parsedSources) {

            getSources().add(sourceDirectory);
        }
    }
}
 
开发者ID:AndyScherzinger,项目名称:architecturerules,代码行数:34,代码来源:DigesterConfigurationFactory.java

示例7: processRules

import org.apache.commons.digester.Digester; //导入方法依赖的package包/类
/**
 * <p>Process XML configuration to read rules elements into <code>Rules</code></p>
 * <p/>
 * <p>package scope so that it could be individually tested</p>
 *
 * @param xml String xml to parse
 * @throws IOException  when an input/output error occurs
 * @throws SAXException when given xml can not be parsed
 */
void processRules(final String xml)
        throws IOException, SAXException {

    final Digester digester = getDigester();

    digester.addObjectCreate(XmlConfiguration.rules, ArrayList.class);
    digester.addObjectCreate(XmlConfiguration.rule, Rule.class);
    digester.addSetProperties(XmlConfiguration.rule, "id", "idString");
    digester.addCallMethod(XmlConfiguration.ruleComment, "setComment", 0);
    digester.addCallMethod(XmlConfiguration.rulePackage, "addPackage", 0);
    digester.addCallMethod(XmlConfiguration.ruleViolation, "addViolation", 0);
    digester.addSetNext(XmlConfiguration.rule, "add");

    final StringReader reader = new StringReader(xml);

    Object o = digester.parse(reader);

    if (o != null) {

        final List<Rule> parsedRules = (ArrayList<Rule>) o;
        getRules().addAll(parsedRules);
    }
}
 
开发者ID:AndyScherzinger,项目名称:architecturerules,代码行数:33,代码来源:DigesterConfigurationFactory.java

示例8: configureToolEventsDefDigester

import org.apache.commons.digester.Digester; //导入方法依赖的package包/类
public static Digester configureToolEventsDefDigester(String prefix, Digester digester) {        
    // root
    digester.addObjectCreate(prefix + "toolEventsDef", ArrayList.class );

    // tool tag
    ToolFactoryImpl toolFactory = new ToolFactoryImpl();
    digester.addFactoryCreate(prefix + "toolEventsDef/tool", toolFactory);
    digester.addBeanPropertySetter(prefix + "toolEventsDef/tool/toolId", "toolId" );
    digester.addBeanPropertySetter(prefix + "toolEventsDef/tool/additionalToolIds", "additionalToolIdsStr" );
    digester.addBeanPropertySetter(prefix + "toolEventsDef/tool/selected", "selected" );
    digester.addSetNext(prefix + "toolEventsDef/tool", "add" );

    // event tag
    EventFactoryImpl eventFactoryImpl = new EventFactoryImpl();
    digester.addFactoryCreate(prefix + "toolEventsDef/tool/event", eventFactoryImpl);
    digester.addBeanPropertySetter(prefix + "toolEventsDef/tool/event/eventId", "eventId" );
    digester.addBeanPropertySetter(prefix + "toolEventsDef/tool/event/selected", "selected" );
    digester.addBeanPropertySetter(prefix + "toolEventsDef/tool/event/anonymous", "anonymous" );
    digester.addSetNext(prefix + "toolEventsDef/tool/event", "addEvent" );
    
    return digester;
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:23,代码来源:DigesterUtil.java

示例9: configurePrefsDigester

import org.apache.commons.digester.Digester; //导入方法依赖的package包/类
public static Digester configurePrefsDigester(Digester digester) {        
    // prefs root
    digester.addObjectCreate("prefs", PrefsData.class );
    digester.addSetProperties("prefs" );
    digester.addBeanPropertySetter("prefs/listToolEventsOnlyAvailableInSite", "setListToolEventsOnlyAvailableInSite" );
    digester.addBeanPropertySetter("prefs/chartIn3D", "setChartIn3D" );
    digester.addBeanPropertySetter("prefs/chartTransparency", "setChartTransparency" );
    digester.addBeanPropertySetter("prefs/itemLabelsVisible", "setItemLabelsVisible" );
    digester.addBeanPropertySetter("prefs/useAllTools", "setUseAllTools" );
    
    // toolEventsDef
    digester = configureToolEventsDefDigester("prefs/", digester);
    digester.addSetNext("prefs/toolEventsDef", "setToolEventsDef" );
    
    
    return digester;
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:18,代码来源:DigesterUtil.java

示例10: createDigester

import org.apache.commons.digester.Digester; //导入方法依赖的package包/类
private static Digester createDigester() {
    Digester d = new Digester();
    d.setValidating(false);

    d.addObjectCreate("hyracks-cluster", HyracksCluster.class);
    d.addSetProperties("hyracks-cluster");

    d.addObjectCreate("hyracks-cluster/cluster-controller", ClusterController.class);
    d.addSetProperties("hyracks-cluster/cluster-controller");
    d.addSetNext("hyracks-cluster/cluster-controller", "setClusterController");

    d.addObjectCreate("hyracks-cluster/node-controllers/node-controller", NodeController.class);
    d.addSetProperties("hyracks-cluster/node-controllers/node-controller");
    d.addSetNext("hyracks-cluster/node-controllers/node-controller", "addNodeController");

    d.addObjectCreate("*/container-specification", ContainerSpecification.class);
    d.addSetProperties("*/container-specification");
    d.addSetNext("*/container-specification", "setContainerSpecification");
    return d;
}
 
开发者ID:apache,项目名称:incubator-asterixdb-hyracks,代码行数:21,代码来源:ManifestParser.java

示例11: configureDigester

import org.apache.commons.digester.Digester; //导入方法依赖的package包/类
private static void configureDigester(Digester digester) {
    digester.setValidating(false);

    digester.addObjectCreate("params", ClientCertificate.class);
    digester.addObjectCreate("*/param/value/struct/member/", Member.class);
    digester.addCallMethod("*/param/value/struct/member/name",
            "setName", 0);
    digester.addCallMethod("*/param/value/struct/member/value/string",
            "addValue", 0);
    digester.addObjectCreate("*/param/value/struct/member/value/array",
            ArrayList.class);
    digester.addCallMethod(
            "*/param/value/struct/member/value/array/data/value/string",
            "add", 0);
    digester.addSetNext("*/param/value/struct/member/value/array",
            "setValues");
    digester.addSetNext("*/param/value/struct/member", "addMember");
}
 
开发者ID:spacewalkproject,项目名称:spacewalk,代码行数:19,代码来源:ClientCertificateDigester.java

示例12: parseURL

import org.apache.commons.digester.Digester; //导入方法依赖的package包/类
private void parseURL(URL u) {
    Digester d = new Digester();
    d.setValidating(false);

    d.push(this);
    d.addObjectCreate("factory/template", HashMap.class);
    d.addRule("factory/template", new AttributeCopyRule());
    d.addSetNext("factory/template", "addFactoryTemplate");

    try {
        d.parse(u.openStream());
    }
    catch (Exception e) {
        throw new ManifestFactoryParseException("Unable to parse " +
                                                builder.getManifestFilename(), e);
    }
}
 
开发者ID:spacewalkproject,项目名称:spacewalk,代码行数:18,代码来源:ManifestFactory.java

示例13: getFormat

import org.apache.commons.digester.Digester; //导入方法依赖的package包/类
protected Format getFormat() throws IOException, SAXException {
    // parse the XML ...
    // create a field object per field element
    if (format == null) {
        Digester digester = new Digester();
        digester.setValidating(true);
        digester.setUseContextClassLoader(true);
        digester.addObjectCreate("format", "com.sapienter.jbilling.server.mediation.Format");
        digester.addObjectCreate("format/field", "com.sapienter.jbilling.server.mediation.FormatField");
        digester.addCallMethod("format/field/name","setName",0);
        digester.addCallMethod("format/field/type","setType",0);
        digester.addCallMethod("format/field/startPosition","setStartPosition",0);
        digester.addCallMethod("format/field/durationFormat","setDurationFormat",0);
        digester.addCallMethod("format/field/length","setLength",0);
        digester.addCallMethod("format/field/isKey","isKeyTrue");
        digester.addSetNext("format/field", "addField", "com.sapienter.jbilling.server.mediation.FormatField");

        format = (Format) digester.parse(new File(formatFileName));

        LOG.debug("using format: " + format);
    }

    return format;

}
 
开发者ID:maxdelo77,项目名称:replyit-master-3.2-final,代码行数:26,代码来源:AbstractFileReader.java

示例14: DigesterXmlDocument

import org.apache.commons.digester.Digester; //导入方法依赖的package包/类
public DigesterXmlDocument() {

        dig = new Digester();
        dig.setValidating(false);

        dig.addObjectCreate("address-book", DigesterXmlDocument.class);
        dig.addObjectCreate("address-book/contact", Contact.class);

        dig.addSetProperties("address-book/contact", "type", "type");

        dig.addCallMethod("address-book/contact/name", "setName", 0);
        dig.addCallMethod("address-book/contact/address", "setAddress", 0);
        dig.addCallMethod("address-book/contact/city", "setCity", 0);
        dig.addCallMethod("address-book/contact/province", "setProvince", 0);
        dig.addCallMethod("address-book/contact/postalcode", "setPostalcode", 0);
        dig.addCallMethod("address-book/contact/country", "setCountry", 0);
        dig.addCallMethod("address-book/contact/telephone", "setTelephone", 0);

        dig.addSetNext("address-book/contact", "populateDocument");
    }
 
开发者ID:xuzhikethinker,项目名称:t4f-data,代码行数:21,代码来源:DigesterXmlDocument.java

示例15: addEventDigesterRules

import org.apache.commons.digester.Digester; //导入方法依赖的package包/类
protected static void addEventDigesterRules(Digester digester)
{
  // Java Enterprise 5.0
  // digester.setRuleNamespaceURI("http://java.sun.com/xml/ns/javaee");

  // Maven Faces Plugin
  digester.setRuleNamespaceURI("http://myfaces.apache.org/maven-faces-plugin");

  // faces-config/faces-config-extension/event
  digester.addObjectCreate("faces-config/faces-config-extension/event", EventBean.class);
  digester.addBeanPropertySetter("faces-config/faces-config-extension/event/description");
  digester.addBeanPropertySetter("faces-config/faces-config-extension/event/event-type",
                                 "eventType");
  digester.addBeanPropertySetter("faces-config/faces-config-extension/event/event-class",
                                 "eventClass");
  digester.addBeanPropertySetter("faces-config/faces-config-extension/event/event-listener-class",
                                 "eventListenerClass");
  digester.addBeanPropertySetter("faces-config/faces-config-extension/event/event-source-interface",
                                 "eventSourceInterface");
  digester.addSetNext("faces-config/faces-config-extension/event", "addEvent",
                      EventBean.class.getName());
}
 
开发者ID:alessandroleite,项目名称:maven-jdev-plugin,代码行数:23,代码来源:FacesConfigParser.java


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