Java 类javax.xml.datatype.XMLGregorianCalendar 实例源码

项目:ext-lib-amazon-mws-fulfillment-inbound-shipment    文件:ListInboundShipmentItemsSample.java   
/**
 *  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);

}
项目:jsf-sdk    文件:CalendarCodec.java   
@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;
}
项目:OpenJSharp    文件:XMLGregorianCalendarImpl.java   
/**
 * <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;
}
项目:FHIR-CQL-ODM-service    文件:FhirService.java   
private XMLGregorianCalendar getXMLGregorianCalendarNow()
        throws DatatypeConfigurationException {
    GregorianCalendar gregorianCalendar = new GregorianCalendar();
    DatatypeFactory datatypeFactory = DatatypeFactory.newInstance();
    XMLGregorianCalendar now = datatypeFactory
            .newXMLGregorianCalendar(gregorianCalendar);
    return now;
}
项目:GitHub    文件:CalendarCodec.java   
@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;
}
项目:WitsmlObjectsLibrary    文件:CsCementStage.java   
/**
 * Gets the value of the dTimPumpEnd property.
 * 
 * @return
 *     possible object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public XMLGregorianCalendar getDTimPumpEnd() {
    return dTimPumpEnd;
}
项目:WitsmlObjectsLibrary    文件:ObjSidewallCore.java   
/**
 * Sets the value of the dTimToolRun property.
 * 
 * @param value
 *     allowed object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public void setDTimToolRun(XMLGregorianCalendar value) {
    this.dTimToolRun = value;
}
项目:kares    文件:Organ.java   
/**
 * Gets the value of the dod property.
 * 
 * @return
 *     possible object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public XMLGregorianCalendar getDod() {
    return dod;
}
项目:WitsmlObjectsLibrary    文件:CsActivity.java   
/**
 * Gets the value of the dTimEnd property.
 * 
 * @return
 *     possible object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public XMLGregorianCalendar getDTimEnd() {
    return dTimEnd;
}
项目:WitsmlObjectsLibrary    文件:CsLogCurveInfo.java   
/**
 * Gets the value of the minDateTimeIndex property.
 * 
 * @return
 *     possible object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public XMLGregorianCalendar getMinDateTimeIndex() {
    return minDateTimeIndex;
}
项目:gate-core    文件:DataType.java   
/**
 * 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;
  }
}
项目:rapidminer    文件:ProcessService.java   
/**
 * 
 * @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);
项目:docx4j-template    文件:Docx4j_创建批注_S3_Test.java   
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;  
}
项目:oscm    文件:GregorianCalendars.java   
/**
 * 
 * @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;
}
项目:openjdk-jdk10    文件:XMLGregorianCalendarImpl.java   
/**
 * <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;
}
项目:eSaskaita    文件:AwardTimeType.java   
@Override
public AwardTimeType withValue(XMLGregorianCalendar value) {
    setValue(value);
    return this;
}
项目:tck    文件:DroolsTCKTest.java   
private boolean isDateTimeOrDuration(Object value)
{
   return value instanceof Duration || value instanceof XMLGregorianCalendar;
}
项目:WitsmlObjectsLibrary    文件:ObjCementJob.java   
/**
 * Gets the value of the dTimSqueeze property.
 * 
 * @return
 *     possible object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public XMLGregorianCalendar getDTimSqueeze() {
    return dTimSqueeze;
}
项目:openjdk-jdk10    文件:AbstractDateTimeDV.java   
@Override
public XMLGregorianCalendar getXMLGregorianCalendar() {
    return type.getXMLGregorianCalendar(this);
}
项目:OpenJSharp    文件:XMLGregorianCalendarImpl.java   
/**
 * <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);
}
项目:eSaskaita    文件:ReferenceTimeType.java   
@Override
public ReferenceTimeType withValue(XMLGregorianCalendar value) {
    setValue(value);
    return this;
}
项目:oscm    文件:Period.java   
public XMLGregorianCalendar getStartDateIsoFormat() {
    return startDateIsoFormat;
}
项目:eSaskaita    文件:PaidTimeType.java   
@Override
public PaidTimeType withValue(XMLGregorianCalendar value) {
    setValue(value);
    return this;
}
项目:WitsmlObjectsLibrary    文件:CsHse.java   
/**
 * Sets the value of the lastBopDrill property.
 * 
 * @param value
 *     allowed object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public void setLastBopDrill(XMLGregorianCalendar value) {
    this.lastBopDrill = value;
}
项目:WitsmlObjectsLibrary    文件:CsPump.java   
/**
 * Gets the value of the dTimRemove property.
 * 
 * @return
 *     possible object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public XMLGregorianCalendar getDTimRemove() {
    return dTimRemove;
}
项目:sumo    文件:SwathBoundsType.java   
/**
 * Gets the value of the azimuthTime property.
 * 
 * @return
 *     possible object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public XMLGregorianCalendar getAzimuthTime() {
    return azimuthTime;
}
项目:WitsmlObjectsLibrary    文件:CsPit.java   
/**
 * Sets the value of the dTimRemove property.
 * 
 * @param value
 *     allowed object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public void setDTimRemove(XMLGregorianCalendar value) {
    this.dTimRemove = value;
}
项目:WitsmlObjectsLibrary    文件:CsPit.java   
/**
 * Gets the value of the dTimInstall property.
 * 
 * @return
 *     possible object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public XMLGregorianCalendar getDTimInstall() {
    return dTimInstall;
}
项目:kares    文件:VkPodnet.java   
/**
 * Sets the value of the dv property.
 * 
 * @param value
 *     allowed object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public void setDV(XMLGregorianCalendar value) {
    this.dv = value;
}
项目:rapidminer    文件:RemoteScheduler.java   
/**
 * 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;
项目:rapidminer    文件:RemoteScheduler.java   
/**
 * 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;
项目:WitsmlObjectsLibrary    文件:CsStimJobInterval.java   
/**
 * Gets the value of the dTimStart property.
 * 
 * @return
 *     possible object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public XMLGregorianCalendar getDTimStart() {
    return dTimStart;
}
项目:kares    文件:RegistraceRCNS.java   
/**
 * Gets the value of the datumLikvidace property.
 * 
 * @return
 *     possible object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public XMLGregorianCalendar getDatumLikvidace() {
    return datumLikvidace;
}
项目:WitsmlObjectsLibrary    文件:CsDrillReportWellboreInfo.java   
/**
 * Gets the value of the dTimPreSpud property.
 * 
 * @return
 *     possible object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public XMLGregorianCalendar getDTimPreSpud() {
    return dTimPreSpud;
}
项目:WitsmlObjectsLibrary    文件:ObjCementJob.java   
/**
 * Gets the value of the dTimCementDrillOut property.
 * 
 * @return
 *     possible object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public XMLGregorianCalendar getDTimCementDrillOut() {
    return dTimCementDrillOut;
}
项目:WitsmlObjectsLibrary    文件:CsHse.java   
/**
 * Gets the value of the lastFireBoatDrill property.
 * 
 * @return
 *     possible object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public XMLGregorianCalendar getLastFireBoatDrill() {
    return lastFireBoatDrill;
}
项目:soapbox-race-core    文件:InventoryItemTrans.java   
/**
 * Sets the value of the expirationDate property.
 * 
 * @param value
 *     allowed object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public void setExpirationDate(XMLGregorianCalendar value) {
    this.expirationDate = value;
}
项目:sumo    文件:RawDataAnalysisType.java   
/**
 * Gets the value of the azimuthTime property.
 * 
 * @return
 *     possible object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public XMLGregorianCalendar getAzimuthTime() {
    return azimuthTime;
}
项目:WitsmlObjectsLibrary    文件:SecurityInfoType.java   
/**
 * Gets the value of the endDate property.
 * 
 * @return
 *     possible object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public XMLGregorianCalendar getEndDate() {
    return endDate;
}
项目:WitsmlObjectsLibrary    文件:CsShakerScreen.java   
/**
 * Sets the value of the dTimEnd property.
 * 
 * @param value
 *     allowed object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public void setDTimEnd(XMLGregorianCalendar value) {
    this.dTimEnd = value;
}