Examples of XmlCursor


Examples of org.apache.xmlbeans.XmlCursor

  public static SPMDApplicationType getSPMDApplication(JobDefinitionType value) {
    if (value != null &&
        value.getJobDescription() != null &&
        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();
        return null;
      } else {
        acursor.dispose();                              
        return null;
      }
    } else {
      return null;
    }
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor

 
  public static POSIXApplicationType getPOSIXApplication(JobDefinitionType value) {
    if (value != null &&
        value.getJobDescription() != null &&
        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();
        return null;
      } else {
        acursor.dispose();                              
        return null;
      }
    } else {
      return null;
    }
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor

      //TODO handle: creating HPC element if POSIX already exists
      return getHPCProfileApplication(value);
    }
   
    if (getHPCProfileApplication(value) == null) {
      XmlCursor acursor = application.newCursor();
      acursor.toEndToken();
      acursor.insertElement(HPC_PROFILE_APPLICATION);
      acursor.dispose();
    }
    return getHPCProfileApplication(value);
  }
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor

 
  public static HPCProfileApplicationType getHPCProfileApplication(JobDefinitionType value) {
    if (value != null &&
        value.getJobDescription() != null &&
        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();
        return null;
      } else {
        acursor.dispose();                              
        return null;
      }
    } else {
      return null;
    }
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor

        defaultTableModel.addRow(new Object[] { getIOStringList()[1], parameter.getParameterName(), parameter.getParameterType().getName(),parameter.getParameterDescription()})
    }
      addNewRowIfLastIsNotEmpty();
      Boolean selected = false;
      if (descType.getPortType()!=null && descType.getPortType().getMethod()!=null) {
      XmlCursor cursor = descType.getPortType().getMethod().newCursor();
//      cursor.toNextToken();
      String value = cursor.getAttributeText(new QName("forceFileStagingToWorkDir"));
      cursor.dispose();
      selected = false;
      if (value != null) {
        selected = Boolean.parseBoolean(value);
      }
    }
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor

        getServiceDescriptionType().getPortType().setMethod(getServiceDescriptionType().getPortType().addNewMethod());
      }
    }
    public void setForceFileStagingToWorkDir(Boolean force){
      setupMethod();
      XmlCursor cursor = getServiceDescriptionType().getPortType().getMethod().newCursor();
      cursor.toNextToken();
    if (!cursor.setAttributeText(new QName("http://airavata.apache.org/schemas/gfac/2012/12","forceFileStagingToWorkDir"),force.toString())){
      cursor.insertAttributeWithValue("forceFileStagingToWorkDir",force.toString());
    }
    cursor.dispose();
    }
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor

    cursor.dispose();
    }
   
    public Boolean getForceFileStagingToWorkDir(){
      setupMethod();
      XmlCursor cursor = getServiceDescriptionType().getPortType().getMethod().newCursor();     
      cursor.toNextToken();
    String value = cursor.getAttributeText(new QName("forceFileStagingToWorkDir"));
    cursor.dispose();
    if (value==null){
      return false;
    }else{
      return Boolean.parseBoolean(value);
    }
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor

            if (gerConnector == null) {
                throw new DeploymentException("A connector module must be deployed using a Geronimo deployment plan" +
                        " (either META-INF/geronimo-ra.xml in the RAR file or a standalone deployment plan passed to the deployer).");
            }
            ConnectorPlanRectifier.rectifyPlan(gerConnector);
            XmlCursor cursor = gerConnector.newCursor();
            try {
                SchemaConversionUtils.convertToGeronimoSubSchemas(cursor);
            } finally {
                cursor.dispose();
            }

            SchemaConversionUtils.validateDD(gerConnector);
        } catch (XmlException e) {
            throw new DeploymentException(e);
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor

    private static final QName CREDENTIAL_INTERFACE_QNAME = new QName(ConnectorModuleBuilder.GERCONNECTOR_NAMESPACE, "credential-interface");


    static void rectifyPlan(GerConnectorType gerConnector) {
        boolean updated = false;
        XmlCursor cursor = gerConnector.newCursor();
        try {
            updated = cursor.removeAttribute(VERSION_QNAME);
        } finally {
            cursor.dispose();
        }
        GerResourceadapterType[] resourceAdapters = gerConnector.getResourceadapterArray();
        for (int i = 0; i < resourceAdapters.length; i++) {
            GerResourceadapterType resourceAdapter = resourceAdapters[i];
            if (resourceAdapter.isSetOutboundResourceadapter()) {
            GerConnectionDefinitionType[] connectionDefinitions = resourceAdapter.getOutboundResourceadapter().getConnectionDefinitionArray();
                for (int j = 0; j < connectionDefinitions.length; j++) {
                    GerConnectionDefinitionType connectionDefinition = connectionDefinitions[j];
                    GerConnectiondefinitionInstanceType[] connectiondefinitionInstances = connectionDefinition.getConnectiondefinitionInstanceArray();
                    for (int k = 0; k < connectiondefinitionInstances.length; k++) {
                        GerConnectiondefinitionInstanceType connectiondefinitionInstance = connectiondefinitionInstances[k];
                        cursor = connectiondefinitionInstance.newCursor();
                        try {
                            if (cursor.toFirstChild()) {
                                if (cursor.toNextSibling(GLOBAL_JNDI_NAME_QNAME)) {
                                    cursor.removeXml();
                                    updated = true;
                                }
                                if (cursor.toNextSibling(CREDENTIAL_INTERFACE_QNAME)) {
                                    cursor.removeXml();
                                    updated = true;
                                }
                            }
                        } finally {
                            cursor.dispose();
                        }
                    }
                }
            }
        }
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor

                    }
                }
                TTypes[] types = definitions.getTypesArray();
                for (int i = 0; i < types.length; i++) {
                    TTypes type = types[i];
                    XmlCursor typeCursor = type.newCursor();
                    try {
                        if (typeCursor.toChild(SCHEMA_QNAME)) {
                            do {
                                SchemaDocument.Schema schema = (SchemaDocument.Schema) typeCursor.getObject();
                                rewriteSchema(schema, contextURI, key);
                            } while (typeCursor.toNextSibling(SCHEMA_QNAME));
                        }
                    } finally {
                        typeCursor.dispose();
                    }
                }
                String docString = xmlObjectToString(doc);
                wsdlMap.put(key.toString(), docString);
            } else {
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.