iso/iec jtc 1/sc 29 n 6173  · web viewiso/iec jtc 1/sc 29 n 6173 subject: iso/iec 21000-10 cd -...

99
INTERNATIONAL ORGANISATION FOR STANDARDISATION ORGANISATION INTERNATIONALE NORMALISATION ISO/IEC JTC 1/SC 29/WG 11 CODING OF MOVING PICTURES AND AUDIO ISO/IEC JTC 1/SC 29/WG 11/N6173 December 2003, Waikoloa, HI, USA Source: Multimedia Description Schemes (MDS) Group Title: ISO/IEC CD 21000-10 – Part 10: Digital Item Processing Status: Approved Editors : Rik Van de Walle, Ian Burnett, Gerrard Drury, Munchurl Kim, and Viswanathan (Vishy) Swaminathan Document type: Document subtype: Document stage: Document language: /home/website/convert/temp/convert_html/5f6919fdfa02f66ce0207fe3/document.doc

Upload: others

Post on 23-Jul-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

INTERNATIONAL ORGANISATION FOR STANDARDISATIONORGANISATION INTERNATIONALE NORMALISATION

ISO/IEC JTC 1/SC 29/WG 11CODING OF MOVING PICTURES AND AUDIO

ISO/IEC JTC 1/SC 29/WG 11/N6173December 2003, Waikoloa, HI, USA

Source: Multimedia Description Schemes (MDS) GroupTitle: ISO/IEC CD 21000-10 – Part 10: Digital Item ProcessingStatus: ApprovedEditors: Rik Van de Walle, Ian Burnett, Gerrard Drury, Munchurl Kim, and

Viswanathan (Vishy) Swaminathan

Document type:   Document subtype:   Document stage:   Document language:   

/tt/file_convert/5f6919fdfa02f66ce0207fe3/document.doc  

Page 2: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

ISO/IEC JTC 1/SC 29 N 6173Date:   2004-01-19

ISO/IEC CD 21000-10

ISO/IEC JTC 1/SC 29/WG 11

Secretariat:   ANSI

Information technology — Multimedia framework (MPEG-21) — Part 10: Digital Item Processing

Technologie De l'Information — Cadre De Multimédia — Partie 10: Traitement D'Élément Digital

Warning

This document is not an ISO International Standard. It is distributed for review and comment. It is subject to change without notice and may not be referred to as an International Standard.

Recipients of this draft are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.

Page 3: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

ISO/IEC CD 21000-10

Copyright notice

This ISO document is a working draft or committee draft and is copyright-protected by ISO. While the reproduction of working drafts or committee drafts in any form for use by participants in the ISO standards development process is permitted without prior permission from ISO, neither this document nor any extract from it may be reproduced, stored or transmitted in any form for any other purpose without prior written permission from ISO.

Requests for permission to reproduce this document for the purpose of selling it should be addressed as shown below or to ISO's member body in the country of the requester:

[Indicate the full address, telephone number, fax number, telex number, and electronic mail address, as appropriate, of the Copyright Manger of the ISO member body responsible for the secretariat of the TC or SC within the framework of which the working document has been prepared.]

Reproduction for sales purposes may be subject to royalty payments or a licensing agreement.

Violators may be prosecuted.

© ISO/IEC 2004 — All rights reserved III

Page 4: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

ISO/IEC CD 21000-10

Contents Page

1 Scope........................................................................................................................................... 11.1 Organization of the document...................................................................................................11.2 Overview of Digital Item Processing.........................................................................................11.2.1 Overview of Digital Item Methods..............................................................................................21.2.2 Overview of Digital Item Method Language and Digital Item Base Operations.....................21.2.3 Relation of Digital Item Processing with other parts of ISO/IEC 21000..................................22 Normative references................................................................................................................. 43 Terms, definitions, symbols, and abbreviated terms...............................................................53.1 Terms and Definitions................................................................................................................53.2 Abbreviations.............................................................................................................................. 64 Conventions................................................................................................................................ 74.1 Documentation conventions......................................................................................................74.2 Schema wrapper.........................................................................................................................74.3 Use of namespace prefixes........................................................................................................85 Digital Item Methods................................................................................................................... 95.1 Introduction................................................................................................................................. 95.2 Digital Item Method overview.....................................................................................................95.3 Digital Item Base Operations...................................................................................................105.3.1 StoreNewDID............................................................................................................................. 115.3.2 StoreDIDAs................................................................................................................................ 125.3.3 StoreDIDOver............................................................................................................................ 135.3.4 LoadDID..................................................................................................................................... 135.3.5 GetDIDLNode............................................................................................................................. 145.3.6 GetDIDLNodeByID..................................................................................................................... 155.3.7 GetDIDLNodeAttribute..............................................................................................................165.3.8 GetDIDLStatementText.............................................................................................................165.3.9 ConfigureChoice....................................................................................................................... 175.3.10 SetSelection.............................................................................................................................. 185.3.11 IsConditionsSatisfied...............................................................................................................195.3.12 PlayResource............................................................................................................................ 205.3.13 Pause......................................................................................................................................... 215.3.14 Stop............................................................................................................................................ 225.3.15 Resume...................................................................................................................................... 225.3.16 Release...................................................................................................................................... 235.3.17 GetObjectArguments................................................................................................................245.3.18 GetExternalArgument...............................................................................................................255.3.19 GetData...................................................................................................................................... 265.3.20 Wait............................................................................................................................................ 275.3.21 Alert............................................................................................................................................ 275.4 Relation of Digital Item Base Operations and RDD verbs (informative)...............................285.5 Digital Item Method Language.................................................................................................285.5.1 Core language........................................................................................................................... 285.5.2 DIML object types..................................................................................................................... 295.5.3 DIML global object properties..................................................................................................375.5.4 Digital Item Base Operations...................................................................................................375.6 Digital Item extension Operations...........................................................................................375.6.1 Introduction............................................................................................................................... 375.6.2 Motivation for having DIxOs....................................................................................................375.6.3 Relationship between DIMs, DIBOs, and DIxOs.....................................................................385.6.4 DIBO Extension Language.......................................................................................................38

IV © ISO/IEC 2004 — All rights reserved

Page 5: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

ISO/IEC CD 21000-10

5.6.5 How are DIxOs executed in an ISO/IEC 21000 terminal ?......................................................385.6.6 The execution environment of DIxOs......................................................................................385.6.7 Some informative example DIxOs...........................................................................................385.7 Digital Item Method linkage with DID......................................................................................395.7.1 Introduction and key concepts................................................................................................395.7.2 Method declaration................................................................................................................... 395.7.3 Method definition...................................................................................................................... 425.7.4 Object Map................................................................................................................................. 436 Bibliography.............................................................................................................................. 45Annex A (Normative) ECMAScript binding for Digital Item Base Operations.................................46Annex B (Normative) Java bindings for Digital Item Base Operations...........................................48B.1 Java data type bindings for DIML object types......................................................................48B.1.1 MpegDIDDocument................................................................................................................... 49B.1.2 MpegDIDNode........................................................................................................................... 49B.1.3 MpegDIPException.................................................................................................................... 50B.1.4 MpegDIPObjectMap.................................................................................................................. 50B.1.5 MpegDIPResourceStatus.........................................................................................................51B.1.6 MpegDIPResourceChangeObject............................................................................................51B.1.7 MpegDIPDIDLChangeObject....................................................................................................52B.2 J-DIBO factory........................................................................................................................... 53B.3 Java interface bindings for DIBOs...........................................................................................54B.3.1 Alert............................................................................................................................................ 54B.3.2 ConfigureChoice....................................................................................................................... 54B.3.3 GetDIDLNode............................................................................................................................. 55B.3.4 GetDIDLNodeAttribute..............................................................................................................55B.3.5 GetDIDLNodeById..................................................................................................................... 55B.3.6 GetDIDLStatementText.............................................................................................................55B.3.7 GetData...................................................................................................................................... 56B.3.8 GetExternalArgument...............................................................................................................56B.3.9 GetObjectArguments................................................................................................................57B.3.10 IsConditonSatisfied.................................................................................................................. 57B.3.11 LoadDID..................................................................................................................................... 57B.3.12 Pause......................................................................................................................................... 57B.3.13 PlayResource............................................................................................................................ 58B.3.14 Resume...................................................................................................................................... 58B.3.15 SetSelection.............................................................................................................................. 58B.3.16 Stop............................................................................................................................................ 59B.3.17 StoreDIDAs................................................................................................................................ 59B.3.18 StoreDIDOver............................................................................................................................ 59B.3.19 StoreNewDID............................................................................................................................. 60B.3.20 Wait............................................................................................................................................ 60Annex C (Normative) Calling MPEG-J based DIxOs from DIMs.......................................................61C.1 Invoking J-DIxOs....................................................................................................................... 61C.2 Including J-DIxOs in a DID.......................................................................................................62C.2.1 Introduction............................................................................................................................... 62C.2.2 J-DIxO item................................................................................................................................ 62C.2.3 J-DIxO declaration.................................................................................................................... 62C.2.4 J-DIxO definition....................................................................................................................... 63C.2.5 J-DIxO Example (informative)..................................................................................................64C.3 J-DIxO Classes.......................................................................................................................... 65Annex D (Informative) MPEG-J based model for execution of DIxOs............................................67Annex E (Informative) Digital Item Method Use Case Scenarios....................................................68E.1 Digital Music Album.................................................................................................................. 68E.1.1 Use Case.................................................................................................................................... 68E.1.2 Scenario 1.................................................................................................................................. 70E.1.3 DIM Implementations.................................................................................................................. 71

© ISO/IEC 2004 — All rights reserved V

Page 6: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

ISO/IEC CD 21000-10

Foreword

ISO (the International Organization for Standardization) and IEC (the International Electrotechnical Commission) form the specialized system for worldwide standardization. National bodies that are members of ISO or IEC participate in the development of International Standards through technical committees established by the respective organization to deal with particular fields of technical activity. ISO and IEC technical committees collaborate in fields of mutual interest. Other international organizations, governmental and non-governmental, in liaison with ISO and IEC, also take part in the work. In the field of information technology, ISO and IEC have established a joint technical committee, ISO/IEC JTC 1.

International Standards are drafted in accordance with the rules given in the ISO/IEC Directives, Part 2.

The main task of the joint technical committee is to prepare International Standards. Draft International Standards adopted by the joint technical committee are circulated to national bodies for voting. Publication as an International Standard requires approval by at least 75 % of the national bodies casting a vote.

Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. ISO and IEC shall not be held responsible for identifying any or all such patent rights.

ISO/IEC 21000-10 was prepared by Joint Technical Committee ISO/IEC JTC 1, Information Technology, Subcommittee SC 29, Coding of Audio, Picture, and Multimedia and Hypermedia Information.

This second/third/... edition cancels and replaces the first/second/... edition (), [clause(s) / subclause(s) / table(s) / figure(s) / annex(es)] of which [has / have] been technically revised.

ISO/IEC 21000 consists of the following parts, under the general title Information technology — Multimedia framework (MPEG-21):

Part 1: Technical Report;

Part 2: Digital Item Declaration;

Part 3: Digital Item Identification;

Part 4: Intellectual Property Management Tool Representation and Communication System;

Part 5: Rights Expression Language;

Part 6: Rights Data Dictionary;

Part 7: Digital Item Adaptation;

Part 8: Reference Software;

Part 9: File Format;

Part 10: Digital Item Processing;

Part 11: Evaluation of Persistent Association Tools;

Part 12: Resource Delivery Test Bed;

Part 13: Scalable Video Coding;

VI © ISO/IEC 2004 — All rights reserved

Page 7: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

ISO/IEC CD 21000-10

Part 14: Conformance.

Note: Other parts may be added when needed

© ISO/IEC 2004 — All rights reserved VII

Page 8: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

ISO/IEC CD 21000-10

Introduction

The multimedia industry is increasing at a rapid pace. For this industry, the term Content is widely used across different segments and applied in many different ways. For this reason the term is deliberately avoided within the context of ISO/IEC 21000 specifications, where it has been replaced by the defined terms Digital Item, media resource and Resource. Of equal importance for the specifications of the multimedia framework is the notation of the User. A User of a system includes all members of the value chain (e.g., creator, rights holders, distributors and consumers of Digital Items). We also have End User, where a User takes the role of consumer, i.e. being at the end of a value or delivery chain (a human consumer, an agent operating on behalf of a human consumer, etc.).

Access devices, with a large set of differing terminal and network capabilities, are making their way into peoples’ lives. Additionally, these access devices are used in different locations and environments: anywhere and at anytime. The Users, however, are currently not given tools to deal efficiently with all the intricacies of this new multimedia usage context.

Solutions with advanced multimedia functionality are becoming increasingly important as individuals are producing more and more digital media, not only for professional use but also for their personal use. All these “resource providers” have many of the same concerns: management, re-purposing based on consumer and device capabilities, protection of rights, protection from unauthorised access/modification, protection of privacy of providers and consumers, etc. For example, it is becoming increasingly difficult to identify and understand the different intellectual property rights that are associated with the elements of multimedia resource. The boundaries between the delivery of audio (music and spoken word), accompanying artwork (graphics), text (lyrics), video (visual) and synthetic spaces will become increasingly blurred. New solutions are required to manage the access and delivery process of these different resource types in an integrated and harmonized way, entirely transparent to the many different users of multimedia services.

The need of these solutions motivates the initiatives of the ISO/IEC 21000 Multimedia Framework, which aims to enable transparent and augmented use of multimedia resources across a wide range of networks and devices.

This tenth part of ISO/IEC 21000 specifies tools for the processing of Digital Items (see ISO/IEC 21000-2).

VIII © ISO/IEC 2004 — All rights reserved

Page 9: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

COMMITTEE DRAFT ISO/IEC CD 21000-10

Information technology — Multimedia framework (MPEG-21) — Part 10: Digital Item Processing

1 Scope

This Part of ISO/IEC 21000, entitled Digital Item Processing (DIP), specifies the syntax and semantics of tools that may be used to process Digital Items specified by ISO/IEC 21000. The tools provide a normative set of tools for specifying processing of a Digital Item in a predefined manner.

1.1 Organization of the document

This technology is described in 1 normative clause and three normative annexes:

Digital Item Methods:

Digital Item Methods (clause 5) describes the set of tools enabling Digital Item Users to include sequences of instructions for adding predefined functionality to a Digital Item. Such a sequence of instructions is a Digital Item Method. Digital Item Methods are authored with the Digital Item Method Language (see 5.5) which includes bindings to Digital Item Base Operations (see 5.3) which are implemented by an MPEG-21 Peer. For complex algorithmic processing, Digital Item extension Operations (see 5.6) allow such processing to be implemented more efficiently in a higher level programming language. Tools for integrating Digital Item Methods in to Digital Item Declarations are also specified (see 5.7).

ECMAScript bindings for Digital Item Base Operations:

Annex A specifies the ECMAScript bindings for the Digital Item Base Operations described in 5.3.

Java bindings for Digital Item Base Operations:

Annex B specifies the Java bindings for the Digital Item Base Operations described in 5.3.

Calling Java based DIxOs from Digital Item Methods:

Annex C specifies the mechanism for calling Java based Digital Item extension Operations. Digital Item extension Operations are described in 5.6.

1.2 Overview of Digital Item Processing

The Digital Item Declaration Language described in ISO/IEC 21000-2 is a static declaration. Digital Item Processing assists processing of a Digital Item by providing tools allowing a User1 to add User specified functionality to a Digital Item Declaration. The standardization of Digital Item Processing allows interoperability at the processing level.

1.2.1 Overview of Digital Item Methods

A key component of Digital Item Processing is the Digital Item Method. A Digital Item Method is the tool whereby a User (author, publisher, distributor, etc.) specifies some desired functionality. As such, Digital Item

1 A User as defined within the ISO/IEC 21000 framework.

© ISO/IEC 2004 — All rights reserved 1

Page 10: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

COMMITTEE DRAFT ISO/IEC CD 21000-10

Methods provide a way for a User to specify a selection of preferred procedures for processing a Digital Item at the level of the Digital Item itself. For example, a Digital Item representing a music album may contain a Digital Item Method to add a new music track to the album. Such a Digital Item Method can be used to ensure that the new music track is added to the Digital Item while maintaining a preferred format for the Digital Item Declaration of such a music album Digital Item (i.e. elements added in the correct place in the Digital Item Declaration structure, correct Descriptors are included, etc.).

Note that Digital Item Methods are not intended to be utilized for implementing the processing of media resources themselves. For example, Digital Item Methods are not intended to be used for implementing transcoding of media resources. Digital Item Methods should be viewed from a User perspective; they are intended to be related to User interaction with a Digital Item. For example, Digital Item Methods could be used to specify a preferred or recommended prescribed sequence of User’ interaction with a Digital Item (through appropriate usage of the REL and IPMP).

On receipt of a Digital Item Declaration at an MPEG-21 Peer that supports DIP, a list of Digital Item Methods that can be applied to the Digital Item can be made available to the User. The User chooses a Method that is then executed by the Digital Item Processing engine.

1.2.2 Overview of Digital Item Method Language and Digital Item Base Operations.

A Digital Item Method is expressed using the Digital Item Method Language which includes a binding for Digital Item Base Operations.

The Digital Item Method Language provides the basic syntax, control flow constructs, etc for authoring a Digital Item Method.

The Digital Item Base Operations (DIBOs) are the functional building blocks utilized by a Digital Item Method. They can be considered somewhat analogous to the standard library of functions of a programming language. Digital Item Methods are defined by the Digital Item Base Operations they use to accomplish the handling of the Digital Item according to the intentions of the Digital Item Method author.

Alternatively the Digital Item Base Operations can be viewed as the vocabulary of the Digital Item Methods.

