public final class AggregationUtils extends Object
Modifier and Type | Method and Description |
---|---|
static int |
compareByInsertedAt(de.fuberlin.wiwiss.ng4j.Quad quad1,
de.fuberlin.wiwiss.ng4j.Quad quad2,
NamedGraphMetadataMap metadata)
Compare two quads by their odcs:insertedAt date.
|
static boolean |
convertToBoolean(com.hp.hpl.jena.graph.impl.LiteralLabel literal)
Convert the given literal to a boolean value.
|
static Calendar |
convertToCalendarSilent(com.hp.hpl.jena.graph.Node node)
Try to convert a literal node representing a date/time to a Calendar instance.
|
static double |
convertToDoubleSilent(com.hp.hpl.jena.graph.impl.LiteralLabel literal)
Try to convert a literal to the numeric value it is representing.
|
static double |
convertToDoubleSilent(com.hp.hpl.jena.graph.Node node)
Try to convert a literal node to the numeric value it is representing.
|
static EnumLiteralType |
getComparisonType(Collection<de.fuberlin.wiwiss.ng4j.Quad> quads)
Returns the literal comparison type for objects of the given quads.
|
static com.hp.hpl.jena.datatypes.xsd.XSDDateTime |
getDateTimeValue(com.hp.hpl.jena.graph.impl.LiteralLabel literal)
Returns the value of a literal as an XSDDateTime instance if possible, otherwise return null.
|
static EnumLiteralType |
getLiteralType(com.hp.hpl.jena.graph.Node node)
Return the type of a literal node.
|
public static EnumLiteralType getLiteralType(com.hp.hpl.jena.graph.Node node)
node
- node a literal node; if not a literal, an IllegalArgumentException is thrownEnumLiteralType
public static double convertToDoubleSilent(com.hp.hpl.jena.graph.impl.LiteralLabel literal)
literal
- a literal valuepublic static double convertToDoubleSilent(com.hp.hpl.jena.graph.Node node)
node
- a Node
public static boolean convertToBoolean(com.hp.hpl.jena.graph.impl.LiteralLabel literal)
literal
- a literalpublic static Calendar convertToCalendarSilent(com.hp.hpl.jena.graph.Node node)
node
- a Node
public static com.hp.hpl.jena.datatypes.xsd.XSDDateTime getDateTimeValue(com.hp.hpl.jena.graph.impl.LiteralLabel literal)
literal
- a literal representing date/timepublic static int compareByInsertedAt(de.fuberlin.wiwiss.ng4j.Quad quad1, de.fuberlin.wiwiss.ng4j.Quad quad2, NamedGraphMetadataMap metadata)
quad1
- first compared quadquad2
- second compared quadmetadata
- metadata of the compared quadspublic static EnumLiteralType getComparisonType(Collection<de.fuberlin.wiwiss.ng4j.Quad> quads)
quads
- collection of (conflicting) quadsCopyright © 2013. All Rights Reserved.