|
ODRL2.0 Simple API
1.0
A simple API to manage simple ODRL2.0 expressions
|
Public Member Functions | |
| Policy () | |
| Policy (String _uri) | |
| int | getType () |
| void | setType (int _type) |
| void | addRule (Rule r) |
| List< Rule > | getRules () |
| void | setRules (List< Rule > _rules) |
| void | setTargetInAllRules (String targetName) |
| void | setAssigneeInAllRules (Party assignee) |
| void | setAssignerInAllRules (Party assigner) |
Public Member Functions inherited from odrlmodel.MetadataObject | |
| MetadataObject () | |
| MetadataObject (String _uri) | |
| MetadataObject (MetadataObject mo) | |
| void | setURI (String _uri) |
| String | getURI () |
| boolean | isAnon () |
| String | getComment () |
| void | setComment (String _comment) |
| String | getSeeAlso () |
| String | getTitle () |
| void | setTitle (String _title) |
| String | getLabel (String lan) |
| void | addLabel (String label) |
| void | setLabel (String label, String lang) |
| void | setLabel (String _label) |
| String | toString () |
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 |
Static Public Attributes inherited from odrlmodel.MetadataObject | |
| static final String | DEFAULT_NAMESPACE = LDRConfig.getNamespace() |
Protected Attributes | |
| List< Rule > | rules = new ArrayList() |
| String | fileName = "" |
Additional Inherited Members | |
Public Attributes inherited from odrlmodel.MetadataObject | |
| List< String > | labels = new ArrayList() |
| String | comment = "" |
| String | seeAlso ="" |
| String | title ="" |
| String | uri = "" |
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
| 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
| _uri | Given URI |
| List<Rule> odrlmodel.Policy.getRules | ( | ) |
Gets the list of rules this policy has
| int odrlmodel.Policy.getType | ( | ) |
Gets the type of the Policy
| void odrlmodel.Policy.setAssigneeInAllRules | ( | Party | assignee | ) |
Sets a certain assignee in all the rules
| assignee | Party assigner |
| void odrlmodel.Policy.setAssignerInAllRules | ( | Party | assigner | ) |
Sets a certain assigner in all the rules
| assigner | Party assigner |
| void odrlmodel.Policy.setRules | ( | List< Rule > | _rules | ) |
Sets the list of rules
| _rules | List of rules |
| void odrlmodel.Policy.setTargetInAllRules | ( | String | targetName | ) |
Sets a certain target in all the rules
| targetName | Name of the target |
| void odrlmodel.Policy.setType | ( | int | _type | ) |
Sets the type of the policy
| _type,one | of: Policy.POLICY_SET, Policy.POLICY_REQUEST, Policy.POLICY_OFFER |
1.8.3.1