Digital Item Methods and the Digital Item Base Operations that define them can be considered as requests to the Digital Item Processing engine to process the Digital Item in some manner, or to execute some action.

The syntax and semantics for Digital Item Base Operations are specified by this part of ISO/IEC 21000. However the details of how the semantics of the DIBOs are implemented are left to the implementer. For example, the Play DIBO requests the rendering of a resource, but the implementer of the DIBO is able to render the resource in a manner of their choosing.

1.2.3 Relation of Digital Item Processing with other parts of ISO/IEC 21000

Digital Item Processing is related to ISO/IEC 21000-2 by providing normative tools that enable functionality to be included in a Digital Item as specified by ISO/IEC 21000-2.

Implementation of DIBOs may have requirements or choices of implementation related to other parts of ISO/IEC 21000. For example, DIBO implementations may be required to ensure rights checks (as specified by ISO/IEC 21000-5 and 21000-6) occur. DIBO implementations can choose to make use of information specified by ISO/IEC 21000-7, if appropriate to the DIBO semantics.

Overall processing of a Digital Item should remain largely at the discretion of an application. Digital Items are intended to be used throughout the delivery chain, and thus different applications and different Users will perform different overall processing of a Digital Item. It is thus important that Digital Item Methods are regarded as a ‘menu’ of User interaction possibilities. Digital Item Methods will then be utilized by Users’

© ISO/IEC 2004 — All rights reserved 2

Page 11: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

applications during processing of Digital Items to provide a means to relay the Digital Item Method author’s preferred manner of User interaction with a Digital Item at various junctures in the delivery chain.

© ISO/IEC 2004 — All rights reserved 3

Page 12: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

2 Normative references

The following normative documents contain provisions that, through reference in this text, constitute provisions of this part of ISO/IEC 21000. For dated references, subsequent amendments to, or revisions of, any of these publications do not apply. However, parties to agreements based on this part of ISO/IEC 21000 are encouraged to investigate the possibility of applying the most recent editions of the normative documents indicated below. For undated references, the latest edition of the normative document referred to applies. Members of ISO and IEC maintain registers of currently valid International Standards.

Extensible Markup Language 1.0 (Second Edition), W3C Recommendation, 6 October 2000

XML Schema Part 1: Structures and Part 2: Datatypes, W3C Recommendation, 2 May 2001

Uniform Resource Identifiers (URI): Generic Syntax, IETF RFC 2396, 1998

Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies. IETF RFC 2045, 1996

ISO/IEC IS 21000-2. Information Technology – Multimedia Framework – Digital Item Declaration. 2002

ISO/IEC IS 21000-3. Information Technology – Multimedia Framework – Digital Item Identification. 2002

ISO/IEC FDIS 21000-5. Information Technology – Multimedia Framework – Rights Expression Language. 2003

ISO/IEC FDIS 21000-6. Information Technology – Multimedia Framework – Rights Data Dictionary. 2003

ISO/IEC FDIS 21000-7. Information Technology – Multimedia Framework – Digital Item Adaptation. 2003

ECMA-262. ECMAScript Language Specification, 3rd Edition - December 1999

4 © ISO/IEC 2004 — All rights reserved

Page 13: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

3 Terms, definitions, symbols, and abbreviated terms

3.1 Terms and Definitions

For the purposes of this part of ISO/IEC 21000, the terms and definitions given in the following apply:

3.1.1Digital Itema structured digital object, including a standard representation and identification, and meta-data

NOTE This entity is the fundamental unit of distribution and transaction within the MPEG-21 framework as a whole.

3.1.2Digital Item Base Operationa base operation providing access to functionality implemented by a Peer and used in authoring a Digital Item Method (for further information see clause 5.3)

3.1.3Digital Item Declarationstandard representation for a Digital Item specified by ISO/IEC 21000-2

3.1.4Digital Item Declaration Objecta DID building block specified by ISO/IEC 21000-2

3.1.5Digital Item extension Operationan operation allowing extended complex functionality to be invoked from a Digital Item Method (for further information see clause 5.6)

3.1.6Digital Item Methodsee clause 5

3.1.7Digital Item Method Languagesee clause 5.5.1

3.1.8Object Mapmaps DIDL elements in a Digital Item Declaration to Object Types

EXAMPLE It may map several Item elements to an Object Type of ‘music track’, and another Item element to an Object Type of ‘album information’.

3.1.9Object Typea type for an argument to a Digital Item Method allowing the argument to be processed within the context of the Digital Item Method according to the semantics of the argument type

3.1.10PeerMPEG-21 Peera Peer as defined in the ISO/IEC 21000 framework

NOTE A Peer is a device or application that compliantly processes a Digital Item.

© ISO/IEC 2004 — All rights reserved 5

Page 14: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

3.1.11UserMPEG-21 Usera User of a system as defined in the ISO/IEC 21000 framework

NOTE This includes all members of the value chain (e.g., creator, rights holders, distributors and consumers of Digital Items).

3.2 Abbreviations

For the purposes of this part of ISO/IEC 21000, the abbreviations given in the following apply:

DI: Digital Item

DIA: Digital Item Adaptation [ISO/IEC 21000-7]

DIBO: Digital Item Base Operation

DID: Digital Item Declaration [ISO/IEC 21000-2]

DIDL: Digital Item Declaration Language [ISO/IEC 21000-2]

DII: Digital Item Identification [ISO/IEC 21000-3]

DIM: Digital Item Method

DIML: Digital Item Method Language

DIxO: Digital Item extension Operation

DOM: Document Object Model

IPMP: Intellectual Property Management and Protection

MIME Multipurpose Internet Mail Extensions [IETF RFC 2045]

MPEG: Moving Picture Experts Group

MPEG-4: ISO/IEC 14496

MPEG-21: ISO/IEC 21000

MP3: MPEG1/2 layer 3 (audio coding)

RDD: Rights Data Dictionary [ISO/IEC 21000-6]

REL: Rights Expression Language [ISO/IEC 21000-5]

URI: Uniform Resource Identifier [IETF RFC 2396]

URL: Uniform Resource Locator [IETF RFC 2396]

URN: Uniform Resource Name [IETF RFC 2141]

W3C: World Wide Web Consortium

XML: Extensible Markup Language [W3C Reference]

6 © ISO/IEC 2004 — All rights reserved

Page 15: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

4 Conventions

For the purposes of this part of ISO/IEC 21000, the conventions given in the following apply.

4.1 Documentation conventions

Literal machine-readable character sequences are shown in fixed width font.

Normative syntax for DIP tools specified by XML Schema [2] declarations and definitions are shown in this document using a separate font and background as follows:

<complexType name="ExampleType"><simpleContent>

<extension base="string"/></simpleContent>

</complexType>

XML Schema declarations and definitions as in the above example are to be considered fragments of a complete schema within an XML schema wrapper as described in 4.2.

Normative semantics for XML Schema declarations and definitions are set out in a table as follows.

Semantics of ExampleType:

Name Definition

ExampleType Example type semantics.

Informative notes providing additional information to assist in understanding this document are shown as follows:

NOTE Example of an informative note.

Non-normative examples are shown in this document using a separate font and background as follows:

EXAMPLE<Example attribute1="example attribute value">

<Element1>example element content</Element1></Example>

4.2 Schema wrapper

XML Schema declarations and definitions provided as XML fragments are to be understood as fragments of a complete schema and contained within an XML Schema schema element as follows:

<?xml version="1.0"?><!-- Digital Item Processing ISO/IEC 21000-10 --><schema

targetNamespace="urn:mpeg:mpeg21:2005:01-DIP-NS" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:dip="urn:mpeg:mpeg21:2005:01-DIP-NS" elementFormDefault="qualified" attributeFormDefault="unqualified">

© ISO/IEC 2004 — All rights reserved 7

Page 16: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

</schema>

4.3 Use of namespace prefixes

Qualified Names are written with a namespace prefix followed by a colon followed by the local part of the Qualified Name as shown in the following example.

EXAMPLE dip:ObjectType

For clarity, consistent namespace prefixes as listed below are used in this part of ISO/IEC 21000.

Table 1 — Mapping of prefixes to namespaces

Prefix Namespace

None (default namespace) urn:mpeg:mpeg21:2005:01-DIP-NS

dia urn:mpeg:mpeg21:2003:01-DIA-NS

didl urn:mpeg:mpeg21:2002:02-DIDL-NS

dii urn:mpeg:mpeg21:2002:01-DII-NS

dip urn:mpeg:mpeg21:2005:01-DIP-NS

xsd http://www.w3.org/2001/XMLSchema

xsi http://www.w3.org/2001/XMLSchema-instance

NOTE 1 The prefixes xml and xmlns are normatively defined by [3]. All other prefixes are not normative and are used by convention for consistency in this part of ISO/IEC 21000.

For informative examples provided as XML fragments without namespace declarations, the default namespace by convention in this part of ISO/IEC 21000 is defined as urn:mpeg:mpeg21:2002:02-DIDL-NS and the different prefixes are bound to the namespaces as listed above.

8 © ISO/IEC 2004 — All rights reserved

Page 17: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

5 Digital Item Methods

5.1 Introduction

This clause describes Digital Item Methods and supporting technologies.

5.2 Digital Item Method overview

A Digital Item Method (DIM) is a tool for expressing the intended interaction of a User with a Digital Item (DI) at the level of Digital Item Declaration (DID). The functionality for interacting with a Digital Item is implemented by an MPEG-21 Peer. The DIM provides the DIM author the tool for accessing this functionality. For interoperability, a Peer is expected to provide a base set of functionality. For example it is expected that a Peer implements functionality to ‘play a resource’. This functionality is captured at an abstract level by the verbs defined by ISO/IEC 21000 REL and RDD.

Note that Digital Item Methods are intended for working with parts of a DI at the DID level only; they are not intended for lower level resource processing. As a result, parameters to DIMs are limited to DID elements. The tool for mapping DID elements to DIM objects is described in 5.7.2.1.

Digital Item Methods comprise the following components.

Digital Item Base Operations (DIBOs) – the Digital Item Base Operations specify a high level normative interface to the basic functionality of an MPEG-21 Peer.

Digital Item Method Language (DIML) – the Digital Item Method Language specifies the normative language for defining interoperable DIMs and from which the DIBOs are able to be called. The ECMAScript binding of the DIBOs is a normative part of the DIML.

Digital Item Method linkage with DID – this clause also specifies the normative mechanisms for including of Digital Item Methods in a DID.

Digital Item Method execution – this clause also specifies the execution environment of a DIM.

Digital Item extension Operations (DIxO) – Digital Item extension Operations specify a normative mechanism for enabling more complex functionality in an efficient way.

© ISO/IEC 2004 — All rights reserved 9

Page 18: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

Figure 1 — Digital Item Method components

5.3 Digital Item Base Operations

This clause describes the set of normatively defined Digital Item Base Operations (DIBOs). The DIBOs are the base operations from which a DIM is built by providing the interface between the DIM and the DIBO functionality implemented by the Peer.

A DIBO is described by:

a normatively defined interface

normatively defined semantics

The interface specifies the DIBO name, the parameters to the DIBO, and whether the DIBO returns a value. The semantics of the DIBO specify the functionality of the DIBO, in addition to the semantics of the parameters and the return value, if any.

DIMs are intended for working with parts of a DI at the DID level only. Reflecting this, objects on which a DIBO can operate are limited to objects that map to a DIDL element. The tool for mapping DIDL elements to DIM objects is described in 5.7.2.1. However DIBO parameters may also include parameters bound to a type provided by the Digital Item Method Language described in 5.5.

The set of normatively defined DIBOs have general application across a wide range of resources, applications, etc. They provide access to basic functionality commonly provided by an MPEG-21 Peer. This common basic functionality can typically be characterised by association with an RDD verb. In addition some DIBOs provide access to functionality related to DIMs (and supporting technology described in this document) in general.

Functionality that extends beyond the common basic functionality provided by this normative set of DIBOs can be implemented using the Digital Item extension Operation tool described in clause 5.6 of this document. Application level functionality can be provided by the application software running on the Peer.

10 © ISO/IEC 2004 — All rights reserved

Digital Item Method

DIBO

DIBO

DIBO

DIBO

DIxO

DIxO

DIxO

Multimedia Platform

Page 19: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

While a DIBO has a normative interface and normative semantics, this does not mean that DIBOs shall be implemented in a normative way. The DIBO implementation is left to the implementer of the DIBO for any given Peer. The DIBO implementation can thus be viewed as being the decision of the DIBO implementer as to how they have decided to provide on a given Peer the functionality defined by the DIBO semantics (with the functionality accessed from a DIM via the normative DIBO interface).

This part of ISO/IEC 21000 does not specify any tools at the DID level specifically for retrieving, evaluating and enforcing rights. However, the MPEG-21 Peer must ensure that rights, if present are evaluated and enforced. This rights related functionality is not intended to be implemented within Digital Item Methods (by the DIM author), but instead must be implemented by the MPEG-21 Peer (by the Peer vendor). Hence it is a requirement on the DIBO implementations that they execute according to the rights that are associated with the Digital Item under consideration.

NOTE Errors that occur during execution of a DIBO may generate operational exceptions.

Most of the DIBOs described in this clause fall in to one of the following categories.

Operations that manipulate the DID at the DIDL level. For example, DIBOs that add child nodes, remove child nodes, modify node attributes, etc.

Operations that manipulate the state of a DI (note that at the DID level the DI state is defined by the state of the DIDL CHOICE elements). For example, DIBOs that set the state of a DIDL SELECTION element within a CHOICE element, resolve DIDL CONDITION elements predicated on the state of CHOICE elements, etc.

Operations that are representations of or associated with an RDD verb. For example, DIBOs that apply the Play verb to a resource, the Store verb to a DID, etc.

In addition Digital Item extension Operations, described in 5.6, enable more complex tasks that cannot easily be realized in a DIM by making use of DIBOs in the above categories.

Figure 2 — Operations available to DIMs

The set of normative DIBOs follows.

5.3.1 StoreNewDID

5.3.1.1 Interface

Syntax: StoreNewDID(didlChanges)

Description:: Creates a new empty DID, applies the specified changes, and stores it.

Parameters: didlChanges

© ISO/IEC 2004 — All rights reserved 11

Operations available to DIMs

Digital Item DeclarationManipulation DIBOs

CreateDIDLNodeGetDIDLNodeByID

...

Digital Item Declarationspecific DIBOs

PresentChoiceSetSelection

...

RDD Verb associated

DIBOsPrintPlay

...

DIxOs

TypeText SearchHighlightText

...

Page 20: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

The MpegDIPDIDLChangeObject containing the changes to be applied in the new DID.

Return value: Returns the MpegDIDDocument object representing the new DID.

5.3.1.2 Semantics

This DIBO creates a new empty DID, applies the specified changes, and stores it to a storage location.

The nature of the storage is left as an implementation choice of the DIBO implementer.

The new DID is available to the invoking DIM via the returned MpegDIDDocument object.

5.3.1.3 Example use (informative)

An example where this DIBO is required is at step u)in the scenario described in E.1.2.

5.3.2 StoreDIDAs

5.3.2.1 Interface

Syntax: StoreDIDAs(sourceDID, didlChanges)

Description: Copies the specified source or current DID while applying changes and stores it.

Parameters: sourceDID

The MpegDIDDocument object representing the source DID to be copied. If null, then copy the current DID.

didlChanges

The MpegDIPDIDLChangeObject containing the changes to be applied in the new DID.

Return value: Returns the MpegDIDDocument object representing the DID copy.

5.3.2.2 Semantics

This DIBO creates a copy of the specified source DID while applying changes and stores it.

If no source DID is specified by the sourceDID parameter (its value is null), then the specified source DID to copy is the current DID containing or referencing the DIM from which the DIBO is invoked.

The nature of the storage is left as an implementation choice of the DIBO implementer.

The copy is available to the invoking DIM via the returned MpegDIDDocument object. The copy is a separate independent entity (further operations on either the source DID or the copy do not affect the other).

12 © ISO/IEC 2004 — All rights reserved

Page 21: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

5.3.2.3 Example use (informative)

In some cases, it may be required to generate an annotated copy of the current DID when it is not desired to annotate the original DID instance. For example, a Digital Item representing a test in an educational context may be sent out by the teacher to different students with different Annotations. The DIM that allows this is invoked from the original DID, but a different DID for each test with different Annotations is created by the DIM.

5.3.3 StoreDIDOver

5.3.3.1 Interface

Syntax: StoreDIDOver(sourceDID, didlChanges)

Description: Overwrites the specified source or current DID in storage while applying changes.

Parameters: sourceDID

The MpegDIDDocument object representing the DID to be modified and overwritten. If null, then the current DID is modified and overwritten.

didlChanges

The MpegDIPDIDLChangeObject containing the changes to be applied when modifying the DID.

Return value: None.

5.3.3.2 Semantics

This DIBO overwrites the specified source DID to a storage location while applying changes to it.

If no source DID is specified by the sourceDID parameter (its value is null), then the specified source DID to overwrite is the current DID containing or referencing the DIM from which the DIBO is invoked.

The nature of the storage is left as an implementation choice of the DIBO implementer.

After the call, the source DID or current DID is reloaded with the applied changes.

5.3.3.3 Example use (informative)

An example where this DIBO is required is step x) of the use case scenario described in E.1.2.

5.3.4 LoadDID

5.3.4.1 Interface

Syntax: LoadDID(locationURI)

Description: Loads a DID from the locationURI.

Parameters: locationURI

© ISO/IEC 2004 — All rights reserved 13

Page 22: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

A String that contains a URI identifying the DID to be loaded.

Return value: Returns the MpegDIDDocument object representing the loaded URI.

5.3.4.2 Semantics

This DIBO loads an identified DID.

The locationURI parameter is a URI that identifies the DID to be loaded. If the URI cannot be resolved to a location then an invalid parameter exception is generated.

