public class LinkerDao extends Object
Modifier and Type | Method and Description |
---|---|
void |
clearGraph(String graphId)
Deletes given graph from the RDF database.
|
void |
createGraphGroup(String groupName,
Set<String> graphNames,
EnumDatabaseInstance db)
Creates a graph group (metagraph) in clean or dirty database and adds graphs to it.
|
void |
deleteGraphGroup(String groupName,
EnumDatabaseInstance db,
boolean isSilent)
Deletes given graph group.
|
Set<String> |
getAllGraphNames()
Load all RDF graphs' names from the clean database
|
static LinkerDao |
getInstance(JDBCConnectionCredentials cleanDBCredentials,
JDBCConnectionCredentials dirtyDBCredentials)
Creates singleton instance.
|
void |
loadLabels(Map<String,String> uriLabelMap)
Loads labels (rdfs:label) for given URIs.
|
List<SilkRule> |
loadRules(Integer[] groups,
TableVersion tableVersion)
Loads rules from given groups from the database.
|
public static LinkerDao getInstance(JDBCConnectionCredentials cleanDBCredentials, JDBCConnectionCredentials dirtyDBCredentials) throws ConnectionException
credentials
- connection parametersConnectionException
public List<SilkRule> loadRules(Integer[] groups, TableVersion tableVersion) throws QueryException, ConnectionException
groups
- array of group IDsQueryException
SQLException
ConnectionException
public void clearGraph(String graphId) throws ConnectionException, QueryException
graphId
- ID of a graph to deleteConnectionException
QueryException
public void loadLabels(Map<String,String> uriLabelMap) throws QueryException, ConnectionException
uriLabelMap
- in/out parameter, map URI:labelQueryException
ConnectionException
public void createGraphGroup(String groupName, Set<String> graphNames, EnumDatabaseInstance db) throws ConnectionException, QueryException
groupName
- name of the group to be createdgraphNames
- graphs to be added to the groupdb
- database instance (clean/dirty)ConnectionException
QueryException
public void deleteGraphGroup(String groupName, EnumDatabaseInstance db, boolean isSilent) throws ConnectionException, QueryException
groupName
- name of group to be deleteddb
- database instance (clean/dirty)isSilent
- when set to false and group does not exist, exception is raisedConnectionException
QueryException
public Set<String> getAllGraphNames() throws QueryException, ConnectionException
QueryException
ConnectionException
Copyright © 2013. All Rights Reserved.