Search in sources :

Example 16 with DateTimeStruct

use of org.apache.jena.sparql.util.DateTimeStruct in project jena by apache.

the class TestDateTimeParsing method testGMonth_3.

@Test
public void testGMonth_3() {
    DateTimeStruct dt = DateTimeStruct.parseGMonth("--10-08:00");
    check(dt, null, null, "10", null, "-08:00");
}
Also used : DateTimeStruct(org.apache.jena.sparql.util.DateTimeStruct) Test(org.junit.Test)

Example 17 with DateTimeStruct

use of org.apache.jena.sparql.util.DateTimeStruct in project jena by apache.

the class TestDateTimeParsing method testGMonthDay_1.

@Test
public void testGMonthDay_1() {
    DateTimeStruct dt = DateTimeStruct.parseGMonthDay("--10-31");
    check(dt, null, null, "10", "31", null);
}
Also used : DateTimeStruct(org.apache.jena.sparql.util.DateTimeStruct) Test(org.junit.Test)

Example 18 with DateTimeStruct

use of org.apache.jena.sparql.util.DateTimeStruct in project jena by apache.

the class TestDateTimeParsing method testGYearMonth_3.

@Test
public void testGYearMonth_3() {
    DateTimeStruct dt = DateTimeStruct.parseGYearMonth("2007-10-08:00");
    check(dt, null, "2007", "10", null, "-08:00");
}
Also used : DateTimeStruct(org.apache.jena.sparql.util.DateTimeStruct) Test(org.junit.Test)

Example 19 with DateTimeStruct

use of org.apache.jena.sparql.util.DateTimeStruct in project jena by apache.

the class TestDateTimeParsing method testGYear_1.

@Test
public void testGYear_1() {
    DateTimeStruct dt = DateTimeStruct.parseGYear("2007");
    check(dt, null, "2007", null, null, null);
}
Also used : DateTimeStruct(org.apache.jena.sparql.util.DateTimeStruct) Test(org.junit.Test)

Example 20 with DateTimeStruct

use of org.apache.jena.sparql.util.DateTimeStruct in project jena by apache.

the class TestDateTimeParsing method testGDay_1.

@Test
public void testGDay_1() {
    DateTimeStruct dt = DateTimeStruct.parseGDay("---31");
    check(dt, null, null, null, "31", null);
}
Also used : DateTimeStruct(org.apache.jena.sparql.util.DateTimeStruct) Test(org.junit.Test)

Aggregations

DateTimeStruct (org.apache.jena.sparql.util.DateTimeStruct)28 Test (org.junit.Test)19 ARQInternalErrorException (org.apache.jena.sparql.ARQInternalErrorException)2 XMLGregorianCalendar (javax.xml.datatype.XMLGregorianCalendar)1 Node (org.apache.jena.graph.Node)1