org.topbraid.spin.arq
Class Aggregations

java.lang.Object
  extended by org.topbraid.spin.arq.Aggregations

public class Aggregations
extends java.lang.Object

Manages the registered SPARQL aggregations (such as SUM). These are loaded from the sp system ontology.

Author:
Holger Knublauch

Constructor Summary
Aggregations()
           
 
Method Summary
static java.lang.String getName(Resource aggType)
          If registered, returns the display name of a given aggregation type.
static Resource getType(java.lang.String name)
          If registered, returns the aggregation Resource for a given display name.
static void register(Resource aggType, java.lang.String name)
          Programatically adds a new aggregation type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Aggregations

public Aggregations()
Method Detail

getName

public static java.lang.String getName(Resource aggType)
If registered, returns the display name of a given aggregation type.

Parameters:
aggType - the aggregation type, e.g. sp:Sum
Returns:
the name (e.g., "SUM") or null if not registered

getType

public static Resource getType(java.lang.String name)
If registered, returns the aggregation Resource for a given display name.

Parameters:
name - the name (e.g., "SUM")
Returns:
the type or null if not registered

register

public static void register(Resource aggType,
                            java.lang.String name)
Programatically adds a new aggregation type. This is usually only populated from the sp system ontology, but API users may want to bypass (and extend) this mechanism.

Parameters:
aggType - the type to register
name - the display name