Package com.acme.purchaseOrder.x2005.x08

Examples of com.acme.purchaseOrder.x2005.x08.Address


   
      GetActivityStatusesDocument stats = GetActivityStatusesDocument.Factory.newInstance();
     
      stats.addNewGetActivityStatuses().setActivityIdentifierArray(new EndpointReferenceType[] {activityEpr});
     
    GetActivityStatusesResponseDocument resDoc = fc.getActivityStatuses(stats);
   
    ActivityStatusType activityStatus = resDoc
        .getGetActivityStatusesResponse()
        .getResponseArray()[0].getActivityStatus();
    return activityStatus;
  }
View Full Code Here


    String applicationNameNs = method.getApplication().getApplicationName().getTargetNamespace();
    return new QName(applicationNameNs, applicationName);
  }

  public static GlobusGatekeeperType findGateKeeper(ExecutionContext appExecContext, boolean wsgram) throws GfacException {
    WorkflowContextHeader header = appExecContext.getWorkflowHeader();
    boolean isSpruceEnabled = false;
    if (header != null) {
      isSpruceEnabled = (appExecContext.getWorkflowHeader().getURGENCY() != null);
      ResourceMapping resourceMapping = appExecContext.getWorkflowHeader().getResourceMappings().getResourceMappingArray()[0];
      if (resourceMapping != null) {
View Full Code Here

        String outputDataDir = GFacConstants.OUTPUT_DATA_DIR;
        if(!outputDataDir.isEmpty()){
    jobAttr.addEnvVariable(outputDataDir, appExecContext.getExecutionModel().getOutputDataDir());
        }
    ApplicationDescriptionType app = appExecContext.getExecutionModel().getAplicationDesc();
    WorkflowContextHeader contextHeader = appExecContext.getWorkflowHeader();
    ResourceMapping resourceMapping = null;
    if (contextHeader != null) {
      resourceMapping = contextHeader.getResourceMappings().getResourceMappingArray(0);
    }

    log.info("Configure using App Desc = " + app.xmlText());
    if (resourceMapping != null && resourceMapping.getMaxWallTime() > 0) {
      log.info("Header Setting Max Wall Time" + resourceMapping.getMaxWallTime());
View Full Code Here

  public static GlobusGatekeeperType findGateKeeper(ExecutionContext appExecContext, boolean wsgram) throws GfacException {
    WorkflowContextHeader header = appExecContext.getWorkflowHeader();
    boolean isSpruceEnabled = false;
    if (header != null) {
      isSpruceEnabled = (appExecContext.getWorkflowHeader().getURGENCY() != null);
      ResourceMapping resourceMapping = appExecContext.getWorkflowHeader().getResourceMappings().getResourceMappingArray()[0];
      if (resourceMapping != null) {
        URI gatekeeperfromResourceMapping = null;
        try {
          gatekeeperfromResourceMapping = new URI(resourceMapping.getGatekeeperEpr());
        } catch (URISyntaxException e) {
          throw new GfacException(e.getLocalizedMessage(), e);
        }
        if (gatekeeperfromResourceMapping != null) {
          log.info("Gate keeper selected from resource mapping");
          GlobusGatekeeperType gatekeeper = GlobusGatekeeperType.Factory.newInstance();

          if (!resourceMapping.getWsgramPreferred()) {
            if (resourceMapping.getJobManager() != null) {
              throw new GfacException("Job Manager parameter must not defined for Pre-WSGram in Resource Mapping, " + "include it with your gatekeepr EPR in resource mapping", FaultCode.InternalServiceError);
            }
          } else {
            if (resourceMapping.getJobManager() != null) {
              gatekeeper.setJobmanagertype(GlobusJobManagerType.Enum.forString(resourceMapping.getJobManager()));
            }
          }
          gatekeeper.setEndPointReference(gatekeeperfromResourceMapping.toString());
          return gatekeeper;
        }
View Full Code Here

        if(!outputDataDir.isEmpty()){
    jobAttr.addEnvVariable(outputDataDir, appExecContext.getExecutionModel().getOutputDataDir());
        }
    ApplicationDescriptionType app = appExecContext.getExecutionModel().getAplicationDesc();
    WorkflowContextHeader contextHeader = appExecContext.getWorkflowHeader();
    ResourceMapping resourceMapping = null;
    if (contextHeader != null) {
      resourceMapping = contextHeader.getResourceMappings().getResourceMappingArray(0);
    }

    log.info("Configure using App Desc = " + app.xmlText());
    if (resourceMapping != null && resourceMapping.getMaxWallTime() > 0) {
      log.info("Header Setting Max Wall Time" + resourceMapping.getMaxWallTime());
      jobAttr.setMaxWallTime(resourceMapping.getMaxWallTime());

    } else if (app.getMaxWallTime() > 0) {
      log.info("Setting max wall clock time to " + app.getMaxWallTime());

      if (app.getMaxWallTime() > 30 && app.getQueue() != null && app.getQueue().equals("debug")) {
        throw new GfacException("NCSA debug Queue only support jobs < 30 minutes", FaultCode.InvalidConfig);
      }

      jobAttr.setMaxWallTime(app.getMaxWallTime());
      jobAttr.set("proxy_timeout", "1");
    } else {
      jobAttr.setMaxWallTime(29);
    }

    if (appExecContext.getExecutionModel().getStdIn() != null) {
      jobAttr.setStdin(appExecContext.getExecutionModel().getStdIn());
    } else {
      Iterator<String> values = appExecContext.getExecutionModel().getInputParameters().iterator();
      while (values.hasNext()) {
        jobAttr.addArgument(values.next());
      }
    }
   
    if (resourceMapping != null && resourceMapping.getNodeCount() > 0) {
      log.info("Setting number of procs to " + resourceMapping.getNodeCount());
      jobAttr.set("hostCount", String.valueOf(resourceMapping.getNodeCount()));
    }else if (app.getHostCount() > 1) {
      jobAttr.set("hostCount", String.valueOf(app.getHostCount()));
    }
    if (resourceMapping != null && resourceMapping.getCpuCount() > 0) {
      log.info("Setting host count to " + resourceMapping.getCpuCount());
      jobAttr.setNumProcs(resourceMapping.getCpuCount());
     
    } else if (app.getCount() > 1) {
      log.info("Setting number of procs to " + app.getCount());
      jobAttr.setNumProcs(app.getCount());
    }

    if (app.getProject() != null && app.getProject().getProjectName() != null) {
      log.info("Setting project to " + app.getProject());
      jobAttr.setProject(app.getProject().getProjectName());
    }

    if (resourceMapping != null && resourceMapping.getQueueName() != null) {
      jobAttr.setQueue(resourceMapping.getQueueName());
    } else if (app.getQueue() != null && app.getQueue().getQueueName() != null) {
      log.info("Setting job queue to " + app.getQueue());
      jobAttr.setQueue(app.getQueue().getQueueName());
    }
    String jobType = JobType.SINGLE.toString() ;
View Full Code Here

                List<Address> r = new ArrayList<Address>();
                if (address == null) {
                        return r;
                }
                for (int i = 0; i < address.size(); i++) {
                        Address x = new Address();
                        x.setSortCode(address.get(i).getSortCode());
                        x.setTModelKey(address.get(i).getTModelKey());
                        x.setUseType(address.get(i).getUseType());
                        x.getAddressLine().addAll(MapAddressLine(address.get(i).getAddressLine()));
                        r.add(x);
                }
                return r;
        }
View Full Code Here

    addressLineThree.setKeyName("zip");
    addressLineThree.setKeyValue("zip");
    addressLineThree.setValue(data.getZip(5));
   
    //One address for the contact. Can be more but only one here.
    Address address = new Address();
    address.setLang("en");
    address.setSortCode("1");
    address.setTModelKey("uddi:tmodelKey:address");
    address.setUseType("HQ");
    address.getAddressLine().add(addressLineOne);
    address.getAddressLine().add(addressLineTwo);
    address.getAddressLine().add(addressLineThree);
   
    //Contacts phone number details
    Phone phone = new Phone();
    phone.setUseType("Hotline");
    phone.setValue(data.getUSPhoneNumber());
View Full Code Here

   * @param useType
   * @return
   */
  public static Address generateAddress(List<AddressLine> addressLines, String lang, String sortCode, String tModelKey, String useType)
  {
    Address address = new Address();
    if (addressLines != null)
      for (AddressLine al : addressLines)
        address.getAddressLine().add(al);
    if (lang != null)
      address.setLang(lang);
    if (sortCode != null)
      address.setSortCode(sortCode);
    if (tModelKey != null)
      address.setTModelKey(tModelKey);
    if (useType != null)
      address.setUseType(useType);
   
    return address;
  }
View Full Code Here

  }
 
  public static Address getAddress(List<Address> entityList, String lang) {
   
    if (entityList.size()==0) {
      Address address = new Address();
      address.setLang(lang);
      entityList.add(address);
    }
    if (lang==null) return entityList.get(0);
    for (Address entity : entityList) {
      if (lang.equalsIgnoreCase(entity.getLang())) {
View Full Code Here

        PersonName n = new PersonName();
        n.setValue("Bob");
        c.getPersonName().add(n);

        cc.getContact().add(c);
        Address a = new Address();
        if (oversizedSortCode) {
            a.setSortCode(str11);
        } else {
            a.setSortCode(str10);
        }
        if (oversizedLang) {
            a.setLang(str27);
        } else {
            a.setLang(str26);
        }
        if (oversizedTmodel) {
            a.setTModelKey(str256);
        } else {
            a.setTModelKey(str255);
        }
        if (oversizedUseType) {
            a.setUseType(str256);
        } else {
            a.setUseType(str255);
        }
        if (oversizedSortCode) {
            a.setSortCode(str11);
        } else {
            a.setSortCode(str10);
        }
        AddressLine al = new AddressLine();
        if (oversizedAddressKN) {
            al.setKeyName(str256); //optional
        } else {
            al.setKeyName(str255); //optional
        }
        if (oversizedAddressKV) {
            al.setKeyValue(str256); //optional
        } else {
            al.setKeyValue(str255); //optional
        }
        if (oversizedAddressLineValue) {
            al.setValue(str81); //this one is required
        } else {
            al.setValue(str80);
        }
        a.getAddressLine().add(al);
        c.getAddress().add(a);
        return cc;
    }
View Full Code Here

TOP

Related Classes of com.acme.purchaseOrder.x2005.x08.Address

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.