Package org.apache.airavata.schemas.gfac

Examples of org.apache.airavata.schemas.gfac.ServiceDescriptionType


        OMElement invoke_inputParams = omFactory.createOMElement(new QName("invoke_InputParams"));
        ServiceDescription serviceDescription = airavataAPI.getApplicationManager().getServiceDescription(this.serviceName);
        if (serviceDescription == null) {
            throw new RegistryException(new Exception("Service Description not found in registry."));
        }
        ServiceDescriptionType serviceDescriptionType = serviceDescription.getType();
        for (String inputName : this.inputNames) {
            OMElement omElement = omFactory.createOMElement(new QName(inputName));
            int index = this.inputNames.indexOf(inputName);
            Object value = this.inputValues.get(index);
            InputParameterType parameter = serviceDescriptionType.getInputParametersArray(index);
            if (value instanceof XmlElement) {
                omElement.setText((String) ((XmlElement) ((XmlElement) ((XmlElement) value).children().next()).children().next()).children().next());
                XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(XMLUtil.xmlElementToString((XmlElement) value)));
                StAXOMBuilder builder = new StAXOMBuilder(reader);
                OMElement input = builder.getDocumentElement();
View Full Code Here


          loadData();
        }
    }

    private void loadData() {
      ServiceDescriptionType descType = getOrginalServiceDescription().getType();
    txtServiceName.setText(descType.getName());
    setServiceName(txtServiceName.getText());

    txtServiceName.setEditable(!isServiceDescriptionMode() || isNewDescription());
      ignoreTableChanges=true;
      while(defaultTableModel.getRowCount()>0){
        defaultTableModel.removeRow(0);
      }
      InputParameterType[] iparameters = descType.getInputParametersArray();
      for (InputParameterType parameter : iparameters) {
        defaultTableModel.addRow(new Object[] { getIOStringList()[0], parameter.getParameterName(),parameter.getParameterType().getName(),parameter.getParameterDescription()})
    }
      OutputParameterType[] oparameters = descType.getOutputParametersArray();
      for (OutputParameterType parameter : oparameters) {
        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) {
View Full Code Here

        btnDeleteParameter.setEnabled(false);
        return tblParameters;
  }

    private void loadData() {
      ServiceDescriptionType descType = getOrginalServiceDescription().getType();
    txtApplicationServiceName.setText(descType.getName());
    setServiceName(txtApplicationServiceName.getText());

    txtApplicationServiceName.setEditable(isNewDescription());
      ignoreTableChanges=true;
      updateIODataTable(descType);
        getDeployments().clear();
        try {
      Map<String, ApplicationDescription> descs = getRegistry().getApplicationManager().getApplicationDescriptors(descType.getName());
      for (String hostDescName : descs.keySet()) {
          getDeployments().put(hostDescName, new HostDeployment(getRegistry().getApplicationManager().getHostDescription(hostDescName), descs.get(hostDescName)));
      }

      updateDeploymentTable();
      Boolean selected = false;
      if (descType.getPortType()!=null && descType.getPortType().getMethod()!=null) {
        XmlCursor cursor = descType.getPortType().getMethod().newCursor();
        String value = cursor.getAttributeText(new QName("forceFileStagingToWorkDir"));
        cursor.dispose();
        selected = false;
        if (value != null) {
          selected = Boolean.parseBoolean(value);
View Full Code Here

        OMElement invoke_inputParams = omFactory.createOMElement(new QName("invoke_InputParams"));
        ServiceDescription serviceDescription = airavataAPI.getApplicationManager().getServiceDescription(this.serviceName);
        if (serviceDescription == null) {
            throw new RegistryException(new Exception("Service Description not found in registry."));
        }
        ServiceDescriptionType serviceDescriptionType = serviceDescription.getType();
        for (String inputName : this.inputNames) {
            OMElement omElement = omFactory.createOMElement(new QName(inputName));
            int index = this.inputNames.indexOf(inputName);
            Object value = this.inputValues.get(index);
            InputParameterType parameter = serviceDescriptionType.getInputParametersArray(index);
            if (value instanceof XmlElement) {
                    omElement.setText((String)((XmlElement)((XmlElement)((XmlElement) value).children().next()).children().next()).children().next());
                XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(XMLUtil.xmlElementToString((XmlElement) value)));
                StAXOMBuilder builder = new StAXOMBuilder(reader);
                OMElement input = builder.getDocumentElement();
View Full Code Here

        Map<Parameter,ActualParameter> actualParameters = new LinkedHashMap<Parameter,ActualParameter>();
        ServiceDescription serviceDescription = getRegistry(context).getServiceDescriptor(serviceName);
        if(serviceDescription==null){
          throw new RegistryException(new Exception("Service Description not found in registry."));
        }
        ServiceDescriptionType serviceDescriptionType = serviceDescription.getType();
        for (Parameter parameter : serviceDescriptionType.getInputParametersArray()) {
            OMElement element = input.getFirstChildWithName(new QName(null,parameter.getParameterName().replaceAll(WSDLConstants.HYPHEN, WSDLConstants.HYPHEN_REPLACEMENT)));
            if(element == null){
                element = input.getFirstChildWithName(new QName(GFacSchemaConstants.GFAC_NAMESPACE,parameter.getParameterName().replaceAll(WSDLConstants.HYPHEN, WSDLConstants.HYPHEN_REPLACEMENT)));
            }
            if (element == null) {
View Full Code Here

          loadData();
        }
    }

    private void loadData() {
      ServiceDescriptionType descType = getOrginalServiceDescription().getType();
    txtServiceName.setText(descType.getName());
    setServiceName(txtServiceName.getText());

    txtServiceName.setEditable(!isServiceDescriptionMode() || isNewDescription());
      ignoreTableChanges=true;
      while(defaultTableModel.getRowCount()>0){
        defaultTableModel.removeRow(0);
      }
      InputParameterType[] iparameters = descType.getInputParametersArray();
      for (InputParameterType parameter : iparameters) {
        defaultTableModel.addRow(new Object[] { getIOStringList()[0], parameter.getParameterName(),parameter.getParameterType().getName(),parameter.getParameterDescription()})
    }
      OutputParameterType[] oparameters = descType.getOutputParametersArray();
      for (OutputParameterType parameter : oparameters) {
        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) {
View Full Code Here

        btnDeleteParameter.setEnabled(false);
        return tblParameters;
  }

    private void loadData() {
      ServiceDescriptionType descType = getOrginalServiceDescription().getType();
    txtApplicationServiceName.setText(descType.getName());
    setServiceName(txtApplicationServiceName.getText());

    txtApplicationServiceName.setEditable(isNewDescription());
      ignoreTableChanges=true;
      updateIODataTable(descType);
        getDeployments().clear();
        try {
      Map<String, ApplicationDeploymentDescription> descs = getRegistry().getApplicationDescriptors(descType.getName());
      for (String hostDescName : descs.keySet()) {
          getDeployments().put(hostDescName, new HostDeployment(getRegistry().getHostDescriptor(hostDescName), descs.get(hostDescName)));
      }

      updateDeploymentTable();
      Boolean selected = false;
      if (descType.getPortType()!=null && descType.getPortType().getMethod()!=null) {
        XmlCursor cursor = descType.getPortType().getMethod().newCursor();
        String value = cursor.getAttributeText(new QName("forceFileStagingToWorkDir"));
        cursor.dispose();
        selected = false;
        if (value != null) {
          selected = Boolean.parseBoolean(value);
View Full Code Here

            this.inputValues.add(value);
            ServiceDescription serviceDescription = registry.getServiceDescriptor(this.serviceName);
            if(serviceDescription==null){
              throw new RegistryException(new Exception("Service Description not found in registry."));
            }
            ServiceDescriptionType serviceDescriptionType = serviceDescription.getType();
            for (Parameter parameter : serviceDescriptionType.getInputParametersArray()) {
                //todo this implementation doesn't work when there are n number of nodes connecting .. need to fix
                XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(XMLUtil.xmlElementToString((XmlElement) value)));
                StAXOMBuilder builder = new StAXOMBuilder(reader);
                OMElement input = builder.getDocumentElement();
                actualParameters.put(parameter, GfacUtils.getInputActualParameter(parameter, input));
View Full Code Here

        OMElement invoke_inputParams = omFactory.createOMElement(new QName("invoke_InputParams"));
        ServiceDescription serviceDescription = airavataAPI.getApplicationManager().getServiceDescription(this.serviceName);
        if (serviceDescription == null) {
            throw new RegistryException(new Exception("Service Description not found in registry."));
        }
        ServiceDescriptionType serviceDescriptionType = serviceDescription.getType();
        for (String inputName : this.inputNames) {
            OMElement omElement = omFactory.createOMElement(new QName(inputName));
            int index = this.inputNames.indexOf(inputName);
            Object value = this.inputValues.get(index);
            InputParameterType parameter = serviceDescriptionType.getInputParametersArray(index);
            if (value instanceof XmlElement) {
                omElement.setText((String) ((XmlElement) ((XmlElement) ((XmlElement) value).children().next()).children().next()).children().next());
                XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(XMLUtil.xmlElementToString((XmlElement) value)));
                StAXOMBuilder builder = new StAXOMBuilder(reader);
                OMElement input = builder.getDocumentElement();
View Full Code Here

        OMElement invoke_inputParams = omFactory.createOMElement(new QName("invoke_InputParams"));
        ServiceDescription serviceDescription = airavataAPI.getApplicationManager().getServiceDescription(this.serviceName);
        if (serviceDescription == null) {
            throw new RegistryException(new Exception("Service Description not found in registry."));
        }
        ServiceDescriptionType serviceDescriptionType = serviceDescription.getType();
        for (String inputName : this.inputNames) {
            OMElement omElement = omFactory.createOMElement(new QName(inputName));
            int index = this.inputNames.indexOf(inputName);
            Object value = this.inputValues.get(index);
            InputParameterType parameter = serviceDescriptionType.getInputParametersArray(index);
            if (value instanceof XmlElement) {
                omElement.setText((String) ((XmlElement) ((XmlElement) ((XmlElement) value).children().next()).children().next()).children().next());
                XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(XMLUtil.xmlElementToString((XmlElement) value)));
                StAXOMBuilder builder = new StAXOMBuilder(reader);
                OMElement input = builder.getDocumentElement();
View Full Code Here

TOP

Related Classes of org.apache.airavata.schemas.gfac.ServiceDescriptionType

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.