Package com.mycila.xmltool

Examples of com.mycila.xmltool.CallBack


     */
    public AdditionalHeaderDefinition(XMLTag doc) {
        if (doc == null) {
            throw new IllegalArgumentException("The header definition XML document cannot be null");
        }
        doc.gotoRoot().forEachChild(new CallBack() {
            public void execute(XMLTag doc) {
                final String type = doc.getCurrentTagName().toLowerCase();
                HeaderDefinition definition = definitions.get(type);
                if (definition == null) {
                    definition = new HeaderDefinition(type);
View Full Code Here


        ValidationResult res = tag.validate(HEADER_STYLES_SCHEMA);
        if (res.hasError()) {
            throw new LicenseManagerException("Style definition at '" + styleLocation + "' is not valid: " + res.getErrorMessages()[0]);
        }
        final String ns = tag.getPefix("http://mycila.com/license/styles/1.0");
        tag.forEachChild(new CallBack() {
            public void execute(XMLTag doc) {
                Builder builder = add(doc.getAttribute("name"))
                        .defineBegining(doc.getTextOrCDATA("%1$s:definition/%1$s:begining", ns))
                        .defineStartLine(doc.getTextOrCDATA("%1$s:definition/%1$s:startLine", ns))
                        .defineEnding(doc.getTextOrCDATA("%1$s:definition/%1$s:ending", ns))
View Full Code Here

        XMLTag tag = XMLDoc.from(mappingLocation, false);
        ValidationResult res = tag.validate(DOCUMENT_TYPES_SCHEMA);
        if (res.hasError()) {
            throw new LicenseManagerException("Mapping definition at '" + mappingLocation + "' is not valid: " + res.getErrorMessages()[0]);
        }
        tag.forEachChild(new CallBack() {
            public void execute(XMLTag doc) {
                map(doc.getAttribute("extension")).to(headerStyles.getByName(doc.getAttribute("style")));
            }
        });
        return this;
View Full Code Here

     */
    public AdditionalHeaderDefinition(XMLTag doc) {
        if (doc == null) {
            throw new IllegalArgumentException("The header definition XML document cannot be null");
        }
        doc.gotoRoot().forEachChild(new CallBack() {
            public void execute(XMLTag doc) {
                final String type = doc.getCurrentTagName().toLowerCase();
                HeaderDefinition definition = definitions.get(type);
                if (definition == null) {
                    definition = new HeaderDefinition(type);
View Full Code Here

TOP

Related Classes of com.mycila.xmltool.CallBack

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.