Examples of writeElement()


Examples of org.geomajas.rendering.GraphicsDocument.writeElement()

  @Test
  public void testSimple() throws Exception {
    StringWriter writer = new StringWriter();
    GraphicsDocument document = new DefaultVmlDocument(writer);
    document.writeElement("g", true);
    document.writeId("featureId");
    document.writeElement("g", true);
    document.writeAttribute("style", "my-super-style:true;");
    document.writeId("styleId");
    document.closeElement();
View Full Code Here

Examples of org.geomajas.rendering.GraphicsDocument.writeElement()

  public void testSimple() throws Exception {
    StringWriter writer = new StringWriter();
    GraphicsDocument document = new DefaultVmlDocument(writer);
    document.writeElement("g", true);
    document.writeId("featureId");
    document.writeElement("g", true);
    document.writeAttribute("style", "my-super-style:true;");
    document.writeId("styleId");
    document.closeElement();
    document.closeElement();
    Assert.assertEquals("<g id=\"featureId\"><g style=\"my-super-style:true;\" id=\"featureId.styleId\"/></g>",
View Full Code Here

Examples of org.geomajas.rendering.GraphicsDocument.writeElement()

  @Test
  public void testSimpleFlush() throws Exception {
    StringWriter writer = new StringWriter();
    GraphicsDocument document = new DefaultVmlDocument(writer);
    document.writeElement("g", true);
    document.writeId("featureId");
    document.writeElement("g", true);
    document.writeAttribute("style", "my-super-style:true;");
    document.writeId("styleId");
    Assert.assertEquals("featureId.styleId", document.getCurrentId());
View Full Code Here

Examples of org.geomajas.rendering.GraphicsDocument.writeElement()

  public void testSimpleFlush() throws Exception {
    StringWriter writer = new StringWriter();
    GraphicsDocument document = new DefaultVmlDocument(writer);
    document.writeElement("g", true);
    document.writeId("featureId");
    document.writeElement("g", true);
    document.writeAttribute("style", "my-super-style:true;");
    document.writeId("styleId");
    Assert.assertEquals("featureId.styleId", document.getCurrentId());
    document.flush();
    Assert.assertEquals("<g id=\"featureId\"><g style=\"my-super-style:true;\" id=\"featureId.styleId\"/></g>", writer.getBuffer().toString());
View Full Code Here

Examples of org.geomajas.rendering.GraphicsDocument.writeElement()

  @Test
  public void testIds() throws Exception {
    StringWriter writer = new StringWriter();
    GraphicsDocument document = new DefaultVmlDocument(writer);
    document.setRootId("bla");
    document.writeElement("g", true);
    document.writeId("featureId");
    Assert.assertEquals("bla.featureId", document.getCurrentId());
    document.writeElement("g", true);
    document.writeAttribute("style", "my-super-style:true;");
    document.writeId("styleId");
View Full Code Here

Examples of org.geomajas.rendering.GraphicsDocument.writeElement()

    GraphicsDocument document = new DefaultVmlDocument(writer);
    document.setRootId("bla");
    document.writeElement("g", true);
    document.writeId("featureId");
    Assert.assertEquals("bla.featureId", document.getCurrentId());
    document.writeElement("g", true);
    document.writeAttribute("style", "my-super-style:true;");
    document.writeId("styleId");
    Assert.assertEquals("bla.featureId.styleId", document.getCurrentId());
    document.closeElement();
    document.closeElement();
View Full Code Here

Examples of org.geomajas.rendering.GraphicsDocument.writeElement()

  @Test
  public void writePathContent() throws Exception {
    StringWriter writer = new StringWriter();
    GraphicsDocument document = new DefaultVmlDocument(writer);
    document.writeElement("path", false);
    document.writeAttributeStart("points");
    Coordinate[] coordinates = new Coordinate[2];
    coordinates[0] = new Coordinate(1.23456789, 9.87654321);
    coordinates[1] = new Coordinate(9.876, 1.234);
    document.writePathContent(coordinates);
View Full Code Here

Examples of org.modeshape.webdav.fromcatalina.XMLWriter.writeElement()

        resp.setStatus(WebdavStatus.SC_OK);
        resp.setContentType("text/xml; charset=UTF-8");

        XMLWriter generatedXML = new XMLWriter(resp.getWriter(), namespaces);
        generatedXML.writeXMLHeader();
        generatedXML.writeElement("DAV::prop", XMLWriter.OPENING);
        generatedXML.writeElement("DAV::lockdiscovery", XMLWriter.OPENING);
        generatedXML.writeElement("DAV::activelock", XMLWriter.OPENING);

        generatedXML.writeElement("DAV::locktype", XMLWriter.OPENING);
        generatedXML.writeProperty("DAV::" + type);
View Full Code Here

Examples of org.olat.core.util.servlets.XMLWriter.writeElement()

        String relativePath = getRelativePath(req);

        XMLWriter generatedXML = new XMLWriter();
        generatedXML.writeXMLHeader();

        generatedXML.writeElement(null, "multistatus"
                                  + generateNamespaceDeclarations(),
                                  XMLWriter.OPENING);

        Enumeration pathList = errorList.keys();
        while (pathList.hasMoreElements()) {
View Full Code Here

Examples of org.olat.core.util.servlets.XMLWriter.writeElement()

        while (pathList.hasMoreElements()) {

            String errorPath = (String) pathList.nextElement();
            int errorCode = ((Integer) errorList.get(errorPath)).intValue();

            generatedXML.writeElement(null, "response", XMLWriter.OPENING);

            generatedXML.writeElement(null, "href", XMLWriter.OPENING);
            String toAppend = errorPath.substring(relativePath.length());
            if (!toAppend.startsWith("/"))
                toAppend = "/" + toAppend;
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.