ODRL2.0 Simple API  1.0
A simple API to manage simple ODRL2.0 expressions
 All Classes Functions Variables Pages
Static Public Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
odrlmodel.ODRLRDF Class Reference

Static Public Member Functions

static String getRDF (Policy policy, org.apache.jena.riot.Lang lang)
 
static List< Policyload (String path)
 

Static Protected Member Functions

static List< Resource > findPolicies (Model model)
 
static Policy getPolicyFromResource (Resource rpolicy)
 
static MetadataObject getResourceMetadata (MetadataObject me, Resource resource)
 

Static Protected Attributes

static Property PCCPERMISSION = ModelFactory.createDefaultModel().createProperty("http://creativecommons.org/ns#permits")
 
static Property PCCPERMISSION2 = ModelFactory.createDefaultModel().createProperty("http://web.resource.org/cc/permits")
 
static Property PCCREQUIRES = ModelFactory.createDefaultModel().createProperty("http://creativecommons.org/ns#requires")
 

Detailed Description

Interface to serialize ODRL2.0 Expressions from / to RDF.

Author
Victor

Member Function Documentation

static List<Resource> odrlmodel.ODRLRDF.findPolicies ( Model  model)
staticprotected

Finds the policies in the model. It determines URIs with a type of a known policy term. Policies are accepted to be odrl:policy, cc:License or dc:LicenseDocument

Parameters
modelModel
Returns
List of resources
static Policy odrlmodel.ODRLRDF.getPolicyFromResource ( Resource  rpolicy)
staticprotected

Gets a ODRL2.0 policy object from a RDF resource

Parameters
anRDF Resource
Returns
An ODRL policy
static String odrlmodel.ODRLRDF.getRDF ( Policy  policy,
org.apache.jena.riot.Lang  lang 
)
static

Serializes the policy into a RDF string

Parameters
policyA given policy
Returns
The serialization language for the policy. For example, Lang.TTL
static MetadataObject odrlmodel.ODRLRDF.getResourceMetadata ( MetadataObject  me,
Resource  resource 
)
staticprotected

Returns a MetadataObject from a Jena resource

Parameters
meMetadataObject to be enriched
resourceResource with the data
static List<Policy> odrlmodel.ODRLRDF.load ( String  path)
static

Loads the ODRL2.0 policies found in a file.

Parameters
pathFile location
Returns
A set of policies

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