|
ODRL2.0 Simple API
1.0
A simple API to manage simple ODRL2.0 expressions
|
Public Member Functions | |
| Rule () | |
| Rule (String _uri) | |
| int | getKindOfRule () |
| void | setKindOfRule (int _ikind) |
| List< Action > | getActions () |
| void | setActions (List< Action > _actions) |
| List< Constraint > | getConstraints () |
| 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 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 () |
Public Attributes | |
| List< Action > | actions = new ArrayList() |
| List< Constraint > | constraints = new ArrayList() |
| String | target ="" |
Public Attributes inherited from odrlmodel.MetadataObject | |
| List< String > | labels = new ArrayList() |
| String | comment = "" |
| String | seeAlso ="" |
| String | title ="" |
| String | uri = "" |
Static Public Attributes | |
| static final int | RULE_PERMISSION = 0 |
| static final int | RULE_PROHIBITION = 1 |
| static final int | RULE_DUTY = 2 |
Static Public Attributes inherited from odrlmodel.MetadataObject | |
| static final String | DEFAULT_NAMESPACE = LDRConfig.getNamespace() |
Protected Member Functions | |
| String | getKindOfRuleString () |
Protected Attributes | |
| Party | assignee =null |
| Party | assigner = null |
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:
| 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
| _uri | A valid URI. Can be an empty string (anonymous source) |
| List<Action> odrlmodel.Rule.getActions | ( | ) |
Gets the actions associated to this rule
| Party odrlmodel.Rule.getAssignee | ( | ) |
Gets the assignee of the rule.
| Party odrlmodel.Rule.getAssigner | ( | ) |
Gets the assigner of the rule.
| List<Constraint> odrlmodel.Rule.getConstraints | ( | ) |
Gets the list of constraints the rule has.
| int odrlmodel.Rule.getKindOfRule | ( | ) |
Gets the kind of the rule
|
protected |
Gets an string describing the kind of the rule
| void odrlmodel.Rule.setActions | ( | List< Action > | _actions | ) |
Sets the actions referred by this rule
| _actions | List of actions |
| void odrlmodel.Rule.setAssignee | ( | Party | _assignee | ) |
Sets the assignee of the rule
| _assignee |
| void odrlmodel.Rule.setAssigner | ( | Party | _assigner | ) |
Sets the assigner of the rule
| _assigner |
| void odrlmodel.Rule.setConstraints | ( | List< Constraint > | _constraints | ) |
Sets the constraints for this rule to apply
| _constraints | List of constratins |
| void odrlmodel.Rule.setKindOfRule | ( | int | _ikind | ) |
Sets the kind of rule
| _ikind | either Rule.RULE_PERMISSION, Rule.RULE_PROHIBITION or Rule.RULE_DUTY |
1.8.3.1