If no DID is found at the specified location then a null value is returned.

If the entity found at the specified location is not a valid DID then an invalid DID exception is generated.

5.3.4.3 Example use (informative)

An example of where this DIBO is required is when metadata, such as DIA terminal capabilities, is required to be extracted from a DID external to the current DID.

5.3.5 GetDIDLNode

5.3.5.1 Interface

Syntax: GetDIDLNode(docLocation, rootNode)

Description: Retrieves an existing DIDL node from the source DID containing the rootNode.

Parameters: docLocation

A String containing an XPath expression specifying the location of the node to retrieve.

rootNode

If the XPath is relative, this argument is the MpegDIDNode object to be used as the root node of the XPath expression.

Return value: An array of MpegDIDNode objects retrieved by the DIBO. The array may be empty if no MpegDIDNode objects are retrieved by the specified docLocation.

5.3.5.2 Semantics

This DIBO retrieves an existing DIDL element or elements.

The docLocation parameter specifies the location of the DIDL element to be retrieved relative to a root node. The value of the docLocation parameter is an XPath [4] expression. If the XPath expression is an absolute path then the root node is the root node (document element) of the current DID containing or referencing the DIM from which the DIBO is invoked and the rootNode parameter is not used.

14 © ISO/IEC 2004 — All rights reserved

Page 23: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

If the XPath specified by the docLocation parameter is a relative path then the rootNode parameter specifies the root node for evaluating the XPath expression. If no root node is specified by the rootNode parameter the root node is the root node (document element) of the current DID containing or referencing the DIM from which the DIBO is invoked (effectively the XPath is treated as an absolute path for the current DID).

Only DIDL elements are returned in the array (effectively an implicit node test is applied limiting the located nodes to DIDL elements).

The retrieved elements are available to the invoking DIM via the returned array of MpegDIDNode objects. The elements can then be utilised as parameters to other DIBOs. If no elements are located by the XPath expression an empty array is returned.

NOTE Implementations of this DIBO can take advantage of existing libraries, etc that implement an appropriate binding for the DOM specified by W3C.

5.3.5.3 Example use (informative)

An example where this DIBO is required is steps e), j), o), and bb) in the scenario described in E.1.2.

5.3.6 GetDIDLNodeByID

5.3.6.1 Interface

Syntax: GetDIDLNodeByID( sourceDID, id )

Description: Retrieves an existing DIDL node from the current DID that has an attribute of XML schema data type ID and value as given by the id parameter.

Parameters: sourceDID

The MpegDIDDocument object representing the source DID from which the DIDL node is to be retrieved.

id

A String specifying the value of the attribute of XML schema data type ID for the DIDL node to be retrieved. For example for an Item element this would be the value of the id attribute of the Item, whereas for a Choice element it would be the value of the choice_id attribute of the Choice.

Return value: An MpegDIDNode object or null if the node is not found.

5.3.6.2 Semantics

This DIBO retrieves an existing DIDL element by id from the specified DID.

If no source DID is specified by the sourceDID parameter, then the specified source DID is the current DID containing or referencing the DIM from which the DIBO is invoked.

The id parameter specifies the value of the id of the element to be retrieved. In the current XML representation of a DID this is the value of an attribute of XML Schema data type ID of the element to be retrieved.

Only a DIDL element may be returned. If the located node is not a DIDL element then a null value is returned.

© ISO/IEC 2004 — All rights reserved 15

Page 24: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

The retrieved element is available to the invoking DIM via the returned MpegDIDNode object. The element can then be utilised as a parameter to other DIBOs. If no element is located by the XPath expression a null value is returned.

NOTE Implementations of this DIBO can take advantage of existing libraries, etc that implement an appropriate binding for the DOM specified by W3C.

5.3.6.3 Example use (informative)

An example of where this DIBO is required is at step m) in the scenario described in

5.3.7 GetDIDLNodeAttribute

5.3.7.1 Interface

Syntax: GetDIDLNodeAttribute(DIDLNode, attribute)

Description: Retrieves the value of a named attribute of a given node.

Parameters: DIDLNode

An MpegDIDNode object. This is the node to have its attribute value retrieved.

attribute

A String specifying the name of the attribute whose value is to be retrieved.

Return value: A String object. This will be the value of the attribute.

5.3.7.2 Semantics

This DIBO retrieves the value of an attribute of a given node.

The DIDLNode parameter specifies the DIDL element whose attribute value is to be retrieved. It is an error to invoke this DIBO with a null value for the DIDLNode parameter, in which case an invalid parameter exception is generated.

The attribute parameter specifies the name of the attribute whose value is to be retrieved. It is an error to invoke this DIBO specifying an attribute that is not valid for the specified DIDL element according to ISO/IEC 21000-2, in which case an invalid parameter exception is generated.

5.3.7.3 Example use (informative)

An example of when this DIBO is required is when the value of the mimeType attribute of a Resource node is required to allow alternate processing based on the MIME content-type of the resource.

5.3.8 GetDIDLStatementText

5.3.8.1 Interface

Syntax: GetDIDLStatementText(statementNode)

16 © ISO/IEC 2004 — All rights reserved

Page 25: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

Description: Retrieves the text content of a Statement element.

Parameters: statementNode

An MpegDIDNode object that representing the Statement element for which the text contents should be retrieved.

Return value: A String or null. If the Statement element mimeType attribute indicates the Statement contains text data, the String will contain the text of the Statement contents, otherwise null will be returned.

5.3.8.2 Semantics

This DIBO retrieves the text content of a DIDL Statement element.

The statementNode parameter specifies the DIDL Statement element from which the text content is to be retrieved. It is an error to invoke this DIBO if the statementNode parameter does not specify a DIDL Statement element, in which case an invalid parameter exception is generated.

The text content of the specified DIDL statement is available to the invoking DIM via the returned String.

NOTE Implementations of this DIBO can take advantage of existing libraries, etc that implement an appropriate binding for the DOM specified by W3C.

5.3.8.3 Example use (informative)

An example where this DIBO is required is when an author wishes to utilize a Statement to contain data which will be used by the DIM as input data. For example, the request message provided as parameters to some DIBOs could be stored in a Statement.

5.3.9 ConfigureChoice

5.3.9.1 Interface

Syntax: ConfigureChoice(choiceNode)

Description: Presents the User with a choice corresponding to a Choice element in the DID. The User will make a selection from the set of possible Selection child elements of the Choice.

Parameters: choiceNode

A MpegDIDNode object that represents the Choice element to be configured

Return value: Returns an Array containing zero or more MpegDIDNode objects that represent the Selection elements that have been selected.

5.3.9.2 Semantics

This DIBO presents a specified DIDL Choice element to the User for configuration.

© ISO/IEC 2004 — All rights reserved 17

Page 26: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

The choiceNode parameter specifies the DIDL Choice element to be presented to the User for configuration. It is an error to invoke this DIBO if the choiceNode parameter does not specify a Choice element, in which case an invalid parameter exception is generated.

The initially selected Selection elements as presented for configuration are those that are predicated to be true on invocation of the DIBO.

The DIBO allows the User to configure the Choice by selecting and deselecting Selection elements. When a Selection is selected by the User its predicate becomes true, and when it is deselected it becomes false. For Selections not explicitly selected or deselected by the User, their predicate retains the same state as on invocation of the DIBO. For example a Selection whose predicate is undecided on invocation of the DIBO remains undecided if not explicitly selected or deselected by the User.

The selected Selection elements are available to the invoking DIM via the returned array of MpegDIDNode objects. If no Selections are selected an empty array is returned.

NOTE 1 The presentation of the Choice is a DIBO implementation decision. The configuration of the Choice is also then a DIBO implementation decision. For example, a Peer intended for presenting a DI for human consumption may present the choice in a GUI and allow the human consumer to select the Selections. A Peer intended to process a DI without human intervention needs to implement some other mechanism for determining what Selections are to be selected, and the “presentation” may be actually passing on the Choice and to a module that determines the selections.

NOTE 2 The DIP engine must also maintain its own internal state reflecting the state of the Choices and Selections of a DID. See also SetSelection [5.3.10] and IsConditionsSatisfied [5.3.11].

5.3.9.3 Example use (informative)

An example where this DIBO is required is at step m) in the scenario described in E.1.2

5.3.10 SetSelection

5.3.10.1 Interface

Syntax: SetSelection(selectionNode, state)

Description: Sets the state of a given Selection element.

Parameters: selectionNode

An MpegDIDNode object that represents the Selection element whose state is to be set.

state

A String specifying the state to set the Selection element. Valid values are true, false, or unresolved.

Return value: None.

5.3.10.2 Semantics

This DIBO sets the state of a specified DIDL Selection element as maintained by the DIP engine.

The selectionNode parameter specifies the DIDL Selection element whose state is to be set. It is an error to invoke this DIBO if the selectionNode parameter does not specify a Selection element, in which case an invalid parameter exception is generated.

18 © ISO/IEC 2004 — All rights reserved

Page 27: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

The state parameter specifies the value for the state of the Selection. This state is maintained by the DIP engine for subsequent reference in other DIBOs that rely on the configuration state of Selection elements (for example, IsConditionsSatisfied 5.3.11). The valid values for the state parameter correspond to those Selection states described in ISO/IEC 21000-2, which are: true, false, unresolved. It is an error to invoke this DIBO with any other value for the state parameter, in which case an invalid parameter exception is generated.

NOTE The DIP engine must also maintain its own internal state reflecting the state of the Choices and Selections of a DID. See also ConfigureChoice [5.3.9] and IsConditionsSatisfied [5.3.11].

5.3.10.3 Example use (informative)

An example where this DIBO is required is when a DIM utilizes some input data to determine the state of a Selection, then needs to call this DIBO to set the state of the Selection within the DIP engine execution environment.

5.3.11 IsConditionsSatisfied

5.3.11.1 Infer face

Syntax: IsConditionsSatisfied ( node )

Description: Tests whether conditions for a specified DIDL element are satisfied.

Parameters: node

An MpegDIDNode object representing the DIDL element whose mapping is to be added to the Object Map..

Return value: A Boolean value. A true value if the conditions are satisfied or false if one or more conditions are not satisfied.

5.3.11.2 Semantics

This DIBO tests whether the conditions for a specified DIDL element are satisfied.

The node parameter specifies the DIDL element whose condition is to be tested. It is an error to invoke this DIBO without specifying a DIDL element by the node parameter, in which case an invalid parameter exception is generated.

The return value is a Boolean indicating whether the conditions for the specified DIDL element are satisfied.

The conditions for the specified DIDL element are those described by any CONDITION child elements (as specified in ISO/IEC 21000-2) of the specified element. For the conditions of the specified element to be satisfied the rules for resolving CONDITION child elements as specified in ISO/IEC 21000-2 must be evaluated. For example, multiple CONDITION child elements are evaluated in an “or” fashion based on the resolved state of each individual CONDITION.

If the specified DIDL element contains no child CONDITION elements, the conditions for the specified element are considered to be satisfied in context of this DIBO and a true value is returned.

If one or more child CONDITION elements cannot be resolved, a false value is returned. Note that in this case the inability to resolve a CONDITION is interpreted as the condition being not satisfied in context of this DIBO.

© ISO/IEC 2004 — All rights reserved 19

Page 28: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

If the specified DIDL element is a CONDITION element, then the predicates of the CONDITION are evaluated and the resulting value returned. If the CONDITION predicates cannot be resolved, false is returned.

NOTE The DIP engine must also maintain its own internal state reflecting the state of the Choices and Selections of a DID. See also ConfigureChoice [5.3.9] and SetSelection [5.3.10].

5.3.11.3 Example usage (informative)

An example where this DIBO is required is at steps j), p), and u) in the scenario described in E.1.2.

5.3.12 PlayResource

5.3.12.1 Interface

Syntax: PlayResource(resourceNode, changes, async)

Description: Plays the specified media resource and optionally wait for completion of the media resource before returning control to the calling DIM. Optional changes to be applied when playing the resource can be provided.

Parameters: resourceNode

The MpegDIDNode object that represents the DIDL Resource element describing the media resource.

changes

An MpegDIPResourceChangeObject containing changes to be applied to the resource prior to being played (see 5.5.2.6).

async

A Boolean indicating if the resource should be played asynchronously or not. If true then the resource is played asynchronously and the DIBO should return control immediately to the calling DIM after playing of the resource is initiated. If false then the resource is played synchronously and control is not returned to the calling DIM until the resource has completed playing.

Return value: Returns an MpegDIPResourceStatus [5.5.2.5] object to identify the playing resource. This is included so that the resource may be stopped or paused at a later time.

5.3.12.2 Semantics

This DIBO causes the media resource described by the specified resourceNode to be rendered.

The manner of rendering the resource, appropriate to its media type, is left as an implementation choice of the DIBO implementer.

For an asynchronous execution, once rendering of the resource is initiated, the DIBO should return execution control to the invoking DIM.

For synchronous execution, the DIBO should not return execution control to the invoking DIM until the resource is completely rendered.

20 © ISO/IEC 2004 — All rights reserved

Page 29: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

If the changes parameter is not null, it specifies a list of changes that should be applied to the resource prior to rendering. For further information on MpegDIPResourceChangeObject see 5.5.2.6.

NOTE Changes applied may result in an adaptation of the resource being rendered.

The DIBO returns an MpegDIPResourceStatus (see 5.5.2.5) object which provides a handle to the rendered instance of the resource and its status. This handle is used as a parameter to other DIBOs to control the status of the rendered instance of the resource.

For time based media the resource status on successful playing of the resource will be TIMEPLAY. When the media end time is reached, the status will transition to STATICPLAY.

NOTE For a synchronous call to the PlayResource DIBO for time based media, the resource status transition through the TIMEPLAY state is effectively hidden from the invoking DIM.

For non time based media the resource status on successful playing of the resource will be STATICPLAY.

If the resource could not be successfully played the resource status will be RELEASED.

NOTE It is the responsibility of the DIBO implementation to locate the appropriate technology for rendering of the resource and inform the user if this cannot be found. For example the resource could be rendered internally or a mechanism to locate and use some external 'third party' software to render the resource could be provided.

5.3.12.3 Example use (informative)

An example where this DIBO is required is steps f), k), p), and bb) of the use case scenario described in E.1.2

5.3.13 Pause

5.3.13.1 Interface

Syntax: Pause(task)

Description: Pauses the playback of a resource.

Parameters: task

The MpegDIPResourceStatus [5.5.2.5] object that was generated as a return value when playback of the resource began (for example as the result of an asynchronous call to the PlayResource [5.3.5] DIBO).

Return value: None.

5.3.13.2 Semantics

This DIBO causes time based state information of the media resource associated with the specified MpegDIPResourceStatus (see 5.5.2.5) to be paused.

This DIBO is relevant only for resources with time based media with a current status of TIMEPLAY. When paused, the resource status transitions to STATICPLAY.

This DIBO does nothing for resources with any status other than TIMEPLAY.

NOTE When a resource is paused, state information, such as current media time, is preserved. For example, calling Resume for a resource with time based media will resume from the preserved current media time.

© ISO/IEC 2004 — All rights reserved 21

Page 30: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

5.3.13.3 Example use (informative)

In some cases a DIM may play a resource asynchronously, perform some other tasks, and then pause rendering of the resource. Depending on some condition, the rendering of the resource may then be either released or resumed. For example, if a Digital Item represents a music album, a music track could be played asynchronously for 10 seconds then paused. The User can be prompted to indicate if they wish to continue listening to the music track, if yes, rendering is resumed, otherwise the resource is released.

5.3.14 Stop

5.3.14.1 Interface

Syntax: Stop(task)

Description: Stops the playback of a resource.

Parameters: task

The MpegDIPResourceStatus [5.5.2.5] object that was generated as a return value when playback of resource began (for example as the result of a call to the PlayResource [5.3.5] DIBO).

Return value: None.

5.3.14.2 Semantics

This DIBO causes playing of the media resource associated with the specified MpegDIPResourceStatus (see 5.5.2.5) to be stopped.

This DIBO is relevant only for playing resources with a current status of STATICPLAY or TIMEPLAY. When stopped, the resource status transitions to STOPPED.

This DIBO does nothing for resources with any status other than STATICPLAY or TIMEPLAY.

NOTE When a resource is stopped, state information, such as current media time, is preserved. For example, calling Resume for a resource with time based media will resume from preserved current media time.

5.3.14.3 Example use (informative)

5.3.15 Resume

5.3.15.1 Interface

Syntax: Resume(task)

Description: Resume the playback of a resource.

Parameters: task

The MpegDIPResourceStatus object that was generated as a return value when playback of the resource began (for example as the result of an asynchronous call to the PlayResource (5.3.12) DIBO).

22 © ISO/IEC 2004 — All rights reserved

Page 31: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

Return value: None.

5.3.15.2 Semantics

This DIBO causes playing of the media resource associated with the specified MpegDIPResourceStatus (see 5.5.2.5) to be resumed.

If the resource is not currently playing (current status is RELEASED or STOPPED), then playback of the resource commences. If the current status is STOPPED, playback re-commences with the preserved state information. For example for time based media, playback recommences at the current media time. For time based media the status transitions to TIMEPLAY. For non time based media the status transitions to STATICPLAY.

For time based media, if the time based state information is paused (current status is STATICPLAY), then time based state resumes advancing in media time and the status will transition to TIMEPLAY.

For non time based media already playing (current status is STATICPLAY), then this DIBO does nothing.

5.3.15.3 Example use (informative)

In some cases a DIM may play a resource asynchronously, followed by some other action, then pause playing the resource, and after some further action either resumes playing the resource or takes some other action (such as continuing the rest of the execution of the DIM or exiting the DIM). For example, a Digital Item that represents a quiz in a musical education context may contain a DIM to play an audio resource asynchronously, then wait for a short interval, after which playback is paused an a question is asked. If the question is answered correctly the DIM exits, if not the playing of the resource is resumed to provide additional assistance to answer the question.

