net.java.rdf.sommer
Class MapperManager

java.lang.Object
  extended by net.java.rdf.sommer.MapperManager

public abstract class MapperManager
extends java.lang.Object

Author:
Henry Story

Field Summary
(package private) static Mapper.Init deflt
           
protected static java.util.HashMap<java.lang.String,Mapping> graphMapper
          We keep a map of graph name to mapper objects
protected static java.util.logging.Logger log
           
 
Constructor Summary
MapperManager()
           
 
Method Summary
(package private) static Mapper.Init getDefaultInit()
           
static Mapper getMapperForGraph(Mapper.Init init, java.lang.String... urls)
          every Mapper specialises in mapping to a graph
static Mapper getMapperForGraph(java.lang.String... url)
          every Mapper specialises in mapping to a graph or union of graphs
static RewriteMapper getMapperForObject(java.lang.Object o)
          Deprecated. This was needed when the objects could not tell of themselves who their mapper was. They always had to go through this very slow method.
static void outputAll()
          Output the content of all the graphs
static void setDefaultInit(Mapper.Init defltInit)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static transient java.util.logging.Logger log

graphMapper

protected static java.util.HashMap<java.lang.String,Mapping> graphMapper
We keep a map of graph name to mapper objects


deflt

static Mapper.Init deflt
Constructor Detail

MapperManager

public MapperManager()
Method Detail

getDefaultInit

static Mapper.Init getDefaultInit()

setDefaultInit

public static void setDefaultInit(Mapper.Init defltInit)

getMapperForGraph

public static Mapper getMapperForGraph(java.lang.String... url)
every Mapper specialises in mapping to a graph or union of graphs

Parameters:
url - the url for the graph(s) (should later also allow blank nodes. idea: if they start with '_:') the first url indicates the graph write operations are done in
Returns:
A Mapper

getMapperForGraph

public static Mapper getMapperForGraph(Mapper.Init init,
                                       java.lang.String... urls)
every Mapper specialises in mapping to a graph

Parameters:
init - the Initialiser for the mapper.
url - the url for the graph(s) (should later also allow blank nodes. idea: if they start with '_:') the first url indicates the graph write operations are done in
Returns:
A Mapper

getMapperForObject

public static RewriteMapper getMapperForObject(java.lang.Object o)
Deprecated. This was needed when the objects could not tell of themselves who their mapper was. They always had to go through this very slow method.

Every object o if mapped belongs to a graph. We may not need this later if we add information right into the object concerning which field the object is mapped to. For the moment this is a call for the rewriter only.

Parameters:
o -
Returns:
The RewriteMapper in which the object is mapped, or null

outputAll

public static void outputAll()
Output the content of all the graphs