Package org.xml.sax

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


        Integer colorInt = new Color(color.getRed(), color.getGreen(), color.getBlue()).getRGB();
        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);
      }

      for (String type : dotCorpus.getShownTypes()) {
       
View Full Code Here


       
        AttributesImpl shownAttributes = new AttributesImpl();
        shownAttributes.addAttribute("", "", SHOWN_TYPE_ATTRIBUTE, "", type);
        shownAttributes.addAttribute("", "", SHOWN_IS_VISISBLE_ATTRIBUTE, "", "true");
       
        xmlSerHandler.startElement("", SHOWN_ELEMENT, SHOWN_ELEMENT, shownAttributes);
        xmlSerHandler.endElement("", SHOWN_ELEMENT, SHOWN_ELEMENT);
      }
     
      if (dotCorpus.getTypeSystemFileName() != null) {
        AttributesImpl typeSystemFileAttributes = new AttributesImpl();
View Full Code Here

      if (dotCorpus.getTypeSystemFileName() != null) {
        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()) {
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) {
View Full Code Here

      if (dotCorpus.getEditorLineLengthHint() != DotCorpus.EDITOR_LINE_LENGTH_HINT_DEFAULT) {
        AttributesImpl editorLineLengthHintAttributes = new AttributesImpl();
        editorLineLengthHintAttributes.addAttribute("", "", EDITOR_LINE_LENGTH_ATTRIBUTE, "",
                Integer.toString(dotCorpus.getEditorLineLengthHint()));

        xmlSerHandler.startElement("", EDITOR_ELEMENT, EDITOR_ELEMENT,
                editorLineLengthHintAttributes);
        xmlSerHandler.endElement("", EDITOR_ELEMENT, EDITOR_ELEMENT);
      }

      xmlSerHandler.endElement("", CONFIG_ELEMENT, CONFIG_ELEMENT);
View Full Code Here

    XMLSerializer xmlSerializer = new XMLSerializer(out, true);
    ContentHandler xmlSerHandler = xmlSerializer.getContentHandler();

    try {
      xmlSerHandler.startDocument();
      xmlSerHandler.startElement("", CONFIG_ELEMENT, CONFIG_ELEMENT, new AttributesImpl());

      for (String corpusFolder : dotCorpus.getCorpusFolderNameList()) {
        AttributesImpl corpusFolderAttributes = new AttributesImpl();
        corpusFolderAttributes.addAttribute("", "", CORPUS_FOLDER_ATTRIBUTE, "", corpusFolder);
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();
View Full Code Here

        if (style.getConfiguration() != null) {
          styleAttributes.addAttribute("", "", STYLE_CONFIG_ATTRIBUTE, "", style
                  .getConfiguration());
        }

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

      for (String type : dotCorpus.getShownTypes()) {
       
View Full Code Here

       
        AttributesImpl shownAttributes = new AttributesImpl();
        shownAttributes.addAttribute("", "", SHOWN_TYPE_ATTRIBUTE, "", type);
        shownAttributes.addAttribute("", "", SHOWN_IS_VISISBLE_ATTRIBUTE, "", "true");
       
        xmlSerHandler.startElement("", SHOWN_ELEMENT, SHOWN_ELEMENT, shownAttributes);
        xmlSerHandler.endElement("", SHOWN_ELEMENT, SHOWN_ELEMENT);
      }
     
      if (dotCorpus.getTypeSystemFileName() != null) {
        AttributesImpl typeSystemFileAttributes = new AttributesImpl();
View Full Code Here

      if (dotCorpus.getTypeSystemFileName() != null) {
        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()) {
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.