Package org.w3c.dom

Examples of org.w3c.dom.Element.removeAttribute()


  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,Configuration.getDefaultConfiguration(),false);
    Element initElement = dumper.writeInitialData(new InitialData(plus,plus.size(),minus,minus.size(),graph));
    Element testSequences = (Element)initElement.getElementsByTagName(ELEM_KINDS.ELEM_SEQ.name()).item(0);
    testSequences.removeAttribute(ELEM_KINDS.ATTR_SEQ.name());testSequences.setAttribute(ELEM_KINDS.ATTR_SEQ.name(), "junk");
    dumper.topElement.appendChild(initElement);dumper.close();
    xmlData = output.toString();

    final LearnerSimulator loader = new LearnerSimulator(new ByteArrayInputStream(xmlData.getBytes()),false);
    loader.config = Configuration.getDefaultConfiguration();
View Full Code Here


  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,Configuration.getDefaultConfiguration(),false);
    Element augmentElement = dumper.writeAugmentPTA(
        new ProgressDecorator.AugmentPTAData(RestartLearningEnum.restartSOFT,sequence,true,null));
    augmentElement.removeAttribute(ELEM_KINDS.ATTR_COLOUR.name());
    dumper.topElement.appendChild(augmentElement);dumper.close();
    xmlData = output.toString();

    final LearnerSimulator loader = new LearnerSimulator(new ByteArrayInputStream(xmlData.getBytes()),false);
    loader.config = Configuration.getDefaultConfiguration();
View Full Code Here

  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,Configuration.getDefaultConfiguration(),false);
    Element augmentElement = dumper.writeAugmentPTA(
        new ProgressDecorator.AugmentPTAData(RestartLearningEnum.restartSOFT,sequence,true,null));
    augmentElement.removeAttribute(ELEM_KINDS.ATTR_ACCEPT.name());
    dumper.topElement.appendChild(augmentElement);dumper.close();
    xmlData = output.toString();

    final LearnerSimulator loader = new LearnerSimulator(new ByteArrayInputStream(xmlData.getBytes()),false);
    loader.config = Configuration.getDefaultConfiguration();
View Full Code Here

    }

    // Try with no id attribute
    try {
      Element bad = buildPost(doc, 1, "inf", "msg", "user");
      bad.removeAttribute("id");
      new Post(bad);
      fail("A post should not be built (even with default values) if the <post> element has no id.");
    } catch (NumberFormatException e) {
      fail("The id attribute is missing, but there should not be a NumberFormatException");
    } catch (BadPostException e) {
View Full Code Here

    }

    // Try with no time attribute
    try {
      Element bad = buildPost(doc, 1, "inf", "msg", "user");
      bad.removeAttribute("time");
      new Post(bad);
      fail("A post should not be built (even with default values) if the <post> element has no time.");
    } catch (BadPostException e) {
      // This is expected
    }
View Full Code Here

  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,config,false);
    Element initElement = dumper.writeInitialData(new InitialData(plus,plus.size(),minus,minus.size(),graph));
    Element testSequences = (Element)StatechumXML.getChildWithTag(initElement,StatechumXML.ELEM_SEQ.name()).item(0);
    testSequences.removeAttribute(StatechumXML.ATTR_SEQ.name());testSequences.setAttribute(StatechumXML.ATTR_SEQ.name(), "junk");
    dumper.topElement.appendChild(initElement);dumper.close();
    xmlData = output.toString();

    final LearnerSimulator loader = new LearnerSimulator(new ByteArrayInputStream(xmlData.getBytes()),false,converter);
    loader.config = config;
View Full Code Here

  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,config,false);
    Element augmentElement = dumper.writeAugmentPTA(
        new ProgressDecorator.AugmentPTAData(RestartLearningEnum.restartSOFT,sequence,true,JUConstants.BLUE));
    augmentElement.removeAttribute(StatechumXML.ATTR_COLOUR.name());
    dumper.topElement.appendChild(augmentElement);dumper.close();
    xmlData = output.toString();

    final LearnerSimulator loader = new LearnerSimulator(new ByteArrayInputStream(xmlData.getBytes()),false,converter);
    loader.config = config;
View Full Code Here

  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,config,false);
    Element augmentElement = dumper.writeAugmentPTA(
        new ProgressDecorator.AugmentPTAData(RestartLearningEnum.restartSOFT,sequence,true,JUConstants.BLUE));
    augmentElement.removeAttribute(StatechumXML.ATTR_ACCEPT.name());
    dumper.topElement.appendChild(augmentElement);dumper.close();
    xmlData = output.toString();

    final LearnerSimulator loader = new LearnerSimulator(new ByteArrayInputStream(xmlData.getBytes()),false,converter);
    loader.config = config;
View Full Code Here

  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,config,false);
    Element augmentElement = dumper.writeAugmentPTA(
        new ProgressDecorator.AugmentPTAData(RestartLearningEnum.restartSOFT,sequence,true,JUConstants.BLUE));
    augmentElement.removeAttribute(StatechumXML.ATTR_KIND.name());
    dumper.topElement.appendChild(augmentElement);dumper.close();
    xmlData = output.toString();

    final LearnerSimulator loader = new LearnerSimulator(new ByteArrayInputStream(xmlData.getBytes()),false,converter);
    loader.config = config;
View Full Code Here

  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,Configuration.getDefaultConfiguration(),false);
    Element augmentElement = dumper.writeAugmentPTA(
        new ProgressDecorator.AugmentPTAData(RestartLearningEnum.restartSOFT,sequence,true,JUConstants.BLUE));
    augmentElement.removeAttribute(ELEM_KINDS.ATTR_COLOUR.name());
    dumper.topElement.appendChild(augmentElement);dumper.close();
    xmlData = output.toString();

    final LearnerSimulator loader = new LearnerSimulator(new ByteArrayInputStream(xmlData.getBytes()),false);
    loader.config = Configuration.getDefaultConfiguration();
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.