org.openrdf.sesame.sailimpl.omm.security
Class ResourceRestriction

java.lang.Object
  extended byorg.openrdf.sesame.sailimpl.omm.security.Restriction
      extended byorg.openrdf.sesame.sailimpl.omm.security.ResourceRestriction
Direct Known Subclasses:
ClassesOverSchemaRestriction, ClassesRestriction, InstancesRestriction

public class ResourceRestriction
extends Restriction

ResourceRestriction.java

Title: Knowledge Control System

Company: OntoText Lab. Sirma AI.

Version:
1.0 Base class for Classes/Instances Restrictions
Author:
borislav popov

Field Summary
 
Fields inherited from class org.openrdf.sesame.sailimpl.omm.security.Restriction
CLASSES, CLASSES_OVER_SCHEMA, CLASSES_OVER_SCHEMA_RESTRICTION, CLASSES_RESTRICTION, INSTANCES, INSTANCES_RESTRICTION, PATTERN, PATTERN_RESTRICTION, PROPERTIES, PROPERTIES_RESTRICTION, QUERY, QUERY_RESTRICTION, REPOSITORY, REPOSITORY_RESTRICTION, SCHEMA, SCHEMA_RESTRICTION
 
Constructor Summary
ResourceRestriction(int id, int type, String name, String descr)
          Create a Resource Restriction.
 
Method Summary
 Set getResources()
          retrieve the resources forming the restriction
 void setResources(Set resources)
          Sets the resources that form this restriction.
 ArrayList toSql(Map idByLiteral, Map idByRes)
          Creates update queries over the restrictions, res_prop_restrs, query_restrs, pattern_restrs tables.
 
Methods inherited from class org.openrdf.sesame.sailimpl.omm.security.Restriction
createClassesOverSchemaRestriction, createClassesOverSchemaRestriction, createClassesRestriction, createClassesRestriction, createInstancesRestriction, createInstancesRestriction, createPatternRestriction, createPatternRestriction, createPropertiesRestriction, createPropertiesRestriction, createQueryRestriction, createQueryRestriction, createRepositoryRestriction, createRepositoryRestriction, createRestriction, createRestriction, createSchemaRestriction, createSchemaRestriction, getDescription, getId, getName, getRestrictions, getType, getUri, setDescription, setId, setName, setType, setUri, type2Int, type2String
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceRestriction

public ResourceRestriction(int id,
                           int type,
                           String name,
                           String descr)
Create a Resource Restriction.

Parameters:
id - id of the restriction.
name - name of the restriction.
descr - description of the restriction.
Method Detail

getResources

public Set getResources()
retrieve the resources forming the restriction

Returns:
set of the resources

setResources

public void setResources(Set resources)
                  throws NullParameterException
Sets the resources that form this restriction.

Parameters:
resources - the resources to be set to this restriction
Throws:
NullParameterException - if the parameter is null

toSql

public ArrayList toSql(Map idByLiteral,
                       Map idByRes)
                throws NullParameterException,
                       SecurityException
Description copied from class: Restriction
Creates update queries over the restrictions, res_prop_restrs, query_restrs, pattern_restrs tables.

Overrides:
toSql in class Restriction
Returns:
A list of update SQL queries, to be used to mirror the objects' properties from memory to an SQL repository.
Throws:
NullParameterException
SecurityException


Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.