slib.sglib.model.impl.repo
Class URIFactoryMemory

java.lang.Object
  extended by slib.sglib.model.impl.repo.URIFactoryMemory
All Implemented Interfaces:
slib.sglib.model.repo.URIFactory

public class URIFactoryMemory
extends Object
implements slib.sglib.model.repo.URIFactory

This class defines the singleton used as an in memory repository which manage all used URI and storage element i.e. graphs. The main goal of the DataFactory singleton is to avoid URI and NameSpace object duplicates and must therefore be used to create and load URIs. The repository must be in agreement to graph representation i.e. URI loaded in a graph are linked to the corresponding storage element in the Data repository. All change of the graph must be propagated on the Data Repository

Author:
Sebastien Harispe

Method Summary
 void clear()
           
 org.openrdf.model.URI createURI(String sURI)
           
 org.openrdf.model.URI createURI(String snamespace, String sURI)
           
 String getNamespace(String ns_prefix)
           
static URIFactoryMemory getSingleton()
          Access to the in-memory URI Factory.
 boolean loadNamespacePrefix(String prefix, String reference)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSingleton

public static URIFactoryMemory getSingleton()
Access to the in-memory URI Factory.

Returns:
the singleton

loadNamespacePrefix

public boolean loadNamespacePrefix(String prefix,
                                   String reference)
                            throws slib.utils.ex.SLIB_Ex_Critic
Specified by:
loadNamespacePrefix in interface slib.sglib.model.repo.URIFactory
Throws:
slib.utils.ex.SLIB_Ex_Critic

getNamespace

public String getNamespace(String ns_prefix)
Specified by:
getNamespace in interface slib.sglib.model.repo.URIFactory

clear

public void clear()
Specified by:
clear in interface slib.sglib.model.repo.URIFactory

createURI

public org.openrdf.model.URI createURI(String sURI)
Specified by:
createURI in interface slib.sglib.model.repo.URIFactory

createURI

public org.openrdf.model.URI createURI(String snamespace,
                                       String sURI)
Specified by:
createURI in interface slib.sglib.model.repo.URIFactory


Copyright © 2013. All Rights Reserved.