ODRL2.0 Simple API
1.0
A simple API to manage simple ODRL2.0 expressions
|
Public Member Functions | |
Constraint () | |
Constraint (Constraint copia) | |
Constraint (String _uri) | |
void | setOperator (String _operator) |
void | setRightOperand (String _rightOperand) |
void | setValue (String _value) |
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 () |
Protected Attributes | |
String | operator="" |
String | rightOperand ="" |
String | value ="" |
Additional Inherited Members | |
Public Attributes inherited from odrlmodel.MetadataObject | |
List< String > | labels = new ArrayList() |
String | comment = "" |
String | seeAlso ="" |
String | title ="" |
String | uri = "" |
Static Public Attributes inherited from odrlmodel.MetadataObject | |
static final String | DEFAULT_NAMESPACE = LDRConfig.getNamespace() |
This class represents an ODRL2.0 Constraint.
The Constraint entity indicates limits and restrictions to the Permission, the Prohibition and the Duty entity. Constraints express mathematical terms with two operands and one operator. For example, the “number of usages” (name) must be “smaller than” (operator) the “number 10″ (rightOperand).
If multiple Constraint entities are linked to the same Permission, Prohibition, or Duty entity, then all of the Constraint entities MUST be satisfied. That is, all the Constraint entities are (boolean) anded. In the case where the same Constraint is repeated, then these MUST be represented as a single Constraint entity using an appropriate operator value (for example, isAnyOf).
odrlmodel.Constraint.Constraint | ( | ) |
Default constraint with a random URI
odrlmodel.Constraint.Constraint | ( | Constraint | copia | ) |
Cloner constructor
odrlmodel.Constraint.Constraint | ( | String | _uri | ) |
Creates an action identified by the given URI. This Action might be one of those defined by ODRL, in which case label, comment, and seeAlso are loaded from the ODRL ontology
_uri | URI of the action |
void odrlmodel.Constraint.setOperator | ( | String | _operator | ) |
Sets the operator
_operator | An operator, like http://www.w3.org/ns/odrl/2/gt or http://www.w3.org/ns/odrl/2/eq |
void odrlmodel.Constraint.setRightOperand | ( | String | _rightOperand | ) |
Sets the rightOperand
_rightOperand | A rightOperand, like http://www.w3.org/ns/odrl/2/language, http://www.w3.org/ns/odrl/2/industry, etc. |
void odrlmodel.Constraint.setValue | ( | String | _value | ) |
Sets the vlue
_value | Value, like http://www.lexvo.org/page/iso639-3/eng, 3, etc. |