Package org.apache.commons.digester

Examples of org.apache.commons.digester.Digester.peek()


        });
       
        digester.addObjectCreate( "*/photo/raw-conversion", RawSettingsFactory.class );
        digester.addRule( "*/photo/raw-conversion", new Rule() {
            public void end( String namespace, String name ) {
                PhotoInfo p = (PhotoInfo)digester.peek(1);
                RawSettingsFactory f = (RawSettingsFactory) digester.peek();
                try {
                    p.setRawSettings( f.create() );
                } catch (PhotovaultException ex) {
                    digester.createSAXException( ex );
View Full Code Here


       
        digester.addObjectCreate( "*/photo/raw-conversion", RawSettingsFactory.class );
        digester.addRule( "*/photo/raw-conversion", new Rule() {
            public void end( String namespace, String name ) {
                PhotoInfo p = (PhotoInfo)digester.peek(1);
                RawSettingsFactory f = (RawSettingsFactory) digester.peek();
                try {
                    p.setRawSettings( f.create() );
                } catch (PhotovaultException ex) {
                    digester.createSAXException( ex );
                }
View Full Code Here

        digester.addFactoryCreate( "*/instance/crop", new RectangleFactory() );
        digester.addSetNext( "*/instance/crop", "setCropBounds" );
        digester.addRule( "*/instance/hash", new Rule() {
            public void body( String namespace, String name, String text ) {
                byte[] hash = Base64.decode( text );
                ImageInstance i = (ImageInstance) digester.peek();
                i.setHash( hash );
            }
        } );
        digester.addRuleSet( new ChannelMapRuleSet( "*/instance/") );
        digester.addRule( "*/instance/color-mapping", new Rule() {
View Full Code Here

            }
        } );
        digester.addRuleSet( new ChannelMapRuleSet( "*/instance/") );
        digester.addRule( "*/instance/color-mapping", new Rule() {
            public void end( String namespace, String name ) {
                ImageInstance i = (ImageInstance) digester.peek(1);
                ChannelMapOperationFactory f =
                        (ChannelMapOperationFactory) digester.peek();
                i.setColorChannelMapping( f.create() );               
            }
        });
View Full Code Here

        digester.addRuleSet( new ChannelMapRuleSet( "*/instance/") );
        digester.addRule( "*/instance/color-mapping", new Rule() {
            public void end( String namespace, String name ) {
                ImageInstance i = (ImageInstance) digester.peek(1);
                ChannelMapOperationFactory f =
                        (ChannelMapOperationFactory) digester.peek();
                i.setColorChannelMapping( f.create() );               
            }
        });
        // Raw conversion parsing was already specified earlier. We just need a
        // method for binding the RawConversionSettings object to instance
View Full Code Here

        // Raw conversion parsing was already specified earlier. We just need a
        // method for binding the RawConversionSettings object to instance
        digester.addObjectCreate( "*/instance/raw-conversion", RawSettingsFactory.class );
        digester.addRule( "*/instance/raw-conversion", new Rule() {
            public void end( String namespace, String name ) {
                ImageInstance i = (ImageInstance)digester.peek(1);
                RawSettingsFactory f = (RawSettingsFactory) digester.peek();
                try {
                    i.setRawSettings( f.create() );
                } catch (PhotovaultException ex) {
                    digester.createSAXException( ex );
View Full Code Here

        // method for binding the RawConversionSettings object to instance
        digester.addObjectCreate( "*/instance/raw-conversion", RawSettingsFactory.class );
        digester.addRule( "*/instance/raw-conversion", new Rule() {
            public void end( String namespace, String name ) {
                ImageInstance i = (ImageInstance)digester.peek(1);
                RawSettingsFactory f = (RawSettingsFactory) digester.peek();
                try {
                    i.setRawSettings( f.create() );
                } catch (PhotovaultException ex) {
                    digester.createSAXException( ex );
                }
View Full Code Here

        digester.addRule( "*/photos/photo", new Rule() {
            public void end( String namespace, String name ) {
                Boolean isCreatingNew = (Boolean) digester.pop( STACK_CREATING_NEW );
                if ( isCreatingNew.booleanValue() ) {
                    photoCount++;
                    fireObjectImportedEvent( digester.peek() );
                }
            }
        });
        digester.addCallMethod( "*/photos/photo/shooting-place", "setShootingPlace", 0 );
        digester.addCallMethod( "*/photos/photo/photographer", "setPhotographer", 0 );
View Full Code Here

            String src = attributes.getValue("src");
            if (SCXMLHelper.isStringEmpty(src)) {
                return;
            }
            Digester digester = getDigester();
            SCXML scxml = (SCXML) digester.peek(digester.getCount() - 1);
            // 1) Digest the external SCXML file
            SCXML externalSCXML = null;
            String path;
            Digester externalSrcDigester;
            if (pr == null) {
View Full Code Here

            String src = attributes.getValue("src");
            if (SCXMLHelper.isStringEmpty(src)) {
                return;
            }
            Digester digester = getDigester();
            SCXML scxml = (SCXML) digester.peek(digester.getCount() - 1);
            // 1) Digest the external SCXML file
            SCXML externalSCXML = null;
            String path;
            Digester externalSrcDigester;
            if (pr == null) {
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.