public class DateTimeUtils
extends java.lang.Object
| Constructor and Description |
|---|
DateTimeUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.jena.rdf.model.Literal |
getCurrentDateTimeStamp(org.apache.jena.rdf.model.Model model)
Returns the current date as xsd:dateTimeStamp (time stamp with timezone
info).
|
static java.util.Date |
parse(java.lang.String date,
org.apache.jena.rdf.model.Model model)
Parses the specified date, which is expected to be an xsd:dateTimeStamp (time
stamp with timezone info).
|
static java.util.Date |
toDate(org.apache.jena.rdf.model.Literal literal,
org.apache.jena.rdf.model.Model model) |
static java.util.Date |
toDate(org.apache.jena.rdf.model.RDFNode node,
org.apache.jena.rdf.model.Model model)
Converts node to Date if it is a literal, returns null otherwise.
|
static org.apache.jena.rdf.model.Literal |
toLiteral(java.util.Date date,
org.apache.jena.rdf.model.Model model)
Formats the date as xsd:dateTimeStamp (time stamp with timezone info).
|
public static org.apache.jena.rdf.model.Literal toLiteral(java.util.Date date,
org.apache.jena.rdf.model.Model model)
date - public static org.apache.jena.rdf.model.Literal getCurrentDateTimeStamp(org.apache.jena.rdf.model.Model model)
public static java.util.Date toDate(org.apache.jena.rdf.model.Literal literal,
org.apache.jena.rdf.model.Model model)
public static java.util.Date parse(java.lang.String date,
org.apache.jena.rdf.model.Model model)
date - public static java.util.Date toDate(org.apache.jena.rdf.model.RDFNode node,
org.apache.jena.rdf.model.Model model)
node - model - Copyright © 2019. All Rights Reserved.