5.3.16 Release

5.3.16.1 Interface

Syntax: Release(task)

Description: Stop playback of a resource and release related playback state information.

Parameters: task

The MpegDIPResourceStatus object that was generated as a return value when playback of the resource began (for example as the result of an asynchronous call to the PlayResource (5.3.12) DIBO).

Return value: None.

5.3.16.2 Semantics

This DIBO causes playing of the media resource associated with the specified MpegDIPResourceStatus (see 5.5.2.5) to be stopped and any state information to be released.

After calling this DIBO the resource status will transition to RELEASED.

If the current status is already RELEASED, then this DIBO does nothing.

© ISO/IEC 2004 — All rights reserved 23

Page 32: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

5.3.16.3 Example use (informative)

In some cases a DIM may play a resource asynchronously, do some other operations, and then release the resource before exiting. For example, if a Digital Item represents an electronic travel brochure, and an Item contains several resources that contain information about a specific destination, a DIM could be authored that starts rendering some background audio asynchronously, displays synchronously the information resources, then prior to exiting, releases the asynchronously playing audio resource.

5.3.17 GetObjectArguments

5.3.17.1 Interface

Syntax: GetObjectArguments(objectTypes, requestMessages)

Description: Presents the User with one or more selections of Objects of given Object Types. The Objects for each selection are those elements identified in the Object Map contained in the DI to be of the given Object Types (see also 5.5.2.2 and 5.7).

Parameters: objectTypes

An Array of String specifying the Object Type names.

requestMessages

An Array whose elements are either String or null.

Return value: Returns an Array whose elements are either MpegDIDNode object or null. An MpegDIDNode object represents the selected element of the corresponding Object Type as specified in the objectTypes array.

5.3.17.2 Semantics

This DIBO requests the User to select DIDL elements of specified Object Types from the current DID containing or referencing the DIM from which the DIBO is invoked.

The objectTypes parameter is an array of String that specifies the Object Type for each element that the User will be requested to select. The Object Type is an Object Type that is found in the Object Map (see 5.5.2.2 and 5.7) for the current DID.

For each Object Type specified in the objectTypes parameter, the DIBO allows the User to select one element that maps to that Object Type.

The requestMessages parameter is an array of String that contains a request message for each of the element selections indicated by the members of the objectTypes array. The requestMessages parameter is optional, and if null, then no explicit request messages are specified. If the requestMessages parameter is not null, it is an error if the number of members of the requestMessages parameter is not equal to the number of messages in the objectTypes parameter. However one or more of the members of the requestMessages parameter may be null. In this case the DIBO implementation may choose to use the previous non-null member of the requestMessages parameter as the request message.

The selected elements of the specified Object Types are available to the invoking DIM via the returned array of MpegDIDNode objects. These may then be used as parameters to other DIBOs.

NOTE The presentation and selection of the elements is a DIBO implementation decision. For example, a Peer intended for presenting a DI for human interaction may present the element selection in a GUI and allow the human

24 © ISO/IEC 2004 — All rights reserved

Page 33: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

consumer to select the elements. A Peer intended to process a DI without human intervention needs to implement some other mechanism for determining what elements are to be selected.

5.3.17.3 Example use (informative)

An example where this DIBO is required is at steps h) and r) in the scenario described in E.1.2

5.3.18 GetExternalArgument

5.3.18.1 Interface

Syntax: GetExternalArgument(mimeType, requestMessage)

Description: Prompts the User for a resource located external to the DI.

Parameters: mimeType

A String specifying the media format required for this argument.

requestMessage

A String or null. If not null then the String will be used as a prompt message to be displayed to the user.

Return value: Returns a String specifying the URL that describes the location of the resource.

5.3.18.2 Semantics

This DIBO requests the User to select a resource external to the current DID, for example an, audio or video resource.

The mimeType parameter specifies the MIME type of the resource to be selected.

The MIME type value is given in the form type/subtype. The values for the type and subtype of the MIME type should be valid values as specified by RFC 2045; however one or both may also be the wildcard value, *. For example a value of image/jpeg specifies a JPEG image is allowed to be selected. A value of image/* specifies that any image resource is allowed to be selected. A value of */* specifies that any resource is allowed to be selected.

The requestMessage parameter specifies a request message that may be displayed as part of the request to the User to select the resource. The requestMessage parameter is optional and may be null.

The selected resource is identified to the invoking DIM by the URL returned by the DIBO. A null return value indicates that no resource was selected.

NOTE The presentation and selection of the resource is a DIBO implementation decision. For example, a Peer intended for presenting a DI for human interaction may present the resource selection in a GUI and allow the human consumer to select the resource. A Peer intended to process a DI without human intervention needs to implement some other mechanism for determining the resource to be selected.

5.3.18.3 Example use (informative)

An example where this DIBO is required is when a Resource element is created and a DIM needs to set the ref attribute and prompts the user to locate a resource to which the ref attribute will refer.

© ISO/IEC 2004 — All rights reserved 25

Page 34: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

5.3.19 GetData

5.3.19.1 Interface

Syntax: GetData(dataTypes, requestMessages)

Description: Presents the User with a request for input data of one of the primitive data types.

Parameters: dataTypes

An Array of String specifying the data type of each datum.

requestMessages

An Array whose elements are either String or null.

Return value:

Returns an Array whose elements are of type Boolean, String or Number, corresponding to the data type specified in the dataTypes array

5.3.19.2 Semantics

This DIBO requests the User to enter data values of one of the primitive DIML data types.

The dataTypes parameter is an array of String that specifies primitive data type for each data value that the User will be requested to enter. The data type must be one of: Boolean, String, or Number. It is an error to specify an invalid data type, in which case an invalid parameter exception is generated.

For each data type specified in the dataTypes parameter, the DIBO allows the User to enter a data value of that data type. The DIBO implementation should execute some basic validation on the value entered, at least to ensure the value is of the correct data type.

The requestMessages parameter is an array of String that contains a request message for each of the data values indicated by the members of the dataTypes array. The requestMessages parameter is optional, and if null, then no explicit request messages are specified. If the requestMessages parameter is not null, it is an error if the number of members of the requestMessages parameter is not equal to the number of messages in the dataTypes parameter. However one or more of the members of the requestMessages parameter may be null. In this case the DIBO implementation may choose to use the previous non-null member of the requestMessages parameter as the request message.

The entered data values of the specified data types are available to the invoking DIM via the returned array of objects. If no data values were entered then a null is returned by the DIBO.

NOTE The data entry mechanism for the requested data is a DIBO implementation decision. For example, a Peer intended for presenting a DI for human interaction may present a data entry GUI and allow the human consumer to enter the values. A Peer intended to process a DI without human intervention needs to implement some other mechanism for determining the data to be returned by the DIBO.

5.3.19.3 Example use (informative)

An example where this DIBO is required is at step t) in the scenario described in E.1.2.

26 © ISO/IEC 2004 — All rights reserved

Page 35: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

5.3.20 Wait

5.3.20.1 Interface

Syntax: Wait(timeInterval)

Description: Waits for a given length of time.

Parameters: timeInterval

A Number indicating the time in milliseconds for the Wait operation to pause execution of the method.

Return value: None.

5.3.20.2 Semantics

This DIBO causes a pause in execution of the invoking DIM. On invocation of the DBIO, execution control is not returned to the DIM until the specified time interval has elapsed.

The pause applies only to the execution of the invoking DIM.

The DIBO implementer should ensure the actual elapsed interval is as close as possible to the specified time interval, but is not obliged to ensure the exact specified time interval.

5.3.20.3 Example usage (informative)

An example where this DIBO is required is when several resources are played asynchronously, and then the author wants to pause the execution of the DIM for an interval, before stopping one or more of the resources. For example, a Digital Item representing a travel brochure may contain an audio resource, a video resource, and an HTML resource representing a “brochure” of a travel destination. A DIM is authored to play all three resources asynchronously, and then wait for an interval of time, after which the audio and video resources are stopped.

5.3.21 Alert

5.3.21.1 Interface

Syntax: Alert( message, messageType )

Description: Alerts the User with a message.

Parameters: message

A String containing the message to be displayed.

messageType

An integer indicating the generic nature of the message.

Valid values are defined as constants of the DIML global object (see 5.5.3).

Return value: None

© ISO/IEC 2004 — All rights reserved 27

Page 36: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

5.3.21.2 Semantics

This DIBO provides simple textual feedback to the User, for example to notify an error condition.

The textual message is specified by the message parameter.

NOTE The implementation of the alert is a DIBO implementation decision. For example, a Peer intended for presenting a DI for human interaction may present the message in a. A Peer intended to process a DI without human intervention may log the message to a log file.

5.3.21.3 Example use (informative)

An example where this DIBO is required is at step z) in the scenario described in E.1.2.

5.4 Relation of Digital Item Base Operations and RDD verbs (informative)

The following table is a mapping between DIBOs described in 5.3 and Rights Data Dictionary (RDD) verbs (see ISO/IEC 21000-6).

Digital Item Base Operations Rights Data Dictionary verb

StoreDIDNew Adapt, Diminish, Enhance

StoreDIDAs Adapt, Diminish, Enhance

StoreDIDOver Adapt, Diminish, Enhance, Enlarge, Modify, Reduce

PlayResource Play

Those DIBOs not listed in the above table typically would not require any rights checks. For the DIBOs that are listed, it should be understood that 1) the list of rights that might need to be checked for that DIBO is not exhaustive and 2) not all the rights listed need to be checked every time that DIBO is called. For instance, if StoreDIDAs is called with a didlChanges argument directing a component to be removed, it might only be necessary to check either Adapt or Diminish. Checking Enhance in that case would not do any good. However, if the same DIBO were to be called with a didlChanges argument directing a component to be added by copying a component from a second item, it would be necessary to check both Enhance and Adapt. The Enhance check would be to see if the first item can be enhanced. The Adapt check would be to see if the second item can be copied from in order to enhance the first one.

5.5 Digital Item Method Language

The Digital Item Method Language (DIML) provides the syntax and structure for authoring a Digital Item Method utilizing the Digital Item Base Operations.

5.5.1 Core language

The DIML specification normatively includes the ECMAScript Language Specification detailed in ECMA-262 (edition 3) [6]. This provides a standardized core language specification for DIML, including specification of the following features of DIML:

28 © ISO/IEC 2004 — All rights reserved

Page 37: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

Lexical conventions and syntactical structure

Flow control structures (i.e. if/then, while, etc.)

Primitive data types (String, Boolean and Integer)

Composite data types (Objects and arrays)

Standard arithmetic, logical and bitwise operators

Exception handling

Error definitions

Support for Regular Expressions

5.5.2 DIML object types

The DIML specification includes a normative set of DIML specific object types.

The DIML object types are specified by the object properties (including primitive values, other objects, and functions), and attributes of those properties.

5.5.2.1 MpegDIPException

This DIML object is thrown as an exception whenever a runtime error specific to DIP occurs. It has all the properties and methods of the core language Error [ECMA 15.11] object in addition to the properties and methods specified below.

NOTE Other exceptions may also be thrown during execution of a DIM. These include ECMAScript native errors [ECMA 15.11] and exceptions derived from MpegDIPException that are specified in this or other parts of ISO/IEC 21000. For example, a DIML syntax error will generate an ECMAScript native SyntaxError exception.

Constants GENERAL_EXCEPTION

An integer value of 1.

This indicates a general DIP error not covered by any other error code has occurred.

INVALID_DID

An integer value of 2.

This indicates that a valid DID was expected during some processing operation, but no valid DID was found.

EXAMPLE An MpegDIPException returning this value from the getDIPErrorCode() method will be generated if a valid DID is not found at the location specified by the LocationURI parameter of a call to the LoadDID DIBO.

INVALID_PARAM

An integer value of 3.

This indicates a parameter passed to a DIBO or other DIP function is

© ISO/IEC 2004 — All rights reserved 29

Page 38: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

invalid.

EXAMPLE An MpegDIPException returning this value from the getDIPErrorCode() method will be generated if the resourceNode parameter passed in a call to the Play DIBO is not an MpegDIDNode object representing a DIDL Resource element.

INVALID_CHANGE_REQUEST

An integer value of 4.

This indicates that a requested change listed in a change request object (see 5.5.2.6 and 5.5.2.7) is invalid.

EXAMPLE An MpegDIPException returning this value from the getDIPErrorCode() method will be generated if the changes parameter to a call to the StoreDIDAs DIBO contains a request to change a resource that is not a descendant of the sourceDID.

Properties: None

Methods: getDIPErrorCode()

This method returns an integer indicating the specific error that caused the exception represented by this error object to be thrown.

The value returned may be one of the specified values above, or some other value specified by other parts of ISO/IEC 21000.

5.5.2.2 MpegDIPObjectMap

This DIML object represents the DIP Object Map as defined in 5.7. It has the properties and methods specified below.

Constants None

Properties: None.

Methods: getNumberOfTypes()

This method returns an integer and is the number Object Types that are defined in the Object Map [5.7.4].

getTypeName( index )

This method returns a String representing the Object Type name.

The index parameter is an integer that indicates the index of the Object Type in the Object Map.

getNumberOfObjects( typeName )

This method returns an integer and is the number of Objects that are defined in the Object Map [5.7.4] to be of a given Object Type.

30 © ISO/IEC 2004 — All rights reserved

Page 39: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

The typeName parameter is a String that indicates the Object Type name.

getObject( typeName, index )

This method returns an MpegDIDNode object of a given Object Type.

The typeName parameter is a String that indicates the Object Type name.

The index parameter is an integer that indicates the index of the Object in the list of Objects of the given Object Type.

getObjects( typeName )

This method returns an array of MpegDIDNode objects of a given Object Type.

The typeName parameter is a String that indicates the Object Type name.

5.5.2.3 MpegDIDDocument

This DIML object represents a DID instance document. It has the properties and methods specified below.

Constants None

Properties: objectMap

This property is of type MpegDIPObjectMap [5.5.2.2] and is the Object Map [5.7.4] of the DID instance document.

This property has the attributes { DontDelete, ReadOnly }

Methods: None.

5.5.2.4 MpegDIDNode

This object represents a DIDL element node in the DID structure. It has the properties and methods specified below.

Constants None

Properties: None

Methods: getName()

This method returns a string which is the DIDL element tag name of the MpegDIDNode.

5.5.2.5 MpegDIPResourceStatus

This object is returned by some DIBOs related to the Play RDD ActType to enable subsequent operations on the particular instance of the action invoked. It has the properties and methods specified below.

© ISO/IEC 2004 — All rights reserved 31

Page 40: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

Constants RELEASED

An integer value of 0.

This value indicates the associated resource is not currently playing.

NOTE A resource may be in the RELEASED state because an error prevented a request to play the resource from successfully completing, or as a result of an explicit request to release the resource.

A RELEASED resource has no other preserved state information. Playing a RELEASED resource will commence with relevant state information in an initial state.

EXAMPLE For a resource with time based media, playing a RELEASED resource will commence from the media start time.

STOPPED

An integer value of 1.

This value indicates the associated resource is not currently playing.

NOTE A resource is placed in the STOPPED state as a result of an explicit request to stop the playing resource.

State information related to playing the resource is preserved for a STOPPED resource. Playing a STOPPED resource will commence with relevant state information in the preserved state.

EXAMPLE For a resource with time based media, playing a STOPPED resource will commence from the preserved current media time.

STATICPLAY

An integer value of 2.

This value indicates the associated resource is currently playing.

Time based state information related to playing the resource, if relevant, is paused for a STATICPLAY resource.

NOTE For time based media, this status is equivalent to a state typically considered as 'paused'.

TIMEPLAY

An integer value of 3.

This value indicates the associated resource is currently playing.

Time based state information related to playing the resource, if relevant, is

32 © ISO/IEC 2004 — All rights reserved

Page 41: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

advancing for a TIMEPLAY resource.

NOTE Only time based media can have a status of TIMEPLAY.

Properties: None.

Methods: getStatus()

This method returns an integer indicating the status of the resource associated with the MpegDIPResourceStatus object. The returned value is one of the constants specified above for the MpegDIPResourceStatus prototype.

5.5.2.6 MpegDIPResourceChangeObject

This object allows a sequence of resource change requests to be collected. The change object containing the sequence of change requests can then be passed to the relevant DIBOs.

EXAMPLE 1 When the change object is passed to the PlayResource DIBO (see 5.3.5), then it plays the resource changed according to the changes requested in the change object.

EXAMPLE 2 A resource change object can be added to a DIDL node change object using the addApplyResourceChangesChange method of MpegDIPDIDLChangeObject (see 5.5.2.7). A new node representing a version of an existing resource changed according to the resource change object can then be added to another node by requesting such a change using the addAddNewDIDLChildNodeChange and applying it to the other node.

Constants None.

Properties: None.

Methods: addAdaptResourceChange( metadata )

This method adds a request that an adaptation of a specified resource utilising the specified metadata be performed.

The metadata parameter is an MpegDIDNode representing a DIDL Descriptor node containing the metadata to assist in the adaptation. If the metadata parameter is not a DIDL Descriptor node an invalid parameter exception is generated.

NOTE The metadata may be retrieved from the current DID or from another DID, for example a context DI loaded using the loadDID DIBO [5.3.3].

EXAMPLE

function foo( bar ){ var changes = CreateMpegDIPResourceChangeObject(); var metadata = GetDIDLNode( "Item[1]/Component[1]/Descriptor[1]", bar ); var myResource = GetDIDLNode( "Item[1]/Component[1]/Resource[1]", bar ); changes.addAdaptResourceChange( metadata ); PlayResource( myResource, changes, false );}

© ISO/IEC 2004 — All rights reserved 33

Page 42: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

