Skip to content

Working with the ODRL Document object

xmljim edited this page Feb 19, 2015 · 1 revision

The org.w3c.odrl.W3COdrl2.model.IOdrlDocument interface represents an instance of an ODRL document. Once a document is instantiated, there are numerous methods for creating and accessing different elements within the ODRL model.

The root "element" of the model is the IOdrlPolicy, which can be accessed via the IOdrlDocument interface's getPolicy() method. Similarly, new policies can be assigned to a document using the setPolicy() method.

There are some rudimentary methods for traversing and "searching" a document including

  • getElementById(XsToken id)
  • getElementByUuid(URIQNameQCode id)
  • getElementsByQName(QName name)
Clone this wiki locally