![]() ![]() ![]() ![]() Gravitybox Schedule Primer
Page 53
1998-2004 Gravitybox Software LLC
Rooms
If there are objects in the collections, they will be saved inside their respective object
tags. The Rooms collection with one Room object named Room1 would be saved as
follows.
<ScheduleRooms>
<Room>
<Name>Room1</Name>
<Id>0</Id>
</Room>
</ScheduleRooms>
If more rooms were present, there would be more <Room></Room> tags pairs
defined.
Categories
Categories are defined in much the same way. A Category object has more properties
than a Room object. This is solved by adding more tags.
<Category>
<Name>Category1</Name>
<Id>0</Id>
<Color>16711680</Color>
</Category>
As was seen earlier, with the ScheduleItems object, a Category object defines each of
its properties with a tag and wraps the propertys data in the tag. This example shows
that a Category object has three properties: Name, Id, and Color.
Providers
The Providers collection defines the people that work with a schedule. Each has
multiple properties that need saving. The properties that are present on the Provider
object are the same tags that are defined in the file. This makes it obvious that there is a
one-to-one map of object properties to file tags.
<Provider>
<Name>John</Name>
<Id>0</Id>
<Color>16711680</Color>
<ScheduleTimes/>
</Provider>
|