Search in sources :

Example 1 with DateTimeStruct

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

the class TestDateTimeParsing method testGYear_2.

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

Example 2 with DateTimeStruct

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

the class TestDateTimeParsing method testGYearMonth_1.

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

Example 3 with DateTimeStruct

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

the class TestDateTimeParsing method testGMonth_2.

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

Example 4 with DateTimeStruct

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

the class TestDateTimeParsing method testGYearMonth_2.

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

Example 5 with DateTimeStruct

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

the class TestDateTimeParsing method testDT_12.

@Test
public void testDT_12() {
    DateTimeStruct dt = DateTimeStruct.parseDateTime("-2007-08-31T12:34:56.003-05:00");
    check(dt, "-", "2007", "08", "31", "12", "34", "56.003", "-05:00");
}
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