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

Public Member Functions

 Constraint ()
 
 Constraint (Constraint copia)
 
 Constraint (String _uri)
 
void setOperator (String _operator)
 
void setRightOperand (String _rightOperand)
 
void setValue (String _value)
 

Protected Attributes

String operator=""
 
String rightOperand =""
 
String value =""
 

Additional Inherited Members

Detailed Description

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).

Author
Victor Rodriguez Doncel at OEG-UPM 2014

Constructor & Destructor Documentation

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

Parameters
_uriURI of the action

Member Function Documentation

void odrlmodel.Constraint.setOperator ( String  _operator)

Sets the operator

Parameters
_operatorAn 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

Parameters
_rightOperandA 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

Parameters
_valueValue, like http://www.lexvo.org/page/iso639-3/eng, 3, etc.

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