ODRL2.0 Simple API  1.0
A simple API to manage simple ODRL2.0 expressions
 All Classes Functions Variables Pages
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
odrlmodel.Rule Class Reference
Inheritance diagram for odrlmodel.Rule:
odrlmodel.MetadataObject odrlmodel.Duty odrlmodel.Permission odrlmodel.Prohibition

Public Member Functions

 Rule ()
 
 Rule (String _uri)
 
int getKindOfRule ()
 
void setKindOfRule (int _ikind)
 
List< ActiongetActions ()
 
void setActions (List< Action > _actions)
 
List< ConstraintgetConstraints ()
 
void setConstraints (List< Constraint > _constraints)
 
void addAction (Action a)
 
void addConstraint (Constraint a)
 
void setAssignee (Party _assignee)
 
Party getAssignee ()
 
void setAssigner (Party _assigner)
 
Party getAssigner ()
 
String toString ()
 
void setTarget (String target1)
 

Public Attributes

List< Actionactions = new ArrayList()
 
List< Constraintconstraints = new ArrayList()
 
String target =""
 

Static Public Attributes

static final int RULE_PERMISSION = 0
 
static final int RULE_PROHIBITION = 1
 
static final int RULE_DUTY = 2
 

Protected Member Functions

String getKindOfRuleString ()
 

Protected Attributes

Party assignee =null
 
Party assigner = null
 

Detailed Description

This class represents a simple ODRL rule Rule is an abstract common ancestor to Permissions, Prohibitions and Duties. A Rule (reduced version of the ODRL Rule) is made of:

Constructor & Destructor Documentation

odrlmodel.Rule.Rule ( )

Rule constructor with a random URI in the default namespace A rule is by default a constructor

odrlmodel.Rule.Rule ( String  _uri)

Rule constructor with a given URI

Parameters
_uriA valid URI. Can be an empty string (anonymous source)

Member Function Documentation

List<Action> odrlmodel.Rule.getActions ( )

Gets the actions associated to this rule

Party odrlmodel.Rule.getAssignee ( )

Gets the assignee of the rule.

Returns
The assignee
Party odrlmodel.Rule.getAssigner ( )

Gets the assigner of the rule.

Returns
The assigner
List<Constraint> odrlmodel.Rule.getConstraints ( )

Gets the list of constraints the rule has.

Returns
List of constraints
int odrlmodel.Rule.getKindOfRule ( )

Gets the kind of the rule

Returns
either Rule.RULE_PERMISSION, Rule.RULE_PROHIBITION or Rule.RULE_DUTY
String odrlmodel.Rule.getKindOfRuleString ( )
protected

Gets an string describing the kind of the rule

Returns
either "Permission", or "Prohibition" or "Duty" -empty if unkown kind.
void odrlmodel.Rule.setActions ( List< Action _actions)

Sets the actions referred by this rule

Parameters
_actionsList of actions
void odrlmodel.Rule.setAssignee ( Party  _assignee)

Sets the assignee of the rule

Parameters
_assignee
void odrlmodel.Rule.setAssigner ( Party  _assigner)

Sets the assigner of the rule

Parameters
_assigner
void odrlmodel.Rule.setConstraints ( List< Constraint _constraints)

Sets the constraints for this rule to apply

Parameters
_constraintsList of constratins
void odrlmodel.Rule.setKindOfRule ( int  _ikind)

Sets the kind of rule

Parameters
_ikindeither Rule.RULE_PERMISSION, Rule.RULE_PROHIBITION or Rule.RULE_DUTY

The documentation for this class was generated from the following file: