Package org.apache.xmlbeans

Examples of org.apache.xmlbeans.XmlObject


    XmlCursor verify = cursor.newCursor();
    verify.toParent();
    if(verify.getObject() == this.ctDocument.getBody()){
      return true;
    }
    XmlObject o = verify.getObject();
    return false;
   
  }
View Full Code Here


   * @param cell
   */
  public XWPFTableCell getTableCell(CTTc cell) {
    XmlCursor cursor = cell.newCursor();
    cursor.toParent();
    XmlObject o = cursor.getObject();
    if(!(o instanceof CTRow)){
      return null;
    }
    CTRow row = (CTRow)o;
    cursor.toParent();
View Full Code Here

    @Override
    public XmlObject readFrom(Class<XmlObject> type, Type genericType,
                              Annotation[] annotations, MediaType m,
        MultivaluedMap<String, String> headers, InputStream is)
        throws IOException {
        XmlObject result = null;

        try {

            Map<String, String> nstojns = new HashMap<String, String>();
View Full Code Here

            XMLOutputFactory factory = new MappedXMLOutputFactory(nstojns);
            XMLStreamWriter xsw = factory.createXMLStreamWriter(os);
            xsw.writeStartDocument();
            if (obj != null) {

                XmlObject xObj = obj;
                XMLBeanStreamSerializer ser = new XMLBeanStreamSerializer();
                ser.serialize(xObj, xsw);
            }

            xsw.flush();
View Full Code Here

     * @param reader stream reader for the XML stream
     * @return an XMLBean data object, or none if unable to process
     */
    protected XmlObject parseXmlBean(Class<?> type, XMLStreamReader reader) {

        XmlObject result = null;

        // get XMLBeans inner class Factory
        Class<?> factory = getFactory(type);

        try {
View Full Code Here

     * @param type declared type of the required object
     * @param inStream
     * @return an XMLBean object if successful, otherwise null
     */
    protected XmlObject parseXmlBean(Class<?> type, InputStream inStream) {
        XmlObject result = null;

        Reader r = new InputStreamReader(inStream);

        // delegate to parseXmlBean(Class type, Reader reader)
        result = parseXmlBean(type, r);
View Full Code Here

     * @param type declared type of the desired XMLBean data object
     * @param reader
     * @return an instance of the required object, otherwise null
     */
    protected XmlObject parseXmlBean(Class<?> type, Reader reader) {
        XmlObject result = null;

        Class<?> factory = getFactory(type);

        try {

View Full Code Here

        value.getJobDescription().isSetApplication() ) {
      XmlCursor acursor = value.getJobDescription().getApplication().newCursor();
      if (acursor.toFirstChild()) {
        do {
          if(acursor.getName().equals(SPMD_APPLICATION)) {
            XmlObject result = acursor.getObject();
            acursor.dispose();
            return (SPMDApplicationType) result;
          }
        } while (acursor.toNextSibling());
        acursor.dispose();
View Full Code Here

        value.getJobDescription().isSetApplication() ) {
      XmlCursor acursor = value.getJobDescription().getApplication().newCursor();
      if (acursor.toFirstChild()) {
        do {
          if(acursor.getName().equals(POSIX_APPLICATION)) {
            XmlObject result = acursor.getObject();
            acursor.dispose();
            return (POSIXApplicationType) result;
          }
        } while (acursor.toNextSibling());
        acursor.dispose();
View Full Code Here

        value.getJobDescription().isSetApplication() ) {
      XmlCursor acursor = value.getJobDescription().getApplication().newCursor();
      if (acursor.toFirstChild()) {
        do {
          if(acursor.getName().equals(HPC_PROFILE_APPLICATION)) {
            XmlObject result = acursor.getObject();
            acursor.dispose();
            return (HPCProfileApplicationType) result;
          }
        } while (acursor.toNextSibling());
        acursor.dispose();
View Full Code Here

TOP

Related Classes of org.apache.xmlbeans.XmlObject

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.