Package org.apache.commons.digester3

Examples of org.apache.commons.digester3.Digester.push()


        d.setErrorHandler(errorHandler);
        d.setClassLoader(PreservationActionServiceFactory.class.getClassLoader());

        services.clear();

        d.push(services);
        d.addFactoryCreate("*/preservationActionService", PreservationActionServiceFactory.class);
        d.addSetNext("*/preservationActionService", "add");
        d.addCallMethod("*/preservationActionService/name", "setName", 0);
        d.addCallMethod("*/preservationActionService/description", "setDescription", 0);
        d.addCallMethod("*/preservationActionService/descriptor", "setDescriptor", 0);
View Full Code Here


    private void parseConfig(InputStream config) throws IllegalArgumentException {
        Digester digester = new Digester();
        digester.setValidating(true);
        digester.setErrorHandler(new StrictErrorHandler());

        digester.push(this);
        digester.addObjectCreate("*/tool", Tool.class);
        digester.addSetProperties("*/tool");

        digester.addObjectCreate("*/config", ToolConfig.class);
        digester.addSetProperties("*/config");
 
View Full Code Here

        Digester digester = new Digester();
        digester.setValidating(false);
        digester.setErrorHandler(new StrictErrorHandler());

        digester.push(allRegistries);
        digester.addObjectCreate("*/registry", PreservationActionRegistryDefinition.class);
        digester.addBeanPropertySetter("*/registry/shortname", "shortname");
        digester.addBeanPropertySetter("*/registry/logo", "logo");
        digester.addBeanPropertySetter("*/registry/url", "url");
        digester.addBeanPropertySetter("*/registry/type", "type");
View Full Code Here

            // At the moment XML files for template tree's are only used
            // internally,
            // later we will define a schema and use it also for validation

            digester.push(this);

            digester.addObjectCreate("*/template", TemplateTree.class);
            digester.addSetProperties("*/template");
            digester.addSetRoot("*/template", "setTemplate");
            // digester.addSetNext("*/template/name", "setName");
View Full Code Here

                .addSchemaLocation(PlanXMLConstants.TAVERNA_SCHEMA_URI, PlanXMLConstants.TAVERNA_SCHEMA_LOCATION);

            digester.setEntityResolver(schemaResolver);
            digester.setErrorHandler(new StrictErrorHandler());
            digester.setNamespaceAware(true);
            digester.push(this);

            PlanParser.addRules(digester);

            digester.setUseContextClassLoader(true);
            plans = new ArrayList<Plan>();
View Full Code Here

            file = factory.create(buildXml);
            Digester digester = new Digester();
            digester.setValidating(false);
            digester.setClassLoader(ModuleDetector.class.getClassLoader());

            digester.push(new StringBuffer());
            String xPath = "project";
            digester.addCallMethod(xPath, "append", 1);
            digester.addCallParam(xPath, 0, "name");

            StringBuffer result = (StringBuffer)digester.parse(file);
View Full Code Here

            file = factory.create(pom);
            Digester digester = new Digester();
            digester.setValidating(false);
            digester.setClassLoader(ModuleDetector.class.getClassLoader());

            digester.push(new StringBuffer());
            digester.addCallMethod("project/name", "append", 0);

            StringBuffer result = (StringBuffer)digester.parse(file);
            return result.toString();
        }
View Full Code Here

            Digester d = new Digester(factory.newSAXParser());
           
            d.setValidating(false);
            // StrictErrorHandler errorHandler = new StrictErrorHandler();
            // d.setErrorHandler(errorHandler);
            d.push(this);
            // to read the version we have to support all versions:
            d.addSetProperties("*/projects", "version", "fileVersion");
            // manually migrated projects may have the file version in the node
            // projects/project
            d.addSetProperties("*/projects/project", "version", "fileVersion");
View Full Code Here

            Digester digester = new Digester(parser);
//            digester.setEntityResolver(new SchemaResolver().addSchemaLocation(
//                "http://freemind.sourceforge.net/freemind.xsd", "data/schemas/freemind.xsd"));
//            digester.setErrorHandler(new StrictErrorHandler());

            digester.push(map);

            digester.addObjectCreate("*/node", "eu.scape_project.planning.xml.freemind.Node");
            digester.addSetProperties("*/node");
            digester.addCallMethod("*/node/hook/text", "setDESCRIPTION", 0);
            digester.addSetNext("*/node", "addChild");
View Full Code Here

        ArrayList<ExtractChangeLogEntry> changeLog = new ArrayList<ExtractChangeLogEntry>();

        Digester digester = new Digester();
        digester.setClassLoader(ExtractChangeLogSet.class.getClassLoader());
        digester.push(changeLog);
        digester.addObjectCreate("*/extractChanges/entry", ExtractChangeLogEntry.class);

        digester.addBeanPropertySetter("*/extractChanges/entry/zipFile");

        digester.addObjectCreate("*/extractChanges/entry/file",
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.