Skip to content
xmljim edited this page Feb 19, 2015 · 1 revision

All parsers implement the IOdrlParser interface. Currently, the default parsers can be instantiated through the org.w3c.odrl.W3COdrl2.parsers.ParserFactory, which contains methods for instantiating either JSON or XML parsers. Internally parsers are designed to be the orchestration mechanism for loading the native data format into Java representational objects that support these formats, then to interpret them into ODRL.

ODRL Parsing consist of three components

  • A content builder, which is responsible for loading the data into a native document object format, e.g., an XML DOM, or a JSON object representation. All content builders must implement the IOdrlContentBuilder<D> interface
  • A content processor, which uses the loaded native document object created by the content builder to instantiate an ODRL object. Content Processors must implement the IOdrlContentProcessor<V,D> interface.
  • Content processors may have zero or more entity handlers. Entity handlers are responsible for interpreting native document object entities into specific ODRL object elements. Entity handlers must implement the IOdrlEntityHandler<V,E,D> interface

Content Builders, Content Processors and Entity Handlers must be able to work in concert to process a specific data format, like JSON or XML.

Clone this wiki locally