Package hu.sztaki.ilab.longneck.process.block

Examples of hu.sztaki.ilab.longneck.process.block.SetCharacterCase


        VariableSpace scope = new VariableSpace();
       
        r.add(new Field("test"));
        r.get("test").setValue("NAgy HAjnalka");
       
        SetCharacterCase scc = new SetCharacterCase();
        scc.setCase(CharacterCase.Lowercase);
        scc.setCharacters(CharacterTarget.ALL);
        scc.setApplyTo(Arrays.asList(new String[] { "test" }));
       
        scc.apply(r, scope);
       
        scc.setCase(CharacterCase.Uppercase);
        scc.setCharacters(CharacterTarget.TOKEN_INITIALS_NON_ALNUM);
        scc.setApplyTo(Arrays.asList(new String[] { "test" }));
       
        scc.apply(r, scope);
       
        Assert.assertEquals("Nagy Hajnalka", r.get("test").getValue());
    }
View Full Code Here

TOP

Related Classes of hu.sztaki.ilab.longneck.process.block.SetCharacterCase

Copyright © 2018 www.massapicom. 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.