本文整理了Java中javax.xml.datatype.XMLGregorianCalendar.isValid()
方法的一些代码示例,展示了XMLGregorianCalendar.isValid()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLGregorianCalendar.isValid()
方法的具体详情如下:
包路径:javax.xml.datatype.XMLGregorianCalendar
类名称:XMLGregorianCalendar
方法名:isValid
[英]Validate instance by getXMLSchemaType()
constraints.
[中]通过getXMLSchemaType()
约束验证实例。
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore
@Override
public boolean isValid()
{
return xmlGregorianCalendar.isValid();
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore
@Override
public boolean isValid()
{
return xmlGregorianCalendar.isValid();
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public boolean validateGMonth(XMLGregorianCalendar gMonth, DiagnosticChain diagnostics, Map<Object, Object> context)
{
boolean result = gMonth.isValid() && "gMonth".equals(gMonth.getXMLSchemaType().getLocalPart());
if (!result && diagnostics != null)
{
reportXMLGregorianCalendarViolation(XMLTypePackage.Literals.GMONTH, gMonth, diagnostics, context);
}
return result;
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public boolean validateTime(XMLGregorianCalendar time, DiagnosticChain diagnostics, Map<Object, Object> context)
{
boolean result = time.isValid() && "time".equals(time.getXMLSchemaType().getLocalPart());
if (!result && diagnostics != null)
{
reportXMLGregorianCalendarViolation(XMLTypePackage.Literals.TIME, time, diagnostics, context);
}
return result;
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public boolean validateGDay(XMLGregorianCalendar gDay, DiagnosticChain diagnostics, Map<Object, Object> context)
{
boolean result = gDay.isValid() && "gDay".equals(gDay.getXMLSchemaType().getLocalPart());
if (!result && diagnostics != null)
{
reportXMLGregorianCalendarViolation(XMLTypePackage.Literals.GDAY, gDay, diagnostics, context);
}
return result;
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public boolean validateGMonthDay(XMLGregorianCalendar gMonthDay, DiagnosticChain diagnostics, Map<Object, Object> context)
{
boolean result = gMonthDay.isValid() && "gMonthDay".equals(gMonthDay.getXMLSchemaType().getLocalPart());
if (!result && diagnostics != null)
{
reportXMLGregorianCalendarViolation(XMLTypePackage.Literals.GMONTH_DAY, gMonthDay, diagnostics, context);
}
return result;
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public boolean validateGYear(XMLGregorianCalendar gYear, DiagnosticChain diagnostics, Map<Object, Object> context)
{
boolean result = gYear.isValid() && "gYear".equals(gYear.getXMLSchemaType().getLocalPart());
if (!result && diagnostics != null)
{
reportXMLGregorianCalendarViolation(XMLTypePackage.Literals.GYEAR, gYear, diagnostics, context);
}
return result;
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public boolean validateDateTime(XMLGregorianCalendar dateTime, DiagnosticChain diagnostics, Map<Object, Object> context)
{
boolean result = dateTime.isValid() && "dateTime".equals(dateTime.getXMLSchemaType().getLocalPart());
if (!result && diagnostics != null)
{
reportXMLGregorianCalendarViolation(XMLTypePackage.Literals.DATE_TIME, dateTime, diagnostics, context);
}
return result;
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public boolean validateTime(XMLGregorianCalendar time, DiagnosticChain diagnostics, Map<Object, Object> context)
{
boolean result = time.isValid() && "time".equals(time.getXMLSchemaType().getLocalPart());
if (!result && diagnostics != null)
{
reportXMLGregorianCalendarViolation(XMLTypePackage.Literals.TIME, time, diagnostics, context);
}
return result;
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public boolean validateDateTime(XMLGregorianCalendar dateTime, DiagnosticChain diagnostics, Map<Object, Object> context)
{
boolean result = dateTime.isValid() && "dateTime".equals(dateTime.getXMLSchemaType().getLocalPart());
if (!result && diagnostics != null)
{
reportXMLGregorianCalendarViolation(XMLTypePackage.Literals.DATE_TIME, dateTime, diagnostics, context);
}
return result;
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public boolean validateDate(XMLGregorianCalendar date, DiagnosticChain diagnostics, Map<Object, Object> context)
{
boolean result = date.isValid() && "date".equals(date.getXMLSchemaType().getLocalPart());
if (!result && diagnostics != null)
{
reportXMLGregorianCalendarViolation(XMLTypePackage.Literals.DATE, date, diagnostics, context);
}
return result;
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public boolean validateGMonthDay(XMLGregorianCalendar gMonthDay, DiagnosticChain diagnostics, Map<Object, Object> context)
{
boolean result = gMonthDay.isValid() && "gMonthDay".equals(gMonthDay.getXMLSchemaType().getLocalPart());
if (!result && diagnostics != null)
{
reportXMLGregorianCalendarViolation(XMLTypePackage.Literals.GMONTH_DAY, gMonthDay, diagnostics, context);
}
return result;
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public boolean validateGYear(XMLGregorianCalendar gYear, DiagnosticChain diagnostics, Map<Object, Object> context)
{
boolean result = gYear.isValid() && "gYear".equals(gYear.getXMLSchemaType().getLocalPart());
if (!result && diagnostics != null)
{
reportXMLGregorianCalendarViolation(XMLTypePackage.Literals.GYEAR, gYear, diagnostics, context);
}
return result;
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public boolean validateGYearMonth(XMLGregorianCalendar gYearMonth, DiagnosticChain diagnostics, Map<Object, Object> context)
{
boolean result = gYearMonth.isValid() && "gYearMonth".equals(gYearMonth.getXMLSchemaType().getLocalPart());
if (!result && diagnostics != null)
{
reportXMLGregorianCalendarViolation(XMLTypePackage.Literals.GYEAR_MONTH, gYearMonth, diagnostics, context);
}
return result;
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public boolean validateGDay(XMLGregorianCalendar gDay, DiagnosticChain diagnostics, Map<Object, Object> context)
{
boolean result = gDay.isValid() && "gDay".equals(gDay.getXMLSchemaType().getLocalPart());
if (!result && diagnostics != null)
{
reportXMLGregorianCalendarViolation(XMLTypePackage.Literals.GDAY, gDay, diagnostics, context);
}
return result;
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public boolean validateDate(XMLGregorianCalendar date, DiagnosticChain diagnostics, Map<Object, Object> context)
{
boolean result = date.isValid() && "date".equals(date.getXMLSchemaType().getLocalPart());
if (!result && diagnostics != null)
{
reportXMLGregorianCalendarViolation(XMLTypePackage.Literals.DATE, date, diagnostics, context);
}
return result;
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public boolean validateGYearMonth(XMLGregorianCalendar gYearMonth, DiagnosticChain diagnostics, Map<Object, Object> context)
{
boolean result = gYearMonth.isValid() && "gYearMonth".equals(gYearMonth.getXMLSchemaType().getLocalPart());
if (!result && diagnostics != null)
{
reportXMLGregorianCalendarViolation(XMLTypePackage.Literals.GYEAR_MONTH, gYearMonth, diagnostics, context);
}
return result;
}
代码示例来源:origin: uk.org.retep.xmpp.server/multiUserChat
@Override
public boolean accepts( final History spec )
{
return spec.getSince() != null && spec.getSince().isValid();
}
代码示例来源:origin: treelogic-swe/aws-mock
@Test
public void Test_toXMLGregorianCalendar() throws Exception {
MockCloudWatchQueryHandler handler = MockCloudWatchQueryHandler.getInstance();
DateTime startTime = new DateTime();
XMLGregorianCalendar xmlGrogerianCalendar = Whitebox.invokeMethod(handler,
"toXMLGregorianCalendar", startTime);
Assert.assertTrue(xmlGrogerianCalendar != null);
Assert.assertTrue(xmlGrogerianCalendar.isValid() == true);
}
代码示例来源:origin: treelogic-swe/aws-mock
@Test
public void Test_toXMLGregorianCalendarForLastTwoHours() throws Exception {
MockCloudWatchQueryHandler handler = MockCloudWatchQueryHandler.getInstance();
DateTime startTime = new DateTime().plusHours(-3);
XMLGregorianCalendar xmlGrogerianCalendar = Whitebox.invokeMethod(handler,
"toXMLGregorianCalendar", startTime);
Assert.assertTrue(xmlGrogerianCalendar != null);
Assert.assertTrue(xmlGrogerianCalendar.isValid() == true);
}
内容来源于网络,如有侵权,请联系作者删除!