Package org.xml.sax

Examples of org.xml.sax.ContentHandler.endElement()


            val = uuid.toCharArray();
            ch.characters(val, 0, val.length);
            ch.endElement(uri, "value", prefix + "value");
            ch.endElement(uri, pN, prefix + pN);

            ch.endElement(uri, nN, prefix + nN);
            ch.endDocument();

        } catch (SAXException e) {
            throw new RepositoryException(e);
        }
View Full Code Here


        attrs.addAttribute("", "id", "id", "", "basic");
        attrs.addAttribute("", "version", "version", "", "1.0.0");

        mock.startElement("", "module", "module", attrs);
        mock.endElement("", "module", "module");

        replayControls();

        Script script = new GroovyShell().parse("processor.module(id:'basic', version:'1.0.0')");
View Full Code Here

                handler.startDocument();
                handler.startPrefixMapping("", "http://springframework.org");
                handler.startElement("http://springframework.org", "root", "root", new AttributesImpl());
                handler.startElement("http://springframework.org", "string", "string", new AttributesImpl());
                handler.characters("Foo".toCharArray(), 0, 3);
                handler.endElement("http://springframework.org", "string", "string");
                handler.endElement("http://springframework.org", "root", "root");
                handler.endPrefixMapping("");
                handler.endDocument();
            }
        };
View Full Code Here

                handler.startPrefixMapping("", "http://springframework.org");
                handler.startElement("http://springframework.org", "root", "root", new AttributesImpl());
                handler.startElement("http://springframework.org", "string", "string", new AttributesImpl());
                handler.characters("Foo".toCharArray(), 0, 3);
                handler.endElement("http://springframework.org", "string", "string");
                handler.endElement("http://springframework.org", "root", "root");
                handler.endPrefixMapping("");
                handler.endDocument();
            }
        };
        final SAXSource source = new SAXSource(xmlReader, new InputSource());
View Full Code Here

                    generateDesignateXML(comp.getMetatypeContainer(), contentHandler);
                }
            }

            // end wrapper element
            contentHandler.endElement(namespace, METADATA_ELEMENT, METADATA_ELEMENT_QNAME);
            IOUtils.newline(contentHandler);
            contentHandler.endPrefixMapping(PREFIX);
            contentHandler.endDocument();
        } catch (final IOException e) {
            throw new SCRDescriptorException("Unable to generate xml", file.toString(), e);
View Full Code Here

        for (final ComponentContainer component : components) {
            generateXML(namespace, module, component, contentHandler);
        }

        // end wrapper element
        contentHandler.endElement("", ComponentDescriptorIO.COMPONENTS, ComponentDescriptorIO.COMPONENTS);
        IOUtils.newline(contentHandler);
        contentHandler.endPrefixMapping(PREFIX);
        contentHandler.endDocument();
    }
View Full Code Here

      for (String corpusFolder : dotCorpus.getCorpusFolderNameList()) {
        AttributesImpl corpusFolderAttributes = new AttributesImpl();
        corpusFolderAttributes.addAttribute("", "",CORPUS_FOLDER_ATTRIBUTE, "", corpusFolder);

        xmlSerHandler.startElement("", CORPUS_ELEMENT, CORPUS_ELEMENT, corpusFolderAttributes);
        xmlSerHandler.endElement("", CORPUS_ELEMENT, CORPUS_ELEMENT);
      }

      for (AnnotationStyle style : dotCorpus.getAnnotationStyles()) {
        AttributesImpl styleAttributes = new AttributesImpl();
        styleAttributes
View Full Code Here

        styleAttributes.addAttribute("", "", STYLE_COLOR_ATTRIBUTE, "", colorInt.toString());
        styleAttributes.addAttribute("", "", STYLE_LAYER_ATTRIBUTE, "",
                Integer.toString(style.getLayer()));

        xmlSerHandler.startElement("", STYLE_ELEMENT, STYLE_ELEMENT, styleAttributes);
        xmlSerHandler.endElement("", STYLE_ELEMENT, STYLE_ELEMENT);
      }

      if (dotCorpus.getTypeSystemFileName() != null) {
        AttributesImpl typeSystemFileAttributes = new AttributesImpl();
        typeSystemFileAttributes.addAttribute("", "", TYPESYTEM_FILE_ATTRIBUTE, "", dotCorpus
View Full Code Here

        AttributesImpl typeSystemFileAttributes = new AttributesImpl();
        typeSystemFileAttributes.addAttribute("", "", TYPESYTEM_FILE_ATTRIBUTE, "", dotCorpus
                .getTypeSystemFileName());

        xmlSerHandler.startElement("", TYPESYSTEM_ELEMENT, TYPESYSTEM_ELEMENT, typeSystemFileAttributes);
        xmlSerHandler.endElement("", TYPESYSTEM_ELEMENT, TYPESYSTEM_ELEMENT);
      }

      for (String folder : dotCorpus.getCasProcessorFolderNames()) {
        AttributesImpl taggerConfigAttributes = new AttributesImpl();
        taggerConfigAttributes.addAttribute("", "", CAS_PROCESSOR_FOLDER_ATTRIBUTE, "", folder);
View Full Code Here

      for (String folder : dotCorpus.getCasProcessorFolderNames()) {
        AttributesImpl taggerConfigAttributes = new AttributesImpl();
        taggerConfigAttributes.addAttribute("", "", CAS_PROCESSOR_FOLDER_ATTRIBUTE, "", folder);

        xmlSerHandler.startElement("", CAS_PROCESSOR_ELEMENT, CAS_PROCESSOR_ELEMENT, taggerConfigAttributes);
        xmlSerHandler.endElement("", CAS_PROCESSOR_ELEMENT, CAS_PROCESSOR_ELEMENT);
      }

      if (dotCorpus.getEditorLineLengthHint() != DotCorpus.EDITOR_LINE_LENGTH_HINT_DEFAULT) {
        AttributesImpl editorLineLengthHintAttributes = new AttributesImpl();
        editorLineLengthHintAttributes.addAttribute("", "", EDITOR_LINE_LENGTH_ATTRIBUTE, "",
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.