5.5.2.7 MpegDIPDIDLChangeObject

This object allows a sequence of DIDL change requests to be collected. The change object containing the sequence of change requests can then be passed to the relevant DIBOs.

EXAMPLE When the change object is passed to the StoreDIDAs DIBO (see 5.3.2), then it stores the DID as a new DID changed according to the changes requested in the change object.

Constants None.

Properties: None.

Methods: addApplyResourceChangesChange(myResource, resourceChanges)

This method adds a request that the MpegDIDNode myResource be changed according to the MpegDIPResourceChangeObject resourceChanges. If myResource is not a resource node, an invalid parameter exception is generated.

If this MpegDIPDIDLChangeObject is later applied to an MpegDIDNode or MpegDIDDocument that is not an ancestor of myResource, an MpegDIPException is generated for invalid change request.

addApplyDIDLChangesChange(myMpegDIDNode, didlChanges)

This method adds a request that the MpegDIDNode myMpegDIDNode be changed according to the MpegDIPDIDLChangeObject didlChanges.

If this MpegDIPDIDLChangeObject (not didlChanges) is later applied to an MpegDIDNode or MpegDIDDocument that is not an ancestor of myMpegDIDNode, an MpegDIPException is generated for invalid change request.

addAddNewDIDLChildNodeChange(DIDLNodeType, didlChanges, location)

This method adds a request that a new node of type specified by the String DIDLNodeType be added as a child of the MpegDIDNode or MpegDIDDocument to which this MpegDIPDIDLChangeObject is later applied. If not null, the MpegDIPDIDLChangeObject didlChanges is applied to the new node before it is inserted at the location specified by the Number location.

The DIDLNodeType parameter must be a String specifying a valid DIDL element tag name as specified in ISO/IEC 21000-2. Any other values will cause an invalid parameter exception to be generated.

addAddCopyDIDLChildNodeChange(childSource, didlChanges, location, deep)

This method adds a request that a copy of MpegDIDNode childSource be added as a child of the MpegDIDNode or MpegDIDDocument to which this MpegDIPDIDLChangeObject is later applied. The MpegDIPDIDLChangeObject didlChanges is applied when copying the node before it is inserted at the location specified by the Number location. If the Boolean deep is true, the entire descendent node tree structure is copied; otherwise, only the specified source node is copied.

34 © ISO/IEC 2004 — All rights reserved

Page 43: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

NOTE 1 A deep copy is equivalent to recursively copying (including attribute values) the childSource node and each of its descendants, with an identical hierarchical structure. The entire copied fragment is then added at the specified location within the MpegDIDNode or MpegDIDDocument to which this MpegDIPDIDLChangeObject is applied.

NOTE 2 A shallow copy is equivalent to creating a DIDL node of the same type as the childSource node and setting the attributes of the copied node to the same values as for the childSource node. In this case the case the copy will have no child nodes.

addModifyDIDLNodeAttributeChange(attribute, newValue)

This method adds a request that the attribute named by the String attribute be changed to the value given by the String newValue on the MpegDIDNode to which this MpegDIPDIDLChangeObject is later applied.

The attribute parameter must be a String specifying the name of a valid attribute for the MpegDIDNode, according to ISO/IEC 21000-2, to which this MpegDIPDIDLChangeObject is later applied.

If this MpegDIPDIDLChangeObject is later applied to an MpegDIDDocument, an MpegDIPException is generated for invalid change request.

addRemoveDIDLNodeChange(DIDLNode)

This method adds a request that the node specified by the MpegDIDNode DIDLNode be removed from the MpegDIDNode or MpegDIDDocument to which this MpegDIPDIDLChangeObject is later applied.

If this MpegDIPDIDLChangeObject is later applied to an MpegDIDNode or MpegDIDDocument that is not an ancestor of DIDLNode, an MpegDIPException is generated for invalid change request.

addSetDIDLStatementTextChange( text )

This method adds a request that the text specified by the String text parameter be set as the text content of the MpegDIDNode representing a DIDL Statement element to which this MpegDIPDIDLChangeObject is later applied.

If the MpegDIDNode to which this change is applied is not a DIDL Statement node, then an invalid parameter exception is generated.

addAddDIDLNodeToObjectMapChange(objectType)

This method adds a request that an entry be added for the Object Type specified by the String objectType to the MpegDIDNode to which this MpegDIPDIDLChangeObject is later applied. This entry maps the MpegDIDNode to which this change is applied to the specified Object Type. If the MpegDIDNode to which this change is applied cannot be mapped to an Object Type an invalid parameter exception is generated.

NOTE For further information on Object Map see 5.7.4.

If this MpegDIPDIDLChangeObject is later applied to an MpegDIDDocument, an MpegDIPException is generated for invalid

© ISO/IEC 2004 — All rights reserved 35

Page 44: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

change request.

For changes that insert a DIDL node in to a parent node (e.g. addAddNewDIDLChildNodeChange and addAddCopyDIDLChildNodeChange), the location parameter specifies the location within the parent node where the child node is to be added. The parent node is the MpegDIDNode to which this MpegDIPDIDLChangeObject is later applied, or if it is applied to an MpegDIDDocument, the parent node is the root element of the MpegDIDDocument. The value is an integer specifying the index within the child nodes of the parent node at which the new child node should be added. The index for the first child node of a parent node is 0. If an existing child node is already located at the index, the new child node is inserted before the existing child node. A value equal to the number of existing child nodes of the parent node specifies the location one after the last existing child node (effectively appending the new child node to the existing child nodes). A value for the location parameter less than zero or greater than the number of existing child nodes of the parent node, will cause an invalid parameter exception to be generated when the attempt to apply the change is made.

For changes that insert a DIDL node in to a parent node (e.g. addAddNewDIDLChildNodeChange and addAddCopyDIDLChildNodeChange), it is an error to apply such a change if, according to ISO/IEC 21000-2, it is invalid to insert a child DIDL node of the specified DIDL node type at the specified location within the parent node. In this case an invalid parameter exception is generated.

NOTE The DIBO implementation applying such changes is not required (or indeed able to in many cases during constructing a DIDL fragment) to provide full validation while applying the changes. It is only required to validate the parent-child-sibling relationship that will be established after applying the change in terms of: i) the specified child DIDL node is allowed as a child of the specified parent node, and ii) its location within the child nodes of the parent node is valid in relation to the existing child nodes. For example, an Item element cannot be the child of an Anchor, or an Annotation child element of an Item cannot be located before a Choice child of the Item.

EXAMPLE The following function takes two parameters: item1 and item2. Item2 is an item in the global didDocument. Item1 is an item from some other document. The function adapts a resource in item1, adds a descriptor in that component saying "Cool", and embeds the result in item2, saving the global didDocument with the updated item2.

function foo(item1, item2){ var resourceChanges = CreateMpegDIPResourceChangeObject(); var statementChanges = CreateMpegDIPDIDLChangeObject(); var descriptorChanges = CreateMpegDIPDIDLChangeObject(); var componentChanges = CreateMpegDIPDIDLChangeObject(); var item1Changes = CreateMpegDIPDIDLChangeObject(); var item2Changes = CreateMpegDIPDIDLChangeObject(); var didChanges = CreateMpegDIPDIDLChangeObject(); var metadata = GetDIDLNode("Item[1]/Component[1]/Descriptor[1]", item1); var myResource = GetDIDLNode("Item[1]/Component[1]/Resource[1]", item1); var myComponent = GetDIDLNode("Item[1]/Component[1]", item1); resourceChanges.addAdaptResourceChange(metadata); statementChanges.addSetDIDLStatementTextChange("Cool"); descriptorChanges.addAddNewDIDLChildNodeChange("Statement", statementChanges, 0); componentChanges.addAddNewDIDLChildNodeChange("Descriptor", descriptorChanges, 0); item1Changes.addApplyDIDLChangesChange(myComponent, componentChanges); item1Changes.addApplyResourceChangesChange(myResource, resourceChanges); item2Changes.addAddCopyDIDLChildNodeChange(item1, item1Changes, 0); didChanges.addApplyDIDLChangesChange(item2, item2Changes); StoreDIDAs(didDocument, didChanges);}

36 © ISO/IEC 2004 — All rights reserved

Page 45: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

5.5.3 DIML global object properties

The DIML specification includes a normative set of host-defined properties of the global object (see clause 10.1.5 of [6]).

5.5.3.1 didDocument

Property: didDocument

This global property is of type MpegDIDDocument and represents the current DID instance document. This is the DID containing the (reference to the) DIM that is currently executing.

NOTE This is analogous to the global document object specified in client-side JavaScript.

5.5.4 Digital Item Base Operations

The DIML specification includes the normative set of DIBOs specified in clause 5.3.

5.6 Digital Item extension Operations

5.6.1 Introduction

It is conceivable that the Digital Item Methods will have to perform some complex algorithmic function that may not be optimally executed when written in the Digital Item Method Language as a script. To better satisfy such scenarios, there is a mechanism for the DIMs to delegate all the complex functionality to Digital Item extension Operations or DIxOs. The DIxOs are operations like the DIBOs except that these are not normatively defined and instead obtained at the DIP terminal similar to the DIMs. Subclause 5.6.2 gives the motivation for DIxOs while 5.6.3 describes the relationship between DIMs, DIBOs, and DIxOs. Subclause 5.6.5 explains how the DIxOs are executed in the ISO/IEC 21000 terminal while 5.6.4 describes the language used to write the DIxOs. The execution environment required at the ISO/IEC 21000 terminal to execute the DIxOs is described in subclause 5.6.6.

5.6.2 Motivation for having DIxOs

On a number of occasions it is conceivable that a user would like to include Digital Item Methods which are more complicated than the typical simple operations. In such operations the DIMs would delegate the hard or complex processing to the DIBOs. These DIBOs are normatively defined. When it is essential to perform complex operations in the Digital Item Methods and when there is no corresponding normatively defined DIBO available then the user is forced to do complex operations in the DIM using DIML. This may neither be easy or optimal in terms of execution and size. Under such circumstances it is essential that there be a mechanism to delegate complex operations using the Digital Item extensible operations written using the DIBO Extensible Language. Such operations are called DIxOs and DIxOs will be used when such complex processing is:

not normatively defined by ISO

unique to the application space

useful only for this DI

too complex to be done using DIML

© ISO/IEC 2004 — All rights reserved 37

Page 46: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

5.6.3 Relationship between DIMs, DIBOs, and DIxOs

The DIMs call the DIBOs and the DIxOs to delegate complex processing to keep the DIM script simple. DIMs will chose to use DIBOs when they are available and DIxOs when no such DIBO is available.

The invocation method for DIBOs and the DIxOs from DIM are different. The DIBOs have a mapping to DIML and this is used to call the DIBOs from within a DIM. The invocation method for DIxOs is unique to the DIBO Extension Language used to write the DIxOs. The same call is used to invoke all the DIxOs from DIM, where the name and the arguments of the DIxO are all in turn arguments to that invocation call.

DIxOs while implementing the complex processing can call normatively defined DIBOs and other DIxOs. The method of invocation of DIBOs and other DIxOs from any DIxO is direct using the mappings of DIBOs in that particular DIBO extension language.

5.6.4 DIBO Extension Language

The choice of the DIBO Extension Language is up to the user. The execution environment necessary to execute a DIxO and hence the DIM that uses that DIxO needs to be present at the ISO/IEC 21000 Terminal that receives this DIM. One DIBO Extension Language, its invocation procedure, and the execution of environment for that DIBO Extension Language is identified in the following subclauses and annexes B, C, and D.

5.6.5 How are DIxOs executed in an ISO/IEC 21000 terminal ?

As mentioned previously DIxOs can be called from DIMs through a single method call which is unique to that DIBO Extension language. The format of that unique invocation method is runxxxDIxO(xxxDIxOname, xxxDIXLarg1, xxxDIXLarg2,…).

To call a DIxO viz. myDIxO(arg1, arg2, arg3) written in the DIBO Extensions Language viz. MYDIxL an invocation method runMYDIxLDIxO(myDIxo, arg1, arg2, arg3).

The bindings of the identified DIBO Extension Language is specified in annex C.

5.6.6 The execution environment of DIxOs

The Digital Item Processing engine is responsible for the execution of the DIMs. Since the DIMs can invoke DIxOs which are downloaded, the requirements of the execution environment for DIxOs need to be well understood. As the DIBO Extension Language is not uniquely identified and is left as a choice to the user, the execution environment for the chosen DIBO Extension Language needs to exist at the ISO/IEC 21000 Terminal. As mentioned in the previous sections, although multiple DIxO execution environments are possible, one such environment based on the MPEG-J based application engine is described in Annex D when the Java programming language is used for DIxL.

5.6.7 Some informative example DIxOs

5.6.7.1 TypeText

A TypeText DIxO could implement the functionality of displaying text character by character (i.e., one letter at a time). Other possible uses are: fading in and/or fading out; font effects; blinking; colour; etc. In other words, the TypeText DIxO would allow for rather complex text display mechanism, as opposed to the base (text) display mechanisms that are provided by the normatively specified DIBOs.

A possible Java-based interface for such a TypeText DIxO could look like:

EXAMPLE TypeText(TextArea textBox, String text)

38 © ISO/IEC 2004 — All rights reserved

Page 47: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

5.6.7.2 IMGTree

An IMGTree DIxO could implement the functionality of displaying images hierarchically by using a tree component.

A possible Java-based interface for such an IMGTree DIxO could look like:

EXAMPLE IMGTree(String[] ImgPath, int[] StructInfo, String[] ImgExplain)

5.6.7.3 SearchHighlightText

A SearchHighlightText DIxO could implement the functionality of searching for specific words or strings in textual resources, and highlighting the words (or strings) that are found.

5.7 Digital Item Method linkage with DID

This clause specifies how DIMs are incorporated in to a DID.

5.7.1 Introduction and key concepts

A Digital Item Method (DIM) is a method that can be applied to a Digital Item Declaration (DID) represented using the Digital Item Declaration Language (DIDL).

A Digital Item Processing engine is the part of the MPEG-21 Peer that is responsible for supporting Digital Item Processing, including the execution of DIMs.

An Object in a DID is any DIDL element that can be associated with an Object Type.

An Object Type is a type that can be associated with an argument of a DIM and allows the argument to be processed within the context of the DIM according to the semantics of the Object Type. Objects that can be used as arguments to a DIM are those associated with the same Object Types of the DIM arguments.

An Object Map is the mapping of Objects in a DID with their associated Object Type(s).

The method declaration refers to the declaring of the method as being available in association with a particular Digital Item.

The method definition refers to the listing of the DIM operations that define the method. The method definition may be listed in a separate DIM location and referenced from the DID, or it may be embedded inline in the DID. In either case it is the method definition itself that is the resource (in terms of the Digital Item Declaration Model).

The method implementation refers to the manner in which a particular DIP engine chooses to execute the method and DIM operations that define the method.

5.7.2 Method declaration

5.7.2.1 Introduction

A method declaration is contained in a DIDL Component element which must be constructed such that

the Component contains a DIM arguments descriptor represented by a DIP Arguments element contained in a DIDL Descriptor-Statement fragment;

the method definition is referenced or embedded by a Resource child of the Component.

© ISO/IEC 2004 — All rights reserved 39

Page 48: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

NOTE A method declaration can be referenced from an external DID by utilizing a DIDL Reference child element of the Component element.

5.7.2.2 Arguments syntax

<!-- ################################################ --><!-- Definition of Arguments --><!-- ################################################ -->

<element name="Arguments"><complexType>

<sequence><element name="Argument" type="anyURI" minOccurs="0"

maxOccurs="unbounded"/></sequence>

</complexType></element>

5.7.2.3 Arguments Semantics

Semantics of Arguments:

Name Definition

Arguments Content of this element is a sequence of Argument child elements. A DIDL Component representing a method declaration must contain a DIP Arguments element contained in a DIDL Descriptor-Statement. There must be one Argument child element for each argument of the method definition. The sequence of Argument child elements must match the sequence of arguments of the method definition. If the method definition has no arguments, the Arguments element must still be present but will contain an empty sequence (i.e. no Argument child elements).

Argument Content of this element is a URI indicating the Object Type associated with the corresponding argument of the method definition. There must be a one-to-one mapping between the arguments of the method definition and a corresponding Argument element associating an Object Type with the argument. The Argument elements must be listed in the same sequence as the arguments of the method definition.

5.7.2.4 Method declaration examples (informative)

The following example shows several different method declarations. In the example the method declarations are grouped together in a single DIDL Item.

The first method declaration provides an example of an empty Arguments element for a DIM that has no arguments. This method declaration also shows an example of an external reference to the method definition by referencing the location of the method definition using the ref attribute of the DIDL Resource element. In addition, a second DIDL Resource element referencing an equivalent method definition at an alternate location is provided.

The second method declaration provides an example of an Arguments element for a DIM that has two arguments. In this second method declaration, the method definition is embedded inline in the DIDL

40 © ISO/IEC 2004 — All rights reserved

Page 49: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

Resource element (complete method definition not included for this example). This second declaration also shows the use of a DIDL Condition element for conditional availability of this method declaration.

Both method declarations also show an example of including a plain text DIDL Descriptor-Statement for containing a short human readable description of each DIM.

A third method declaration shows an example of using the DIDL Reference element to reference a method declaration contained in an external document.

EXAMPLE .

…<Item id="DIMs">

<Descriptor><Statement mimeType="text/plain">Method Declarations</Statement>

</Descriptor><Component id="dim_01">

<Descriptor><Statement mimeType="text/plain">Description of DIM 1</Statement>

</Descriptor><Descriptor>

<Statement mimeType="text/xml"><dip:Arguments/>

</Statement></Descriptor><Resource mimeType="application/DIM"

ref="http://www.somewhere.near/DIM#dim_01"/><Resource mimeType="application/DIM"

