/** * Command line entry point. */ public static void main(String[] args) { // Get a client connection. // Make sure you've set the variables in FBAInboundServiceMWSSampleConfig. FBAInboundServiceMWSClient client = FBAInboundServiceMWSSampleConfig.getClient(); // Create a request. ListInboundShipmentItemsRequest request = new ListInboundShipmentItemsRequest(); String sellerId = "example"; request.setSellerId(sellerId); String mwsAuthToken = "example"; request.setMWSAuthToken(mwsAuthToken); String marketplace = "example"; request.setMarketplace(marketplace); String shipmentId = "example"; request.setShipmentId(shipmentId); XMLGregorianCalendar lastUpdatedBefore = MwsUtl.getDTF().newXMLGregorianCalendar(); request.setLastUpdatedBefore(lastUpdatedBefore); XMLGregorianCalendar lastUpdatedAfter = MwsUtl.getDTF().newXMLGregorianCalendar(); request.setLastUpdatedAfter(lastUpdatedAfter); // Make the call. ListInboundShipmentItemsSample.invokeListInboundShipmentItems(client, request); }
@SuppressWarnings("unchecked") public <T> T deserialze(DefaultJSONParser parser, Type type, Object fieldName) { Object value = DateCodec.instance.deserialze(parser, type, fieldName); if (value instanceof Calendar) { return (T) value; } Date date = (Date) value; if (date == null) { return null; } JSONLexer lexer = parser.lexer; Calendar calendar = Calendar.getInstance(lexer.getTimeZone(), lexer.getLocale()); calendar.setTime(date); if (type == XMLGregorianCalendar.class) { return (T) createXMLGregorianCalendar((GregorianCalendar) calendar); } return (T) calendar; }
/** * <p>Normalize this instance to UTC.</p> * * <p>2000-03-04T23:00:00+03:00 normalizes to 2000-03-04T20:00:00Z</p> * <p>Implements W3C XML Schema Part 2, Section 3.2.7.3 (A).</p> */ public XMLGregorianCalendar normalize() { XMLGregorianCalendar normalized = normalizeToTimezone(timezone); // if timezone was undefined, leave it undefined if (getTimezone() == DatatypeConstants.FIELD_UNDEFINED) { normalized.setTimezone(DatatypeConstants.FIELD_UNDEFINED); } // if milliseconds was undefined, leave it undefined if (getMillisecond() == DatatypeConstants.FIELD_UNDEFINED) { normalized.setMillisecond(DatatypeConstants.FIELD_UNDEFINED); } return normalized; }
private XMLGregorianCalendar getXMLGregorianCalendarNow() throws DatatypeConfigurationException { GregorianCalendar gregorianCalendar = new GregorianCalendar(); DatatypeFactory datatypeFactory = DatatypeFactory.newInstance(); XMLGregorianCalendar now = datatypeFactory .newXMLGregorianCalendar(gregorianCalendar); return now; }
/** * Gets the value of the dTimPumpEnd property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getDTimPumpEnd() { return dTimPumpEnd; }
/** * Sets the value of the dTimToolRun property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setDTimToolRun(XMLGregorianCalendar value) { this.dTimToolRun = value; }
/** * Gets the value of the dod property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getDod() { return dod; }
/** * Gets the value of the dTimEnd property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getDTimEnd() { return dTimEnd; }
/** * Gets the value of the minDateTimeIndex property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getMinDateTimeIndex() { return minDateTimeIndex; }
/** * Methods check if the value is valid for the datatype */ @Override public boolean isValidValue(String value) { try { XMLGregorianCalendar cal = datatypeFactory.newXMLGregorianCalendar(value); String schema = cal.getXMLSchemaType().getNamespaceURI() + "#" + cal.getXMLSchemaType().getLocalPart(); return schema.equals(getXmlSchemaURIString()); } catch(Exception e) { return false; } }
/** * * @param since * @return * returns java.util.List<java.lang.Integer> */ @WebMethod @WebResult(targetNamespace = "") @RequestWrapper(localName = "getRunningProcesses", targetNamespace = "http://service.web.rapidanalytics.de/", className = "com.rapid_i.repository.wsimport.GetRunningProcesses") @ResponseWrapper(localName = "getRunningProcessesResponse", targetNamespace = "http://service.web.rapidanalytics.de/", className = "com.rapid_i.repository.wsimport.GetRunningProcessesResponse") public List<Integer> getRunningProcesses( @WebParam(name = "since", targetNamespace = "") XMLGregorianCalendar since);
public XMLGregorianCalendar toXMLCalendar(Date d) throws Exception { GregorianCalendar gc = new GregorianCalendar(); gc.setTime(d); XMLGregorianCalendar xml = DatatypeFactory.newInstance() .newXMLGregorianCalendar(); xml.setYear(gc.get(Calendar.YEAR)); xml.setMonth(gc.get(Calendar.MONTH) + 1); xml.setDay(gc.get(Calendar.DAY_OF_MONTH)); xml.setHour(gc.get(Calendar.HOUR_OF_DAY)); xml.setMinute(gc.get(Calendar.MINUTE)); xml.setSecond(gc.get(Calendar.SECOND)); return xml; }
/** * * @return An object of type XMLGregorianCalendar containing the current * system time and date * @throws DatatypeConfigurationException * If the instantiation of the DatatypeFactory fails */ public static XMLGregorianCalendar newXMLGregorianCalendarSystemTime() throws DatatypeConfigurationException { GregorianCalendar gregorianCalendar = new GregorianCalendar(); DatatypeFactory datatypeFactory = DatatypeFactory.newInstance(); XMLGregorianCalendar now = datatypeFactory .newXMLGregorianCalendar(gregorianCalendar); return now; }
/** * <p>Indicates whether parameter <code>obj</code> is "equal to" this one.</p> * * @param obj to compare. * * @return <code>true</code> when <code>compare(this,(XMLGregorianCalendar)obj) == EQUAL.</code>. */ public boolean equals(Object obj) { if (obj == null || !(obj instanceof XMLGregorianCalendar)) { return false; } if (obj == this) { return true; } return compare((XMLGregorianCalendar) obj) == DatatypeConstants.EQUAL; }
@Override public AwardTimeType withValue(XMLGregorianCalendar value) { setValue(value); return this; }
private boolean isDateTimeOrDuration(Object value) { return value instanceof Duration || value instanceof XMLGregorianCalendar; }
/** * Gets the value of the dTimSqueeze property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getDTimSqueeze() { return dTimSqueeze; }
@Override public XMLGregorianCalendar getXMLGregorianCalendar() { return type.getXMLGregorianCalendar(this); }
/** * <p>Create a Java representation of XML Schema builtin datatype <code>date</code> or <code>g*</code>.</p> * * <p>For example, an instance of <code>gYear</code> can be created invoking this factory * with <code>month</code> and <code>day</code> parameters set to * {@link DatatypeConstants#FIELD_UNDEFINED}.</p> * * @param year of <code>XMLGregorianCalendar</code> to be created. * @param month of <code>XMLGregorianCalendar</code> to be created. * @param day of <code>XMLGregorianCalendar</code> to be created. * @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set. * * @return <code>XMLGregorianCalendar</code> created from parameter values. * * @see DatatypeConstants#FIELD_UNDEFINED * * @throws IllegalArgumentException if any parameter is outside value * constraints for the field as specified in * <a href="#datetimefieldmapping">date/time field mapping table</a>. */ public static XMLGregorianCalendar createDate( int year, int month, int day, int timezone) { return new XMLGregorianCalendarImpl( year, month, day, DatatypeConstants.FIELD_UNDEFINED, // hour DatatypeConstants.FIELD_UNDEFINED, // minute DatatypeConstants.FIELD_UNDEFINED, // second DatatypeConstants.FIELD_UNDEFINED, // millisecond timezone); }
@Override public ReferenceTimeType withValue(XMLGregorianCalendar value) { setValue(value); return this; }
public XMLGregorianCalendar getStartDateIsoFormat() { return startDateIsoFormat; }
@Override public PaidTimeType withValue(XMLGregorianCalendar value) { setValue(value); return this; }
/** * Sets the value of the lastBopDrill property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setLastBopDrill(XMLGregorianCalendar value) { this.lastBopDrill = value; }
/** * Gets the value of the dTimRemove property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getDTimRemove() { return dTimRemove; }
/** * Gets the value of the azimuthTime property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getAzimuthTime() { return azimuthTime; }
/** * Sets the value of the dTimRemove property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setDTimRemove(XMLGregorianCalendar value) { this.dTimRemove = value; }
/** * Gets the value of the dTimInstall property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getDTimInstall() { return dTimInstall; }
/** * Sets the value of the dv property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setDV(XMLGregorianCalendar value) { this.dv = value; }
/** * Schedules a process to be executed as soon as possible. Works with all process service * versions. * * @throws RepositoryException * on fail * @throws PasswordInputCanceledException * if the user canceled the login dialog */ ExecutionResponse executeProcessSimple(String executeProcess, XMLGregorianCalendar xmlGregorianCalendar, ProcessContextWrapper processContextWrapper) throws RepositoryException, PasswordInputCanceledException;
/** * Schedules a process to be executed as soon as possible. If Process Service version is not at * least 1.3 queueName will not be considered. * * @throws RepositoryException * on fail * @throws PasswordInputCanceledException * if the user canceled the login dialog */ ExecutionResponse executeProcessSimple(String path, XMLGregorianCalendar xmlGregorianCalendar, ProcessContextWrapper processContextWrapper, String queueName) throws RepositoryException, PasswordInputCanceledException;
/** * Gets the value of the dTimStart property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getDTimStart() { return dTimStart; }
/** * Gets the value of the datumLikvidace property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getDatumLikvidace() { return datumLikvidace; }
/** * Gets the value of the dTimPreSpud property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getDTimPreSpud() { return dTimPreSpud; }
/** * Gets the value of the dTimCementDrillOut property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getDTimCementDrillOut() { return dTimCementDrillOut; }
/** * Gets the value of the lastFireBoatDrill property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getLastFireBoatDrill() { return lastFireBoatDrill; }
/** * Sets the value of the expirationDate property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setExpirationDate(XMLGregorianCalendar value) { this.expirationDate = value; }
/** * Gets the value of the endDate property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getEndDate() { return endDate; }
/** * Sets the value of the dTimEnd property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setDTimEnd(XMLGregorianCalendar value) { this.dTimEnd = value; }