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

Public Member Functions

 Policy ()
 
 Policy (String _uri)
 
int getType ()
 
void setType (int _type)
 
void addRule (Rule r)
 
List< RulegetRules ()
 
void setRules (List< Rule > _rules)
 
void setTargetInAllRules (String targetName)
 
void setAssigneeInAllRules (Party assignee)
 
void setAssignerInAllRules (Party assigner)
 

Static Public Attributes

static final int POLICY_SET = 0
 
static final int POLICY_REQUEST = 1
 
static final int POLICY_OFFER = 2
 
static final int POLICY_CC = 3
 
static final int POLICY_AGREEMENT = 4
 
static final int POLICY_TICKET = 5
 

Protected Attributes

List< Rulerules = new ArrayList()
 
String fileName = ""
 

Additional Inherited Members

Detailed Description

Policy represents an ODRL policy, supporting a reduced set of the features defined in the ODRL2.0 specification

The Policy entity is the top-level entity.

An abstract common ancestor to Permissions, Prohibitions and Duties. For more information, check http://www.w3.org/community/odrl/two/model/#section-21

Author
Victor Rodriguez Doncel at OEG-UPM 2014

Constructor & Destructor Documentation

odrlmodel.Policy.Policy ( )

Policy constructor with a random URI in the default namespace A policy is by default a Set policy

odrlmodel.Policy.Policy ( String  _uri)

Policy constructor with a given URI A policy is by default a Set policy

Parameters
_uriGiven URI

Member Function Documentation

void odrlmodel.Policy.addRule ( Rule  r)

Adds a rule to the policy

Parameters
rRule to be added
List<Rule> odrlmodel.Policy.getRules ( )

Gets the list of rules this policy has

Returns
List of rules
int odrlmodel.Policy.getType ( )

Gets the type of the Policy

Returns
one of: Policy.POLICY_SET, Policy.POLICY_REQUEST, Policy.POLICY_OFFER
void odrlmodel.Policy.setAssigneeInAllRules ( Party  assignee)

Sets a certain assignee in all the rules

Parameters
assigneeParty assigner
void odrlmodel.Policy.setAssignerInAllRules ( Party  assigner)

Sets a certain assigner in all the rules

Parameters
assignerParty assigner
void odrlmodel.Policy.setRules ( List< Rule _rules)

Sets the list of rules

Parameters
_rulesList of rules
void odrlmodel.Policy.setTargetInAllRules ( String  targetName)

Sets a certain target in all the rules

Parameters
targetNameName of the target
void odrlmodel.Policy.setType ( int  _type)

Sets the type of the policy

Parameters
_type,oneof: Policy.POLICY_SET, Policy.POLICY_REQUEST, Policy.POLICY_OFFER

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