Package org.jdom

Examples of org.jdom.Comment


        org.jdom.Element value = new org.jdom.Element("value", parent.getNamespacePrefix(), parent.getNamespaceURI());
        if (i == 0) {
          generateExampleXml(keyType, key, null, defaultNs, maxDepth);
        }
        else {
          key.addContent(new Comment("(another '" + keyType.getName() + "' type)"));
        }
        entry.addContent(key);
        if (i == 0) {
          generateExampleXml(valueType, value, null, defaultNs, maxDepth);
        }
        else {
          value.addContent(new Comment("(another '" + valueType.getName() + "' type)"));
        }
        entry.addContent(value);
        parent.addContent(entry);
      }
      parent.addContent(new org.jdom.Comment("...more entries..."));
View Full Code Here


    }

    public void writeComment(String value)
        throws XMLStreamException
    {
        currentNode.addContent(new Comment(value));
    }
View Full Code Here

    }
  }

  private void normaliseLineEndings(Document document) {
    for (Iterator i = document.getDescendants(new ContentFilter(ContentFilter.COMMENT)); i.hasNext();) {
      Comment c = (Comment) i.next();
      c.setText(c.getText().replaceAll("\n", SEPARATOR));
    }
  }
View Full Code Here

    }
  }

  private void normaliseLineEndings(Document document) {
    for (Iterator i = document.getDescendants(new ContentFilter(ContentFilter.COMMENT)); i.hasNext();) {
      Comment c = (Comment) i.next();
      c.setText(c.getText().replaceAll("\n", SEPARATOR));
    }
  }
View Full Code Here

    private void normaliseLineEndings( Document document )
    {
        for ( Iterator<?> i = document.getDescendants( new ContentFilter( ContentFilter.COMMENT ) ); i.hasNext(); )
        {
            Comment c = (Comment) i.next();
            c.setText( ReleaseUtil.normalizeLineEndings( c.getText(), ls ) );
        }
        for ( Iterator<?> i = document.getDescendants( new ContentFilter( ContentFilter.CDATA ) ); i.hasNext(); )
        {
            CDATA c = (CDATA) i.next();
            c.setText( ReleaseUtil.normalizeLineEndings( c.getText(), ls ) );
        }
    }
View Full Code Here

    }
  }

  private void normaliseLineEndings(Document document) {
    for (Iterator i = document.getDescendants(new ContentFilter(ContentFilter.COMMENT)); i.hasNext();) {
      Comment c = (Comment) i.next();
      c.setText(c.getText().replaceAll("\n", SEPARATOR));
    }
  }
View Full Code Here

    }

    @Test
    public void testSnapshotThrowsNullPointerException1() throws Throwable {
        try {
            transactionManager.snapshot(100L, new Comment("testTransactionManagerText"));
            fail("Expected NullPointerException to be thrown");
        } catch (NullPointerException ex) {
            assertNull("ex.getMessage()", ex.getMessage());
            assertNull("transactionManager.psp", transactionManager.psp);
        }
View Full Code Here

        return pi.getData();
    }

    public String getCommentStringValue(Object obj)
    {
        Comment cmt = (Comment) obj;

        return cmt.getText();
    }
View Full Code Here

        return pi.getData();
    }

    public String getCommentStringValue(Object obj)
    {
        Comment cmt = (Comment) obj;

        return cmt.getText();
    }
View Full Code Here

                    parent.addContent(field);
                } catch (Exception e) {
                    e.printStackTrace();
                    System.out.println(e);
                    // at least comment on what went wrong
                    parent.addContent(new Comment(e.toString()));
                }
        }
    }
View Full Code Here

TOP

Related Classes of org.jdom.Comment

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.