ref="http://www.somewhere.far/DIM#dim_01"/></Component><Component id="dim_02">

<Condition require="selection1"/><Descriptor>

<Statement mimeType="text/plain">Description of DIM 2</Statement></Descriptor><Descriptor>

<Statement mimeType="text/xml"><dip:Arguments>

<dip:Argument>urn:foo:type1</dip:Argument><dip:Argument>urn:foo:type2</dip:Argument>

</dip:Arguments></Statement>

</Descriptor><Resource mimeType="application/DIM"><![CDATA[

function dim_02( arg1, arg2 ){

/* rest of method definition goes here */}

]]></Resource></Component><Component>

<Reference target="otherDI.xml#dim_03"/></Component>

</Item>…

© ISO/IEC 2004 — All rights reserved 41

Page 50: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

5.7.3 Method definition

5.7.3.1 Introduction

A method definition is embedded in or referenced from a DIDL Resource element. Such a Resource element must be contained in a method declaration as specified in 5.7.2.

The method definition itself is the sequence of operations authored using the DIML as specified in 5.5. This includes calling DIBOs, as specified in 5.3, to access the functionality of the MPEG-21 Peer provided by the Peers implementation of the DIBO semantics.

5.7.3.2 Embedded

A method definition is embedded inline in a DID as character data contained within a DIDL Resource element of a method declaration.

EXAMPLE

…<Component id="dim_04">

<Descriptor><Statement mimeType="text/xml">

<dip:Arguments/></Statement>

</Descriptor><Resource mimeType="application/DIM"><![CDATA[

function dim_04(){

/* rest of method definition goes here */}

]]></Resource></Component>…

5.7.3.3 Referenced

A method definition is referenced from a DIDL Resource element by utilizing the ref attribute of the Resource element. Referencing the method definition from the Resource element allows the method definition to be located in a separate location from the DID (for example in a separate file).

EXAMPLE

…<Component id="dim_05">

<Descriptor><Statement mimeType="text/xml">

<dip:Arguments><dip:Argument>urn:foo:bar</dip:Argument>

</dip:Arguments></Statement>

</Descriptor><Resource mimeType="application/DIM" ref="foop://some.where/dims/05"/>

</Component>…

NOTE A file containing a method definition may contain more than one method definition provided that a URI can uniquely identify the required method definition.

42 © ISO/IEC 2004 — All rights reserved

Page 51: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

5.7.4 Object Map

5.7.4.1 Introduction

An Object in a DID is associated with an Object Type using an Object Type descriptor. An Object Type descriptor is represented by a DIP ObjectType element contained in a DIDL Descriptor-Statement fragment. Any DIDL element that may contain a Descriptor can be associated with an Object Type. A single Object can be associated with zero or more Object Types. An Object Type descriptor is required for each Object Type associated with the Object.

The Object Map of a DID consists of all Object to Object Type associations in the DID.

An Object Type is associated with an argument of a method definition by a DIM arguments descriptor of the method declaration [5.7.2]. An argument of a DIM can be associated with only a single Object Type.

Thus the Object Map provides the link between the arguments of a DIM associated with a given Object Type, and the actual Objects in the DID that are associated with the same Object Type. An Object can be utilized as an argument to a DIM only if the Object is associated with the same Object Type as the argument.

EXAMPLE In a DI representing a digital music album, one or more Item elements in the DID can be mapped to a 'music track' Object Type. A 'play track' DIM that plays a track of the music album can be authored that accepts an argument of Object Type 'music track'. Any Item element assigned the Object Type 'music track' can be utilized as an argument to the 'play track' DIM.

5.7.4.2 ObjectType syntax

<!-- ################################################ --><!-- Definition of ObjectType --><!-- ################################################ -->

<element name="ObjectType" type="anyURI"/>

5.7.4.3 ObjectType Semantics

Semantics of ObjectType:

Name Definition

ObjectType Content of this element is a URI indicating the Object Type associated with the parent DIDL element of the DIDL Descriptor containing the DIP ObjectType element.

5.7.4.4 ObjectType examples (informative)

The following example shows the use of ObjectType to associate several different DIDL elements with one or more Object Types.

EXAMPLE

…<Item id="track1">

<Descriptor><Statement mimeType="text/xml">

<dip:ObjectType>urn:foo:MusicTrack</dip:ObjectType>

© ISO/IEC 2004 — All rights reserved 43

Page 52: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

</Statement></Descriptor><Component id="track1audio_192k">

<Condition require="audiobitrate_192k"/><Descriptor>

<Statement mimeType="text/xml"><dip:ObjectType>urn:foo:Audio urn:foo:Audio192k

urn:foo:AudioMP3</dip:ObjectType></Statement>

</Descriptor><Resource mimeType="audio/mpeg" ref="mysong192kbps.mp3"/>

</Component><Component id="track1audio_64k">

<Condition require="audiobitrate_64k"/><Descriptor>

<Statement mimeType="text/xml"><dip:ObjectType>urn:foo:Audio urn:foo:Audio64k

urn:foo:AudioMP3</dip:ObjectType></Statement>

</Descriptor><Resource mimeType="audio/mpeg" ref="mysong64kbps.mp3"/>

</Component><Component id="track1score">

<Descriptor><Statement mimeType="text/xml">

<dip:ObjectType>urn:foo:MusicScore</dip:ObjectType></Statement>

</Descriptor><Resource mimeType="application/pdf" ref="mysongScore.pdf"/>

</Component></Item>…

44 © ISO/IEC 2004 — All rights reserved

Page 53: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

6 Bibliography

[1] Extensible Markup Language 1.0 (Second Edition), W3C Recommendation, 6 October 2000, http://www.w3.org/TR/2000/REC-xml-20001006

[2] XML Schema Part 1: Structures and Part 2: Datatypes, W3C Recommendation, 2 May 2001, http://www.w3.org/TR/2001/REC-xmlschema-1-20010502, http://www.w3.org/TR/2001/REC-xmlschema-2-20010502

[3] Namespaces in XML, W3C Recommendation 14 January 1999, Available at http://www.w3.org/TR/REC-xml-names/

[4] XML Path Language (XPath), Version 1.0, http://www.w3.org/TR/xpath, November 16 1999.

[5] XML Pointer Language (XPointer) Version 1.0, W3C Last Call Working Draft, 8 January 2001 http://www.w3.org/TR/2001/WD-xptr-20010108

[6] ECMAScript Language Specification, ECMA-262, 3rd Ed., ECMA General Assembly, December 1999.

[7] ECMAScript Compact Profile, ECMA-327, 3rd Ed., ECMA General Assembly, June 2001

[8] Document Object Model (DOM) Level 2 Core Specification, Version 1.0, http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113, November 13 2000.

© ISO/IEC 2004 — All rights reserved 45

Page 54: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

Annex A(Normative)

ECMAScript binding for Digital Item Base Operations

ECMAScript [7] is the basis if the DIML (see 5.5). Since the syntax for the DIBOs specified in 5.3 is provided conformant to DIML, the ECMAScript bindings for each DIBO is as specified by the Syntax for each DIBO. For convenience, a list of DIBOs showing the specified syntax follows.

Table 2 —List of ECMAScript bindings for DIBOs

DIBO Subclause

Alert( message, messageType ) 5.3.21

ConfigureChoice(choiceNode) 5.3.9

GetData(dataTypes, requestMessages) 5.3.19

GetDIDLNode(docLocation, rootNode) 5.3.5

GetDIDLNodeAttribute(DIDLNode, attribute) 5.3.7

GetDIDLNodeByID( sourceDID, id ) 5.3.6

GetDIDLStatementText(statementNode) 5.3.8

GetExternalArgument(mimeType, requestMessage) 5.3.18

GetObjectArguments(objectTypes, requestMessages)

IsConditionsSatisfied ( node ) 5.3.11

LoadDID(locationURI) 5.3.4

Pause(task) 5.3.13

PlayResource(resourceNode, changes, async) 5.3.12

Resume(task) 5.3.15

SetSelection(selectionNode, state) 5.3.10

Stop(task) 5.3.14

StoreDIDAs(sourceDID, didlChanges) 5.3.2

StoreDIDOver(sourceDID, didlChanges) 5.3.3

StoreNewDID(didlChanges) 5.3.1

Wait(timeInterval) 5.3.20

46 © ISO/IEC 2004 — All rights reserved

Page 55: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

In addition, a list of DIML objects and their methods follows (for constants and value properties refer to the relevant subclause).

Table 3 —List of ECMAScript bindings for methods of DIML objects

DIML object type Methods Subclause

MpegDIPException getDIPErrorCode() 5.5.2.1

MpegDIPObjectMap getNumberOfTypes() 5.5.2.2

getTypeName( index )

getNumberOfObjects( typeName )

getObject( typeName, index )

getObjects( typeName )

MpegDIDDocument None. 5.5.2.3

MpegDIDNode getName() 5.5.2.4

MpegDIPResourceStatus getStatus() 5.5.2.5

MpegDIPResourceChangeObject addAdaptResourceChange( metadata ) 5.5.2.6

MpegDIPDIDLChangeObject addApplyResourceChangesChange(myResource, resourceChanges)

5.5.2.7

addApplyDIDLChangesChange(myMpegDIDNode, didlChanges)

addAddNewDIDLChildNodeChange(DIDLNodeType, didlChanges, location)

addAddCopyDIDLChildNodeChange(childSource, didlChanges, location, deep)

addModifyDIDLNodeAttributeChange(attribute, newValue)

addRemoveDIDLNodeChange(DIDLNode)

addAddDIDLNodeToObjectMapChange(objectType)

© ISO/IEC 2004 — All rights reserved 47

Page 56: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

Annex B(Normative)

Java bindings for Digital Item Base Operations

Java bindings for DIBOs are specified so that Java based DIxOs (J-DIxOs) can invoke DIBOs directly from Java for optimal performance.

Each DIBO is bound to a Java interface with the same name in the package org.iso.mpeg.mpeg21.mpegj.dibo.

Each interface defines a method as the designated J-DIBO method. The arguments to this designated method are Java types corresponding to the DIML object types of the arguments of the bound DIBO. Refer to for the mapping from DIML object types to Java types.

If the bound DIBO as specified in clause 5.3 throws the MpegDIPException exception, the corresponding J-DIBO throws the Java exception org.iso.mpeg.mpeg21.mpegj.dibo.MpegDIPException.

MPEG-21 Peers that support J-DIxOs must provide an implementation for each of the Java bindings for DIBOs.

EXAMPLE The following is the J-DIBO defined for the GetDIDLNode DIBO.

package org.iso.mpeg.mpeg21.mpegj.dibo;

import org.w3c.dom.*;

/** * Java Binding interface for the GetDIDLNode DIBO */public interface GetDIDLNode {

/** * * @param docLocation * @param rootNode * @return node retrieved. */public MpegDIDNode getDIDLNode(String docLoctation, MpegDIDNode rootNode) throws

MpegDIPException;}

B.1 Java data type bindings for DIML object types

This clause specifies the Java data type bindings for the corresponding DIML object types specified in clause 5.5.2 (and including ECMAScript object types).

Table 4 — Mapping of DIML object types to Java data types

DIML object type Java data type

MpegDIDDocument org.iso.mpeg.mpeg21.mpegj.dibo.MpegDIDDocument

48 © ISO/IEC 2004 — All rights reserved

Page 57: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

DIML object type Java data type

MpegDIDNode org.iso.mpeg.mpeg21.mpegj.dibo.MpegDIDNode

MpegDIPException org.iso.mpeg.mpeg21.mpegj.dibo.MpegDIPException

MpegDIPObjectMap org.iso.mpeg.mpeg21.mpegj.dibo.MpegDIPObjectMap

MpegDIPResourceStatus org.iso.mpeg.mpeg21.mpegj.dibo.MpegDIPResourceStatus

MpegDIPResourceChangeObject org.iso.mpeg.mpeg21.mpegj.dibo.MpegDIPResourceChangeObject

MpegDIPDIDLChangeObject org.iso.mpeg.mpeg21.mpegj.dibo.MpegDIPDIDLChangeObject

String java.lang.String

Number Appropriate Java primitive data type (int, long, float, double, etc.) as per context.

Boolean boolean (Java basic datatype)

Array An array [] of the corresponding Java data type.

B.1.1 MpegDIDDocument

package org.iso.mpeg.mpeg21.mpegj.dibo;

import org.w3c.dom.*;

/** * Java abstract class for the MpegDIDDocument DIML Object type. */public abstract class MpegDIDDocument {hwe

/** * Reflects the Object Map of the DID instance. */public MpegDIPObjectMap objectMap;

}

B.1.2 MpegDIDNode

package org.iso.mpeg.mpeg21.mpegj.dibo;

import org.w3c.dom.*;

/** * Java abstract class for the MpegDIDNode DIML Object type. */public abstract class MpegDIDNode {hwe

/** * @return String equal to the DIDL element tag name of the DID node. */public String getName();

}

© ISO/IEC 2004 — All rights reserved 49

Page 58: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

B.1.3 MpegDIPException

package org.iso.mpeg.mpeg21.mpegj.dibo;

/** * Java abstract class for the MpegDIPException. Can be used as base class * for DIxO based exceptions. * */public class MpegDIPException extends Exception {

/** * General DIP error not covered by other defined error codes. */public static final int GENERAL_EXCEPTION = 1;

/** * No valid DID was found when one was expected during a processing operation. */public static final int INVALID_DID = 2;

/** * A parameter passed to a DIBO or other DIP function is invalid. */public static final int INVALID_PARAM = 3;

/** * A requested change listed in a change request object is invalid. */public static final int INVALID_CHANGE_REQUEST = 4;

/** * Protected member variable to record error codes. */protected int code;

public MpegDIPException(int code, String mesg) {super(mesg);errorCode = code;

}

public MpegDIPException(int code, String mesg, Throwable cause) {super(mesg, cause);errorCode = code;

}

public int getDIPErrorCode() {return errorCode;

}}

B.1.4 MpegDIPObjectMap

package org.iso.mpeg.mpeg21.mpegj.dibo;

import org.w3c.dom.*;

/** * Java interface for the MpegDIPObjectMap DIML Object Type */public interface MpegDIPObjectMap {

public Integer getNumberOfTypes();

public String getTypeName(int index);

50 © ISO/IEC 2004 — All rights reserved

Page 59: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

public Integer getNumberOfObjects();

public MpegDIDNode getObject(String typeName, int index);

public MpegDIDNode[] getObjects(String typeName);}

B.1.5 MpegDIPResourceStatus

package org.iso.mpeg.mpeg21.mpegj.dibo;

/** * Java abstract class for the MpegDIPResourceStatus DIML Object Type. */public interface MpegDIPResourceStatus {

/** * The resource has not been rendered, typically because a request to render * the resource has never been executed or some error prevented a request * to render the resource from successfully completing. */public static final int RELEASED = 0;

/** * The resource is not currently being rendered and rendering state information * is not preserved. */public static final int STOPPED = 1;

/** * The resource is currently being rendered. For time based media, media time is not advancing, but rendering state information (including current media timeis preserved. */public static final int STATICPLAY = 2;

/** * The resource is currently being rendered and for time based media, media timeis advancing. */public static final int TIMEPLAY = 3;

/** * * @return int indicating the current status of a rendered instance of a resource

associated with this MpegDIPResourceStatus object. */public int getStatus();

}

B.1.6 MpegDIPResourceChangeObject

package org.iso.mpeg.mpeg21.mpegj.dibo;

import org.w3c.dom.*;

/** * Java abstract class for the MpegDIPResourceChangeObject DIML Object type. */public abstract class MpegDIPResourceChangeObject {

© ISO/IEC 2004 — All rights reserved 51

Page 60: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

/** * Add a request that an adaptation of a specified resource utilizing * the specified metadata be performed. * @param metadata MpedDIDNode representing a DIDL Descriptor containing metadata to

assist with the adaptation. * @throws MpegDIPException if metadata is not a DIDL Descriptor */public void addAdaptResourceChange( MpegDIDNode metadata ) throws MpegDIPException;

}

B.1.7 MpegDIPDIDLChangeObject

package org.iso.mpeg.mpeg21.mpegj.dibo;

import org.w3c.dom.*;

