當前位置: 首頁>>代碼示例>>Java>>正文


Java XMLGregorianCalendar類代碼示例

本文整理匯總了Java中javax.xml.datatype.XMLGregorianCalendar的典型用法代碼示例。如果您正苦於以下問題:Java XMLGregorianCalendar類的具體用法?Java XMLGregorianCalendar怎麽用?Java XMLGregorianCalendar使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


XMLGregorianCalendar類屬於javax.xml.datatype包,在下文中一共展示了XMLGregorianCalendar類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: main

import javax.xml.datatype.XMLGregorianCalendar; //導入依賴的package包/類
/**
 *  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);

}
 
開發者ID:trifonnt,項目名稱:ext-lib-amazon-mws-fulfillment-inbound-shipment,代碼行數:29,代碼來源:ListInboundShipmentItemsSample.java

示例2: deserialze

import javax.xml.datatype.XMLGregorianCalendar; //導入依賴的package包/類
@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;
}
 
開發者ID:tiglabs,項目名稱:jsf-sdk,代碼行數:24,代碼來源:CalendarCodec.java

示例3: normalize

import javax.xml.datatype.XMLGregorianCalendar; //導入依賴的package包/類
/**
 * <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;
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:23,代碼來源:XMLGregorianCalendarImpl.java

示例4: isValidValue

import javax.xml.datatype.XMLGregorianCalendar; //導入依賴的package包/類
/**
 * 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;
  }
}
 
開發者ID:GateNLP,項目名稱:gate-core,代碼行數:16,代碼來源:DataType.java

示例5: getXMLGregorianCalendarNow

import javax.xml.datatype.XMLGregorianCalendar; //導入依賴的package包/類
private XMLGregorianCalendar getXMLGregorianCalendarNow()
		throws DatatypeConfigurationException {
	GregorianCalendar gregorianCalendar = new GregorianCalendar();
	DatatypeFactory datatypeFactory = DatatypeFactory.newInstance();
	XMLGregorianCalendar now = datatypeFactory
			.newXMLGregorianCalendar(gregorianCalendar);
	return now;
}
 
開發者ID:Discovery-Research-Network-SCCM,項目名稱:FHIR-CQL-ODM-service,代碼行數:9,代碼來源:FhirService.java

示例6: getDTimPumpEnd

import javax.xml.datatype.XMLGregorianCalendar; //導入依賴的package包/類
/**
 * Gets the value of the dTimPumpEnd property.
 * 
 * @return
 *     possible object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public XMLGregorianCalendar getDTimPumpEnd() {
    return dTimPumpEnd;
}
 
開發者ID:hashmapinc,項目名稱:WitsmlObjectsLibrary,代碼行數:12,代碼來源:CsCementStage.java

示例7: setDTimToolRun

import javax.xml.datatype.XMLGregorianCalendar; //導入依賴的package包/類
/**
 * Sets the value of the dTimToolRun property.
 * 
 * @param value
 *     allowed object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public void setDTimToolRun(XMLGregorianCalendar value) {
    this.dTimToolRun = value;
}
 
開發者ID:hashmapinc,項目名稱:WitsmlObjectsLibrary,代碼行數:12,代碼來源:ObjSidewallCore.java

示例8: getDod

import javax.xml.datatype.XMLGregorianCalendar; //導入依賴的package包/類
/**
 * Gets the value of the dod property.
 * 
 * @return
 *     possible object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public XMLGregorianCalendar getDod() {
    return dod;
}
 
開發者ID:petrbalat,項目名稱:kares,代碼行數:12,代碼來源:Organ.java

示例9: getDTimEnd

import javax.xml.datatype.XMLGregorianCalendar; //導入依賴的package包/類
/**
 * Gets the value of the dTimEnd property.
 * 
 * @return
 *     possible object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public XMLGregorianCalendar getDTimEnd() {
    return dTimEnd;
}
 
開發者ID:hashmapinc,項目名稱:WitsmlObjectsLibrary,代碼行數:12,代碼來源:CsActivity.java

示例10: getMinDateTimeIndex

import javax.xml.datatype.XMLGregorianCalendar; //導入依賴的package包/類
/**
 * Gets the value of the minDateTimeIndex property.
 * 
 * @return
 *     possible object is
 *     {@link XMLGregorianCalendar }
 *     
 */
public XMLGregorianCalendar getMinDateTimeIndex() {
    return minDateTimeIndex;
}
 
開發者ID:hashmapinc,項目名稱:WitsmlObjectsLibrary,代碼行數:12,代碼來源:CsLogCurveInfo.java

示例11: getRunningProcesses

import javax.xml.datatype.XMLGregorianCalendar; //導入依賴的package包/類
/**
 * 
 * @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);
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:14,代碼來源:ProcessService.java

示例12: toXMLCalendar

import javax.xml.datatype.XMLGregorianCalendar; //導入依賴的package包/類
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;  
}
 
開發者ID:vindell,項目名稱:docx4j-template,代碼行數:14,代碼來源:Docx4j_創建批注_S3_Test.java

示例13: newXMLGregorianCalendarSystemTime

import javax.xml.datatype.XMLGregorianCalendar; //導入依賴的package包/類
/**
 * 
 * @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;
}
 
開發者ID:servicecatalog,項目名稱:oscm,代碼行數:16,代碼來源:GregorianCalendars.java

示例14: equals

import javax.xml.datatype.XMLGregorianCalendar; //導入依賴的package包/類
/**
 * <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;
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:18,代碼來源:XMLGregorianCalendarImpl.java

示例15: withValue

import javax.xml.datatype.XMLGregorianCalendar; //導入依賴的package包/類
@Override
public AwardTimeType withValue(XMLGregorianCalendar value) {
    setValue(value);
    return this;
}
 
開發者ID:AlnaSoftware,項目名稱:eSaskaita,代碼行數:6,代碼來源:AwardTimeType.java


注:本文中的javax.xml.datatype.XMLGregorianCalendar類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。