ODRL2.0 Simple API
1.0
A simple API to manage simple ODRL2.0 expressions
|
Public Member Functions | |
Asset () | |
Asset (String s) | |
List< Policy > | getPolicies () |
void | setPolicy (Policy policy) |
void | addPolicy (Policy policy) |
void | removePolicy (String uri) |
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< Policy > | policies = new ArrayList() |
Public Attributes inherited from odrlmodel.MetadataObject | |
List< String > | labels = new ArrayList() |
String | comment = "" |
String | seeAlso ="" |
String | title ="" |
String | uri = "" |
Additional Inherited Members | |
Static Public Attributes inherited from odrlmodel.MetadataObject | |
static final String | DEFAULT_NAMESPACE = LDRConfig.getNamespace() |
This class represents an ODRL 2.0 Asset
The Asset entity is aimed at identifying the content that is the subject of an ODRL policy, e.g. a media file or ebook. Furthermore, it can be used to represent other Asset entities that are needed to undertake the Policy expression, such as with the Duty entity.
The Asset entity is referred to by the Permission and/or Prohibition entities, and also by the Duty entity. The Asset entity contains the following attribute: uid: the unique identification of the Asset (REQUIRED)
The identification of the Asset entity is a key foundation of the ODRL Policy language. However, there are some use cases where the ODRL Policy expression MAY be embedded inside the target Asset. In these cases, it MAY be more appropriate to provide, or infer, a link to the Asset entity (as the complete Asset uid may not be known at the time) through the local context. Use of such inference and context MUST be documented in the relevant ODRL community Profile.
Since ODRL _policies could deal with any kind of asset, the ODRL Core Model does not provide additional metadata to describe Asset entities of particular media types. It is recommended to use already existing metadata standards, such as Dublin Core Metadata Terms that are appropriate to the Asset type or purpose.
The Relation entity is used to associate the Asset entity with the relevant Permission, Prohibition, and Duty entities
odrlmodel.Asset.Asset | ( | ) |
Creates a Linked Data resource, identifiable by its URI. A random URI is given.
odrlmodel.Asset.Asset | ( | String | s | ) |
Creates a Linked Data resource, identifiable by its URI.
s | URI of the asset |
void odrlmodel.Asset.addPolicy | ( | Policy | policy | ) |
Adds a policy to the list of policy
policy | New policy to be added |
List<Policy> odrlmodel.Asset.getPolicies | ( | ) |
Returns the list of _policies ya completada
VVXXXVVV
void odrlmodel.Asset.removePolicy | ( | String | uri | ) |
Removes the policy of the given URI uri of the policy to be removed
void odrlmodel.Asset.setPolicy | ( | Policy | policy | ) |
Sets the given policy as the only policy
policy | The policy |
List<Policy> odrlmodel.Asset.policies = new ArrayList() |
An asseet may have attached a set of _policies