/** * Java abstract class for the MpegDIPDIDLChangeObject DIML Object type. */public abstract class MpegDIPDIDLChangeObject {

/** * Add a request that a resource node be changed according to a sequence resource changes. @param myResource MpedDIDNode representing a DIDL Resource to be changed. @param resourceChanges MpegDIPResourceChangeObject containing sequence of change

requests to be applied to myResource @throws MpegDIPException if myResource is not a DIDL Resource */public void addApplyResourceChangesChange( MpegDIDNode myResource,

MpegDIPResourceChangeObject resourceChanges ) throws MpegDIPException;

/** * Add a request that a DIDL node be changed according to a sequence * DIDL node changes. * @param myMpegDIDNode MpedDIDNode representing a DIDL node to be changed. * @param didlChanges MpegDIPDIDLChangeObject containing sequence of change requests to

be applied to myMpegDIDNode */public void addApplyDIDLChangesChange( MpegDIDNode myMpegDIDNode,

MpegDIPDIDLChangeObject didlChanges ) throws MpegDIPException;

/** * Add a request that a new node of type specified by DIDLNodeType be added as * a child of the MpegDIDNode or MpegDIDDocument to which this MpegDIPDIDLChangeObject * is later applied. If not null, the didlChanges is applied to the new node * before it is inserted at the location specified. * @param DIDLNodeType String equal to the DIDL element tag name of new node to be

added. * @param didlChanges MpegDIPDIDLChangeObject containing sequence of change requests to

be applied to new node (may be null for no changes) * @param location int specifying location within the parent node where child node is

to be added. Location of first child node is 0. The added node is inserted before any current node at that location. A location equal to current number of child nodes appends the added node to end of current child nodes.

* @throws MpegDIPException if location is less than zero or greater than the number of existing child nodes

*/public void addAddNewDIDLChildNodeChange( String DIDLNodeType, MpegDIPDIDLChangeObject

didlChanges, int location ) throws MpegDIPException;

/** * Add a request that a copy of the specified by DIDL node be added as

52 © ISO/IEC 2004 — All rights reserved

Page 61: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

* a child of the MpegDIDNode or MpegDIDDocument to which this MpegDIPDIDLChangeObject * is later applied. If not null, the didlChanges is applied to the new node * before it is inserted at the location specified. * @param childSource MpegDIDNode to be copied * @param didlChanges MpegDIPDIDLChangeObject containing sequence of change requests to

be applied to copied node (may be null for no changes) * @param location int specifying location within the parent node where child node is

to be added. Location of first child node is 0. The added node is inserted before any current node at that location. A location equal to current number of child nodes appends the added node to end of current child nodes.

* @param deep boolean whether a deep (recursive copy of node and descendants) or shallow (copy node only) should be applied

* @throws MpegDIPException if location is less than zero or greater than the number of existing child nodes

*/public void addAddCopyDIDLChildNodeChange( MpegDIDNode childSource,

MpegDIPDIDLChangeObject didlChanges, int location, Boolean deep ) throws MpegDIPException;

/** * Add a request that the specified attribute be changed to the specified value on * the MpegDIDNode to which this MpegDIPDIDLChangeObject is later applied. * @param attribute String equal to the name of the attribute to be modified * @param didlChanges MpegDIPDIDLChangeObject containing sequence of change requests to

be applied to copied node (may be null for no changes) */public void addModifyDIDLNodeAttributeChange( String attribute, String value ) throws

MpegDIPException;

/** * Add a request that the specified DIDL node be removed from the MpegDIDNode * to which this MpegDIPDIDLChangeObject is later applied. * @param DIDLNode MpegDIDNode to be removed */public void addRemoveDIDLNodeChange( MpegDIDNode DIDLNode ) throws MpegDIPException;

/** * Add a request that the specified text be set as the text content of a DIDL * Statement node represented by an MpegDIDNode to which this * MpegDIPDIDLChangeObject is later applied. * @param text String containing the text content */public void addSetDIDLStatementTextChange( String text ) throws MpegDIPException;

/** * Add a request that an entry be added for the specified Object Type to the * MpegDIDNode to which this MpegDIPDIDLChangeObject is later applied. This * Entry maps the MpegDIDNode to which this change is applied to the specified * Object Type. * @param objectType String equal to the name of the Object Type */public void addAddDIDLNodeToObjectMapChange( String objectType ) throws

MpegDIPException;}

B.2 J-DIBO factory

This clause specifies the Java interface for the J-DIBO factory. An MPEG-21 Peer implementing J-DIBOs must provide an implementation of JDIBOFactory.

package org.iso.mpeg.mpeg21.mpegj.dibo;

/** * JDIBOFactory is used to create new J-DIBO classes.

© ISO/IEC 2004 — All rights reserved 53

Page 62: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

* */public interface JDIBOFactory {

/** * This method must be overridden by the J-DIBO implementation provider. * Essentially it returns the an implementation for the Java-DIBO interfaces. * @param diboName * @return * @throws MpegDIPException if any errors occur. */public Object getJDIBO(String diboName) throws MpegDIPException;

}

B.3 Java interface bindings for DIBOs

This clause specifies the Java interface bindings for the corresponding DIBOs as specified in clause 5.3.

Note that a Java binding is specified for every DIBO except the RunJDIxO DIBO.

B.3.1 Alert

package org.iso.mpeg.mpeg21.mpegj.dibo;

/** * Java Binding for the Alert DIBO */public interface Alert {

/** * * @param message * @param messageType */public void alert(String message, int messageType);

}

B.3.2 ConfigureChoice

package org.iso.mpeg.mpeg21.mpegj.dibo;

import org.w3c.dom.*;

/** * Java Binding interface for the ConfigureChoice DIBO */public interface ConfigureChoice {

/** * * @param choiceNode * @return array of MpegDIDNode objects. */public MpegDIDNode[]configureChoice(MpegDIDNode choiceNode) throws MpegDIPException;

}

54 © ISO/IEC 2004 — All rights reserved

Page 63: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

B.3.3 GetDIDLNode

package org.iso.mpeg.mpeg21.mpegj.dibo;

import org.w3c.dom.*;

/** * Java Binding interface for the GetDIDLNode DIBO */public interface GetDIDLNode {

/** * * @param docLocation * @param rootNode * @return */public MpegDIDNode getDIDLNode(String docLocation, MpegDIDNode rootNode);

}

B.3.4 GetDIDLNodeAttribute

package org.iso.mpeg.mpeg21.mpegj.dibo;

/** * Java Binding interface for the GetDIDLNodeAttribute DIBO */public interface GetDIDLNodeAttribute {

/** * @param DIDLNode * @param attribute */public void getDIDLNodeAttribute(MpegDIDNode DIDLNode, String attibute);

}

B.3.5 GetDIDLNodeById

package org.iso.mpeg.mpeg21.mpegj.dibo;

import org.w3c.dom.*;

/** * Java Binding interface for the GetDIDLNodeById DIBO */public interface GetDIDLNodeById {

/** * * @param id * @return node */public MpegDIDNode getDIDLNodeById(String id);

}

B.3.6 GetDIDLStatementText

package org.iso.mpeg.mpeg21.mpegj.dibo;

© ISO/IEC 2004 — All rights reserved 55

Page 64: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

import org.w3c.dom.*;

/** * Java Binding interface for the GetDIDLStatementText DIBO */public interface GetDIDLStatementText {

/** * * @param statementNode * @return */public String getDIDLStatementText(MpegDIDNode statementNode)

throws MpegDIPException;}

B.3.7 GetData

package org.iso.mpeg.mpeg21.mpegj.dibo;

/** * Java Binding interface for the GetData DIBO */public interface GetData {

/** * * @param dataTypes * @param requestMessages * @return Array whose elements are of type Boolean, String or int, * corresponding to the data type specified in the dataTypes array */public Object[] getData(

String[] dataTypes,String[] requestMessages);

}

B.3.8 GetExternalArgument

package org.iso.mpeg.mpeg21.mpegj.dibo;

/** * Java Binding interface for the GetExternalArgument DIBO */public interface GetExternalArgument {

/** * * @param mimeType * @param requestMessage * @return string giving location of the resource. */public String getExternalArgument(String mimeType, String requestMessage);

}

B.3.9 GetObjectArguments

package org.iso.mpeg.mpeg21.mpegj.dibo;

56 © ISO/IEC 2004 — All rights reserved

Page 65: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

import org.w3c.dom.*;

/** * Java Binding interface for the GetObjectArguments DIBO */public interface GetObjectArguments {

/** * * @param objectTypes * @param requestMessages * @return */public MpegDIDNode[] getObjectArguments(

String[] objectTypes,String[] requestMessages);

}

B.3.10 IsConditonSatisfied

package org.iso.mpeg.mpeg21.mpegj.dibo;

/** * Java Binding interface for the IsConditionSatisfied DIBO */public interface IsConditionSatisfied {

/** * @param node * @return true if conditions of node are satisfied, false if not */public boolean isConditionSatisfied(MpegDIDNode node);

}

B.3.11 LoadDID

package org.iso.mpeg.mpeg21.mpegj.dibo;

/** * Java Binding interface for the LoadDID DIBO */public interface LoadDID {

/** * @param locationURI */public void loadDID(String locatiojnURI);

}

B.3.12 Pause

package org.iso.mpeg.mpeg21.mpegj.dibo;

/** * Java Binding interface for the Pause DIBO */public interface Pause {

/**

© ISO/IEC 2004 — All rights reserved 57

Page 66: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

* * @param task */public void pause(MpegDIPResourceStatus task);

}

B.3.13 PlayResource

package org.iso.mpeg.mpeg21.mpegj.dibo;

import org.w3c.dom.*;

/** * Java Binding for the PlayResource DIBO */public interface PlayResource {

/** * * @param node The MpegDIDNode object that reflects the DIDL Resource element

describing the media resource. * @param changes MpegDIPResourceChangeObject to apply to resource before playing, if

not null * @param async if true play the resource asynchronously, else synchronously * @return MpegDIDResourceStatus object to identify the playing resource */public MpegDIPResourceStatus playResource(MpegDIDNode node, MpegDIPResourceChangeObject

changes, Boolean async);}

B.3.14 Resume

package org.iso.mpeg.mpeg21.mpegj.dibo;

/** * Java Binding interface for the Resume DIBO */public interface Resume {

/** * * @param task */public void resume(MpegDIPResourceStatus task);

}

B.3.15 SetSelection

package rg.iso.mpeg.mpeg21.mpegj.dibo;

import org.w3c.dom.*;

/** * Java Binding interface for the SetSelection DIBO */public interface SetSelection {

/** *

58 © ISO/IEC 2004 — All rights reserved

Page 67: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

* @param selectionNode * @param state * @return array of node objects */public MpegDIDNode[] setSelection(MpegDIDNode selectionNode, String state)

throws MpegDIPException;}

B.3.16 Stop

package org.iso.mpeg.mpeg21.mpegj.dibo;

/** * Java Binding interface for the Stop DIBO */public interface Stop {

/** * * @param task */public void stop(MpegDIPResourceStatus task);

}

B.3.17 StoreDIDAs

package org.iso.mpeg.mpeg21.mpegj.dibo;

/** * Java Binding interface for the StoreDIDAs DIBO */public interface StoreDIDAs {

/** * @param sourceDID * @param didlChanges */public void storeDIDAs(MpegDIDDocument sourceDID, MpegDIDLChangesObject didlChanges);

}

B.3.18 StoreDIDOver

package org.iso.mpeg.mpeg21.mpegj.dibo;

/** * Java Binding interface for the StoreDIDOver DIBO */public interface StoreDIDOver {

/** * @param sourceDID * @param didlChanges */public void storeDIDOver(MpegDIDDocument sourceDID, MpegDIDLChangesObject didlChanges);

}

© ISO/IEC 2004 — All rights reserved 59

Page 68: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

B.3.19 StoreNewDID

package org.iso.mpeg.mpeg21.mpegj.dibo;

/** * Java Binding interface for the StoreNewDID DIBO */public interface StoreNewDID {

/** * @param doc */public void storeNewDID(MpegDIPDIDLChangesObject didlChanges);

}

B.3.20 Wait

package org.iso.mpeg.mpeg21.mpegj.dibo;

/** * Java Binding for the Wait DIBO */public interface Wait {

/** * * @param timeInterval - an integer */public void wait(int timeInterval);

}

60 © ISO/IEC 2004 — All rights reserved

Page 69: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

Annex C(Normative)

Calling MPEG-J based DIxOs from DIMs

The MPEG-J based DIxOs (J-DIxOs) are written using the Java Programming Language. These J-DIxOs can in turn invoke the DIBOs through the Java Bindings defined in Annex B. Invoking other J-DIxOs is achieved by directly using the Java signature of that J-DIxO. The J-DIxOs will be executed in a platform independent fashion using the execution environment defined in Annex D.

The J-DIxOs are invoked from DIMs using a single DIBO call. The generic invocation method was described in subclause 5.6.5. This annex will adapt the generic invocation for MPEG-J based DIxOs.

C.1 Invoking J-DIxOs

A J-DIxO can be only be invoked from a DIM using the special DIBO RunJDIxO. RunJDIxO is defined as follows:

Syntax: RunJDIxO(dixoName, argToDIxO1, argToDIxO2, ...)

Description: Executes a specified J-DIxO with the arguments supplied.

Parameters: dixoName

A String that represents the fully qualified Java name for the J-DIxO class.

If the J-DIxO cannot be executed or an error occurs within the execution of the J-DIxO MpegDIPException is generated.

argToDIxO....

This can be a variable number of arguments, each corresponding to the arguments that the J-DIxO takes. The argument type must correspond to the type that the J-DIxO itself takes. Rules for the types of objects that may be defined as arguments to a J-DIxO are given below.

Return value: Returns an objet correspoding to the object type specified for the return value of the J-DIxO.

EXAMPLE

...function AddTrackToPlaylist( track, playList ) {

// Calling a J-DIxO.RunJDIxO("com.companyx.demo.AddTrackToPlayList",track,playList);

}http://com.sun.demo.addtracktoplaylist/

© ISO/IEC 2004 — All rights reserved 61

Page 70: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

C.2 Including J-DIxOs in a DID

C.2.1 Introduction

This clause specifies how J-DIxOs are incorporated into a DID. Associating a J-DIxO with a Digital Item involves two steps:

1. The J-DIxO declaration refers to the declaring of the J-DIxO as being available in association with a particular Digital Item. C.2.2 elaborates on J-DIxO declaration.

2. The J-DIxO definition refers to the Java classes that define the J-DIxO. The J-DIxO definition may be listed in a separate J-DIxO location and referenced from the DID, or it may be embedded inline in the DID. In either case it is the J-DIxO definition itself that is the resource (in terms of the Digital Item Declaration Model). The rules associated with defining J-DIxO resources are outlined in C.2.4. Such resources can either be J-DIxO Java classes or helper classes (Java classes that the J-DIxO classes use). The rules governing the definition of J-DIxO classes are covered in C.3.

C.2.2 J-DIxO item

All the related J-DIxO declarations that make a J-DIxO shall be packaged together to form a stand-alone digital item called a J-DIxO ITEM. A J-DIxO ITEM is identified by the following DII TYPE identifier within the DESCRIPTOR for the J-DIxO ITEM.

urn:mpeg:mpeg21:2004:01-DIP-NS:DIxO:Java

EXAMPLE

...<Item>

<!-- type identifier --><Descriptor>

<Statement mimeType="text/xml"> <dii:Type>urn:mpeg:mpeg21:2002:01-DIP-NS:DIxO:Java</dii:Type> </Statement> </Descriptor>...

A J-DIxO ITEM may contain any number of COMPONENT child elements. Each such COMPONENT child element shall be a J-DIxO declaration.

C.2.3 J-DIxO declaration

C.2.3.1 Introduction

A J-DIxO declaration is a DIDL Component element which shall be constructed such that

the Component contains a J-DIxO classes descriptor represented by a DIP JDIxOClasses element contained in a DIDL Descriptor-Statement fragment;

the J-DIxO definition is referenced or embedded by a Resource child of the Component.

it always appears inside a J-DIxO Item.

NOTE A J-DIxO declaration can be referenced from an external DID by utilizing a DIDL Reference child element of the Component element.

62 © ISO/IEC 2004 — All rights reserved

Page 71: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

C.2.3.2 JDIxOClasses syntax

<!-- ################################################ --><!-- Definition of JDIxOClasses --><!-- ################################################ -->

<element name="JDIxOClasses"><complexType>

<sequence><element name="Class" type="string" minOccurs="0"

maxOccurs="unbounded"/></sequence>

</complexType></element>

C.2.3.3 JDIxOClasses Semantics

Semantics of JDIxOClasses:

Name Definition

JDIxOClasses Content of this element is a sequence of Class child elements. A DIDL Component representing a J-DIxO declaration must contain a DIP JDIxOClasses element contained in a DIDL Descriptor-Statement. There must be one Class child element for each J-DIxO class defined by this Component. Helper classes defined by this component are not listed in the JDIxOClasses element. If this component only defines helper classes then the JDIxOClasses element has no children.

Class Content of this element is a string indicating the fully qualified Java class name of a Java J-DIxO class that is intended to be invoked as a J-DIxO – adhering to rules laid out for J-DIxO classes.

The example in C.2.5 shows several different J-DIxO declarations specified as component children within a J-DIxO ITEM.

C.2.4 J-DIxO definition

A J-DIxO definition is embedded in (as base64-encoded bytes of binary data) or referenced from a DIDL Resource element. Such a Resource element must be contained in a J-DIxO declaration as specified in C.2.3.

The J-DIxO definition itself must be a Java class, a jar file containing Java classes, or a base directory that contains Java classes organized in a directory tree. The Java classes in a J-DIxO definition can be classes that are intended to be invoked as J-DIxOs and/or helper classes that are used by J-DIxO classes.

The mimeType for a Resource element should be “application/java” when referring to Java class files or a base directory and should be “application/java-archive” when referring to a jar file. These Resources in a J-DIxO shall not be defined to belong to the package org.iso.mpeg.mpeg21.mpegj since this package name is reserved for JDIBOs and other support classes specified in this standard. The name scope of J-DIxOs or helper classes loaded from a given DI is limited to the context of that DI. This implies that two classes having the same name but belonging to two different DIs will be loaded safely without name scope conflicts. Multiple J-DIxO classes with the same fully qualified Java name shall not be declared or defined within the scope of the same DI.

© ISO/IEC 2004 — All rights reserved 63

Page 72: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

For an example of an embedded J-DIxO definition, see the second Component in the example in C.2.5. For an example of a referenced J-DIxO definition, see the first Component in the example in C.2.5.

C.2.5 J-DIxO Example (informative)

An example of a J-DIxO item is shown below to illustrate further the J-DIxO declaration and definition concepts introduced.

In the J-DIxO item shown below, the first J-DIxO declaration provides an example of a JDIxOClasses element for a jar file. This J-DIxO declaration also shows an example of an external reference to the J-DIxO definition by referencing the location of the jar file using the ref attribute of the DIDL Resource element. In addition, a second DIDL Resource element referencing an equivalent J-DIxO definition using a class path instead of a jar file is provided.

The second J-DIxO declaration provides an example of a JDIxOClasses element for a J-DIxO class by itself. In this second J-DIxO declaration, the J-DIxO definition is embedded inline in the DIDL Resource element using base64 encoding (complete J-DIxO definition not included for this example).

