当前位置: 首页>>代码示例>>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;未经允许,请勿转载。