174 Personal Content Experience: Managing Digital Life in the Mobile Age Python is a popular and interpreted object-oriented language that is available for all Series 60 Symbian devices. Python is a powerful language and allows rapid application development in just a few lines of code, while an equivalent application using the Symbian dialect of C++ requires hundreds of lines. Python is an ideal language when trial- ling and experimenting with anything that is not yet on the shelves. Our Python implementation covers only the API, using exactly the same MdE server as the C++ version. All metadata and schemas written either in Python or C++ are available for applications written in other languages. The MdE server itself is implemented in C++. The basic unit of our metadata framework is a metadata object. Each metadata object must be predefi ned in the ontology, that is, a schema for the object must exist in the framework ontology. Due to the extensibility, a developer can create a new schema object if neces- sary, before instantiating the metadata object. A metadata object can be anything that can be pointed to by an URI. It can be real (a fi le) or virtual (a collection or playlist). Each object has a set of metadata attributes attached to it. The attributes describe the properties of an object, for example, an MP3 song has attributes such as artist, song title, and duration. 5.7.2 Managing Schemas When a client application opens a connection to Metadata Engine using the client API, the schema is loaded from the database into the client’s memory. The client can add new schema defi nitions to the database by using add methods available in the API. Deleting defi ni- tions from the database is not permitted due to keeping old applica- tions functional by not destroying any functions that they rely on. The schema is only updated in the client’s memory if the client extends the schema itself; modifi cations done by other clients are not forwarded from the server to the client while the session is open. If it should become important to receive modifi cations done by other clients, the session must be closed and a new session opened. This is one area where our prototype system needs improvement. Every defi nition is defi ned in a namespace in order to avoid name collisions. The predefi ned set of defi nitions is provided in the default namespace. The client can obtain a descriptor containing the URI of the default namespace using the provided method. It is not possible to add new defi nitions to the default namespace. Consequently, new defi nitions have to be made in other namespaces. When a new defi nition is added, the namespace in which the defi ni- tion will be included must be specifi ed. The Metadata API creates a namespace automatically, in cases where it did not previously exist.
Personal Content Experience Page 197 Page 199