ODRL2.0 Simple API  1.0
A simple API to manage simple ODRL2.0 expressions
 All Classes Functions Variables Pages
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
odrlmodel.MetadataObject Class Reference
Inheritance diagram for odrlmodel.MetadataObject:
odrlmodel.Action odrlmodel.Asset odrlmodel.Constraint odrlmodel.Party odrlmodel.Policy odrlmodel.Rule odrlmodel.Duty odrlmodel.Permission odrlmodel.Prohibition

Public Member Functions

 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< String > labels = new ArrayList()
 
String comment = ""
 
String seeAlso =""
 
String title =""
 
String uri = ""
 

Static Public Attributes

static final String DEFAULT_NAMESPACE = LDRConfig.getNamespace()
 

Detailed Description

This class represents a resource with some metadata. Under this simple model, objects may have zero or one metadata elements: comments, title, labels or seeAlso Every resource may have a URI too, whose default namespace has been made public to be changed at will

Author
Victor Rodriguez Doncel at OEG-UPM 2014

Constructor & Destructor Documentation

odrlmodel.MetadataObject.MetadataObject ( )

Builds an empty metadata object

odrlmodel.MetadataObject.MetadataObject ( String  _uri)

Creates an URI with a given URI

Parameters
_uriFull URI of the metadata object. If an empty string is given, it will be considered anonymous

Member Function Documentation

String odrlmodel.MetadataObject.getComment ( )

Gets a comment -supressing the language tag if it exists.

Returns
The comment
String odrlmodel.MetadataObject.getLabel ( String  lan)

Gets the label, after excluding the language tag. If no label is given, gets the local name of the URI rdfs:label is an instance of rdf:Property that may be used to provide a human-readable version of a resource's name.

Parameters
lanLanguage of the label
String odrlmodel.MetadataObject.getSeeAlso ( )

Gets the seeAlso of the object

String odrlmodel.MetadataObject.getTitle ( )

Gets the title

String odrlmodel.MetadataObject.getURI ( )

Gets the object's URI

boolean odrlmodel.MetadataObject.isAnon ( )

Gets if the object is anonymous

Returns
True if the metadata object is anonymous
void odrlmodel.MetadataObject.setComment ( String  _comment)

Sets the comment of the object

void odrlmodel.MetadataObject.setLabel ( String  _label)

Sets the only label of a metadata object

Parameters
_labelLabel (default in English)
void odrlmodel.MetadataObject.setTitle ( String  _title)

Sets the title

Parameters
title
void odrlmodel.MetadataObject.setURI ( String  _uri)

Sets the URI

Parameters
_uriFull URI of the metadata object. If an empty string is given, it will be considered anonymous

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