Package org.apache.xmlbeans

Examples of org.apache.xmlbeans.XmlCursor.dispose()


                XmlObject result = child.copy().changeType(type);
                assert result.schemaType() == type;
                return result;
            }
        } finally {
            cursor.dispose();
        }
        throw new IllegalArgumentException("xmlobject did not have desired element: " + desiredElement + "/n" + xmlObject);
    }

View Full Code Here


            for (Iterator namespaces = namespaceMap.entrySet().iterator(); namespaces.hasNext();) {
                Map.Entry entry = (Map.Entry) namespaces.next();
                cursor.insertNamespace((String) entry.getKey(), (String) entry.getValue());
            }
        } finally {
            cursor.dispose();
        }
        return parsed;
    }

    /**
 
View Full Code Here

                            return servletLocation;
                        }
                    } catch (URISyntaxException e) {
                        throw new DeploymentException("Could not construct URI for ejb location in wsdl", e);
                    } finally {
                        portCursor.dispose();
                    }
                }
            }
        }
        throw new DeploymentException("No port found with name " + portComponentName + " expected at " + servletLocation);
View Full Code Here

            cursor.toChild(SchemaConversionUtils.JAVAEE_NAMESPACE, "application-client");
            cursor.toFirstChild();
            SchemaConversionUtils.convertToDescriptionGroup(SchemaConversionUtils.JAVAEE_NAMESPACE, cursor, moveable);
        } finally {
            cursor.dispose();
            moveable.dispose();
        }
        XmlObject result = xmlObject.changeType(ApplicationClientDocument.type);
        if (result != null) {
            XmlBeansUtil.validateDD(result);
            return (ApplicationClientDocument) result;
View Full Code Here

                if (getLog() != null) {
                    getLog().info("Generated: " + targetFile);
                }
            }
            finally {
                xmlCursor.dispose();
            }
        } catch (Exception e) {
            throw new MojoExecutionException("Could not process plan", e);
        }
    }
View Full Code Here

        try {
            element.copyXmlContents(xmlCursor);
        }
        finally {
            element.dispose();
        }
    }

    private void moveToFirstStartElement(XmlCursor xmlCursor) throws AssertionError {
        xmlCursor.toStartDoc();
View Full Code Here

            }

            cursor.pop();
        }
        finally {
            end.dispose();
        }
    }

    protected LinkedHashSet<org.apache.geronimo.kernel.repository.Dependency> toKernelDependencies(List<Dependency> listedDependencies, UseMavenDependencies useMavenDependencies) throws InvalidDependencyVersionException, ArtifactResolutionException, ProjectBuildingException, MojoExecutionException {
        LinkedHashSet<org.apache.geronimo.kernel.repository.Dependency> kernelDependencies = new LinkedHashSet<org.apache.geronimo.kernel.repository.Dependency>();
View Full Code Here

      if (o instanceof CTTbl) {
        XWPFTable t = new XWPFTable((CTTbl) o, this);
        tables.add(t);
      }
    }
        cursor.dispose();
    getAllPictures();
  }

  /**
  public XWPFHeader(PackagePart part, PackageRelationship rel)
View Full Code Here

        String text = xs.getStringValue();
        if (text != null && (text.startsWith(" ") || text.endsWith(" "))) {
            XmlCursor c = xs.newCursor();
            c.toNextToken();
            c.insertAttributeWithValue(new QName("http://www.w3.org/XML/1998/namespace", "space"), "preserve");
            c.dispose();
        }
    }

    /**
     * For all characters which cannot be represented in XML as defined by the XML 1.0 specification,
View Full Code Here

                  XWPFTable t = new XWPFTable((CTTbl)o, this);
                  tables.add(t);
                  bodyElements.add(t);
                }
            }
                cursor.dispose();
            getAllPictures();
      } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      } catch (XmlException e) {
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.