Both J-DIxO declarations also show an example of including a plain text DIDL Descriptor-Statement for containing a short human readable description of each J-DIxO.

A third J-DIxO declaration shows an example of using the DIDL Reference element to reference a J-DIxO declaration contained in an external document.

EXAMPLE .

…<Item id="JDIxOs">

<Descriptor><Statement mimeType="text/xml">

<dii:Type>urn:mpeg:mpeg21:2002:01-DIP-NS:DIxO:Java</dii:Type> </Statement>

</Descriptor><Descriptor>

<Statement mimeType="text/plain">JDIxO Declarations</Statement></Descriptor><Component id="jdixo_01">

<Descriptor><Statement mimeType="text/plain">Description of JDIxO 1</Statement>

</Descriptor><Descriptor>

<Statement mimeType="text/xml"><dip:JDIxOClasses>

<dip:Class>com.companyx.demo.AddTrackToPlaylist</dip:Class></dip:JDIxOClasses>

</Statement></Descriptor><Resource mimeType="application/java-archive" ref="listmanip.jar"/><Resource mimeType="application/java" ref="file://home/work/classdir"/>

</Component><Component id="jdixo_02">

<Descriptor><Statement mimeType="text/plain">Description of JDIxO 2</Statement>

</Descriptor><Descriptor>

<Statement mimeType="text/xml"><dip:JDIxOClasses>

<dip:Class>com.companyx.demo.RemoveTrackFromPlaylist</dip:Class></dip:JDIxOClasses>

64 © ISO/IEC 2004 — All rights reserved

Page 73: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

</Statement></Descriptor><Resource mimeType="application/java" encoding="base64">...</Resource>

</Component><Component>

<Reference target="otherDI.xml#jdixo_03"/></Component>

</Item>…

C.3 J-DIxO Classes

A J-DIxO class should preferrably follow Java Naming conventions. Specifically the name of the class must begin with an upper case letter.

A J-DIxO must have a designated method that has the same name as the class except that the first letter will be lower case. (This method will be referred to as the “J-DIxO designated method” henceforth).

A J-DIxO must also have a constructor that takes an argument of the type org.iso.mpeg.mpeg21.mpegj.GlobalEnv. This is to ensure that when a J-DIxO is invoked from a DIM, the current (DIM) environment can be passed to the instance of the invoked J-DIxO implementation.

The GlobalEnv object is intended to provide a mechanism for J-DIxOs to receive (DIM) environment variables from the execution engine.

package org.iso.mpeg.mpeg21.mpegj;

/** * This class defines a mechanism for J-DIxOs to query the platform * for environment settings. */public interface GlobalEnv {

/** * Returns the instance of the JDIBOFactory which in turn is used to * instantiate JDIBOs. This call must not fail. * @return an instance of the JDIBOFactory object. */public JDIBOFactory getJDIBOFactory();

/** * Returns the instance of the Current DID document. * @return didDocument. */public MpegDIDDocument getCurrentDIDDocument();

}

The platform implementation for a particular J-DIBO will be obtained from the JDIBOFactory object (see clause B.2 for specification of JDIBOFactory interface) which may be queried from the GlobalEnv object.

EXAMPLE

import org.iso.mpeg.mpeg21.mpegj.*;import org.iso.mpeg.mpeg21.mpegj.dibo.*;

© ISO/IEC 2004 — All rights reserved 65

Page 74: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

public class TestJDIxO {GlobalEnv env;

/* All J-DIxOs must have a constructor taking GlobalEnv as argument */public TestJDIxO(GlobalEnv env) {

this.env = env; }

public void testJDIxO(MpegDIDNode node) {

GetDIDLNode gdnOp = (GetDIDLNode)(env.getJDIBOfactory().getJDIBO("GetDIDLNode"));

MpegDIDNode tempNode = gdnOp.getDIDLNode("Statement[1]", node);...

}}

A J-DIxO designated method may take arguments of the following types only:

org.iso.mpeg.mpeg21.mpegj.dibo.MpegDIDDocument

org.iso.mpeg.mpeg21.mpegj.dibo.MpegDIDNode

org.iso.mpeg.mpeg21.mpegj.dibo.MpegDIPObjectMap

org.iso.mpeg.mpeg21.mpegj.dibo.MpegDIPResourceStatus

org.iso.mpeg.mpeg21.mpegj.dibo.MpegDIPResourceChangeObject

org.iso.mpeg.mpeg21.mpegj.dibo.MpegDIPDIDLChangeObject

java.lang.String

java.lang.Object

the primitive Java data types byte, int, long, char, float, double, boolean.

array [] instances of any of the data types above

J-DIxO designated methods may only throw exceptions of the type:

org.iso.mpeg.mpeg21.mpegj.dibo.MpegDIPException

66 © ISO/IEC 2004 — All rights reserved

Page 75: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

Annex D(Informative)

MPEG-J based model for execution of DIxOs

This annex describes the execution model for MPEG-J based Java bytecode DIxOs with Java as the DIxL. MPEG-J defines an application engine addressing the security, delivery, life cycle, and name scope aspects. The MPEG-J can be used as a good framework to execute DIxOs sent as part of the Digital Items. Compiled DIxO code can be safely executed without risk of causing harm to the terminal or breaking the privacy of users or other downloaded code that is being run within the virtual machine.

The DIxL for the MPEG-J based model would be Java as mentioned above. Among other features Java provides platform independence, is object-oriented, has language support to express concurrency and provides localization and internationalization support.

The MPEG-J based application engine consists of:

Java Vitual Machine

Supported platform (java.*) packages: java.io, lang and util.

Required ISO/IEC JTC 1/SC 29/WG 11 defined (org.iso.mpeg.mpegj.*) APIs.

Required Java mappings for normative DIBO APIs. (org.iso.mpeg.mpeg21.dibo.*)

Invocation of J-DIxO methods has been discussed in Annex C.

© ISO/IEC 2004 — All rights reserved 67

Page 76: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

Annex E(Informative)

Digital Item Method Use Case Scenarios

This annex describes use case scenarios demonstrating possible usage of Digital Item Methods and the Digital Item Base Operations.

It should be noted that Digital Item Methods utilized in the following use cases are not normative, but are example DIMs that are applicable in each use case scenario. However, the DIBOs utilized by the DIMs are from the normative set of DIBOs specified in clause 5.3.

E.1 Digital Music Album

E.1.1 Use Case

In this use case scenario, we consider a digital music album.

This music album is a demonstration album for a musician currently known mostly in a local region only. The digital music album is prepared for the musician by a small independent record company. There are no access restrictions on the content of the album. The DID for the album is available on the personal web site of the musician, and on the web site of the record company. The media content of the resources are located only at the web site of the record company (the resource references are URLs to the web site of the company).

The music album contains a JPEG image resource representing the album cover, an HTML resource with artist information and another HTML resource with album information. It also contains four music tracks. In general, each track comprises an associated JPEG image, two MP3 audio resources (one sampled at 64Kbps and another at 192Kps), a plain text resource with the lyrics, and a PDF document of the music score. Track 3 is an instrumental only and has no resource for lyrics. A consumer of the music album can choose what type of resources to access when accessing a music track (audio, lyrics, score), and for the audio can choose between the 64Kbps or 192Kbps versions. By default, only the 192Kbps audio resource is selected to be accessed. For the audio bit rate choice, only one selection may be selected at any one time.

The music album structure from a consumer perspective is shown in Figure 3.

Figure 3 — Music Album structure - consumer perspective

The structure of the DID for the music album is shown in Figure 4.

68 © ISO/IEC 2004 — All rights reserved

Page 77: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

Figure 4 — Music Album DID structure

The Object Map (see clause 5.7) of the DID contains the following mappings of DIDL elements to DIM Object Types.

Table 5 — Mapping of DIDL elements in example DI to DIM Object Type

DIDL element DIM Object Type

Item with id artist_info ArtistInfo

Item with id album_info AlbumInfo

Item with id tracks Tracks

Item with id track_1 Track

Item with id track_2 Track

Item with id track_3 Track

Item with id track_4 Track

© ISO/IEC 2004 — All rights reserved 69

Page 78: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

Note that while the above Object Map maps only Item elements, any element type can be mapped to a DIM Object Type.

The DID contains the following DIMs.

Table 6 — DIMs contained in example DI for Use Case Scenario

DIM Description

AboutArtist This DIM displays the information about the artist contained in the artist information HTML resource.

AboutAlbum This DIM displays the information about the album contained in the album information resource.

PlayAllTracks This DIM plays all the tracks in the music album in order. Only the audio resource of each track is played.

PlayTrack This DIM plays a single user selected track. Only the audio resource of the selected track is played.

GetTrackResources This DIM displays the related information of a single user selected track. The user is able to choose which resource types (audio, lyrics, score) to display for the selected track.

SaveTrack This DIM saves the audio resource of a single user selected track in a new DID to a file chosen by the user to a “mini-album”. The artist information is saved also to the new mini-album.

E.1.2 Scenario 1

Consider the following use case scenario.

a) A friend downloads the DID for the music album from the musicians personal web site and loads it in their MPEG-21 conformant Digital Item viewing application.

b) The application presents a list of the DIMs to the user.

c) The user selects the AboutAlbum DIM to view the artist information.

d) The DIM retrieves the single Item element that maps to the DIM Object Type AlbumInfo.

e) The DIM retrieves from the AlbumInfo Item the Resource element referencing the HTML resource containing the artist information.

f) The DIM displays the artist information Resource element.

g) The user selects the PlayTrack DIM.

h) The DIM requests the user to select an element that maps to the DIM Object Type Track.

i) The user selects the fourth track.

70 © ISO/IEC 2004 — All rights reserved

Page 79: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

j) The DIM retrieves from the selected Track Item the Resource element referencing the (default selected) 192Kbps audio resource.

k) The DIM plays the audio resource synchronously.

l) The user selects the GetTrackResources DIM.

m) The DIM requests the user to configure the resource types choice to select which resource types of the track to access.

n) The user selects the audio and score resources.

o) The DIM retrieves from the selected Track Item the Resource elements referencing the audio and score resources.

p) The DIM plays the audio resource asynchronously and displays the score.

q) The user selects the SaveTrack DIM.

r) The DIM requests the user to select an element that maps to the DIM Object Type Track.

s) The user selects the fourth track.

t) The DIM requests the user to provide a short description for the saved track and the user enters the text.

u) The DIM creates a new DID.

v) The new DID contains an Item with a Descriptor child item and two child sub-Items. The Descriptor contains a Statement with plain text content set to the short description entered by the user. The first Item is a copy of the ArtistInfo Item. The second Item itself contains a sub-Item that is a copy of the fourth Track Item with only the currently available audio resource. In the new DID, the mapping of the copied ArtistInfo, Tracks, and Track Items to the appropriate DIM Object Types must also be added to the Object Map of the new DID.

w) The DIM requests the user for the file in which the new DID is to be saved.

x) The DIM saves the DID to the specified file.

y) The user selects the GetTrackResources DIM again. This time the user selects the third track, and selects to access only the lyrics.

z) Since this Track Item contains no resource for lyrics, the DIM displays an error message to the user.

aa) The user selects the PlayAllTracks method.

bb) For each track in order, the DIM plays the audio resource synchronously.

E.1.3 DIM Implementations

E.1.3.1 AboutAlbum

function AboutAlbum(){ var info = didDocument.objectMap.getObjects( "AlbumInfo" );

for( i = 0; i < info.length; i++ ) {

© ISO/IEC 2004 — All rights reserved 71

Page 80: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

var res = GetDIDLNode( "Component[1]/Resource[1]", info[i] ); if( res != null ) { PlayResource( resource, null, false ); } }}

E.1.3.2 AboutArtist

function AboutArtist(){ var info = didDocument.objectMap.getObjects( "ArtistInfo" );

for( i = 0; i < info.length; i++ ) { var res = GetDIDLNode( "Component[1]/Resource[1]", info[i] ); if( res != null ) { PlayResource( resource, null, false ); } }}

E.1.3.3 GetTrackResources

function PlayTrack(){ var objTypes = new Array( "Track" ); var msg = new Array( "Select Track" ); var tracks = GetObjectArguments( objTypes, msg ); if( tracks[0] != null ) { var choice = GetDIDLNodeByID( null, “resource_types” ); ConfigureChoice( choice ); var comp = GetDIDLNode( "Component[pos()<3]", tracks[0] ); for( j = 0; j < comp.length; j++ ) { if( IsConditionsSatisfied( comp[j] ) ) { var res = GetDIDLNode( "Resource[1]", comp[j] ); if( res != null ) { PlayResource( res, null, true ); } } } comp = GetDIDLNode( "Component[pos()=3]", tracks[0] ); if( j = 0; j < comp.length; j++ ) { if( IsConditionsSatisfied( comp[j] ) ) { var res = GetDIDLNode( "Resource[1]", comp[j] ); if( res != null ) { PlayResource( res, null, false ); } } }}

E.1.3.4 PlayAllTracks

function PlayAllTracks(){

72 © ISO/IEC 2004 — All rights reserved

Page 81: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

var tracks = didDocument.objectMap.getObjects( "Tracks" ); for( i = 0; i < tracks.length; i++ ) { var comp = GetDIDLNode( "Component[pos()<3]", tracks[i] ); for( j = 0; j < comp.length; j++ ) { if( IsConditionsSatisfied( comp[j] ) ) { var res = GetDIDLNode( "Resource[1]", comp[j] ); if( res != null ) { PlayResource( res, null, false ); } } } }}

E.1.3.5 PlayTrack

function PlayTrack(){ var objTypes = new Array( "Track" ); var msg = new Array( "Select Track" ); var tracks = GetObjectArguments( objTypes, msg ); if(tracks != null && tracks.length == 1 ) { var comp = GetDIDLNode( "Component[pos()<3]", tracks[0] ); for( j = 0; j < comp.length; j++ ) { if( IsConditionsSatisfied( comp[j] ) ) { var res = GetDIDLNode( "Resource[1]", comp[j] ); if( res != null ) { PlayResource( res, null, false ); } } } }}

E.1.3.6 SaveTrack

function SaveTrack(){ // This DIM saves a single User selected Track to a new DID.

// Prompt the User to select the Track to be saved. var objTypes = new Array( "Track" ); var msg = new Array( "Select Track" ); var tracks = GetObjectArguments( objTypes, msg ); if( tracks != null && tracks.length == 1 ) {

// Request User to provide a description for the new DID var dataTypes = new Array( “String” ); msg[0] = “Enter description”; var userDesc = GetData( dataTypes, msg );

// Retrieve ArtistInfo Item so we can copy it to new DID var info = didDocument.objectMap.getObjects( "ArtistInfo" );

// Check the audio Components (the first two Components) of // the Track and just copy the first one that is available // according to state of any Conditions it may have.

© ISO/IEC 2004 — All rights reserved 73

Page 82: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

var comp = GetDIDLNode( "Component[pos()<3]", tracks[0] ); var compToCopy = null; for( j = 0; j < compCopy.length; j++ ) { if( IsConditionsSatisfied( comp[j] ) ) { compToCopy = comp[j]; break; } }

// When we store the new DID, the sequence of changes collected // in this change object will be applied to the root element of // the new DID. var newDidChanges = new MpegDIPDIDLChangeObject();

// This change object is used to collect changes to be applied // to the top level Item. newItemChanges = new MpegDIPDIDLChangeObject();

// Collect change for new DID to add new top-level Item child node. newDidChanges.addAddNewDIDLChildNodeChange( "Item", newItemChanges, 0 );

// This change object is used to collect changes to be applied // to a Descriptor of the top level Item var newDidDescChanges = new MpegDIPDIDLChangeObject();

// This change object is used to collect changes to be applied // to the Statement of the Descriptor. var newDidStmtChanges = new MpegDIPDIDLChangeObject();

// Collect change for Statement to set the mimeType attribute value. newDidStmtChanges.addModifyDIDLNodeAttributeChange( "mimeType", "text/plain" );

// Collect change for Statement to set the text content of the Statement. newDidStmtChanges.addSetDIDLStatementTextChanges( userDesc[0] );

// Collect change for Descriptor to add new Statement child node. // (the new Statement itself will have the changes collected in // newDidStmtChanges applied to it). newDidDescChanges.addAddNewDIDLChildNodeChange( "Statement", newDidStmtChanges, 0 );

// Collect change for top level Item to add new Descriptor child node. // (the new Descriptor will itself have the changes collected in // newDidDescChanges applied to it). newItemChanges.addAddNewDIDLChildNodeChange( "Descriptor", newDidDescChanges, 0 );

// Collect change for top level Item to add a copy of the ArtistInfo // Item we retrieved above. newItemChanges.addAddCopyDIDLChildNodeChange( info, null, 1, true );

// This change object is used to collect changes to be applied // to the Tracks sub-Item of the top level Item. var tracksItemChanges = new MpegDIPDIDLChangeObject();

// Collect change for top level Item to add new Tracks sub-Item child // node. newItemChanges.addAddNewDIDLChildNodeChange( "Item", tracksItemChanges, 2 );

74 © ISO/IEC 2004 — All rights reserved

Page 83: ISO/IEC JTC 1/SC 29 N 6173  · Web viewISO/IEC JTC 1/SC 29 N 6173 Subject: ISO/IEC 21000-10 CD - Part 10: Digital Item Processing Author: Rik Van de Walle, Ian Burnett, Gerrard Drury,

// Collect change for Tracks sub-Item to add a copy of the Track // Component we retrieved above. if( compToCopy != null ) { tracksItemChanges.addAddCopyDIDLChildNodeChange( compToCopy, null, 0, true ); }

// And now store the new DID which will be created by applying all the // changes we have requested by collecting them above. StoreNewDID( newDidChanges ); }}

© ISO/IEC 2004 — All rights reserved 75