TODO: Image is currently geared towards raster images, not vector images.
Image
extends Item
Read Only | ||
---|---|---|
width | int | |
height | int | |
xResolution | float | |
yResolution | float | |
resolutionUnit | { inches, centimeters } |
There is no file; only meta-data.
TODO: Image is currently geared towards raster images, not vector images.
extends Item
Read Only | ||
---|---|---|
width | int | |
height | int | |
xResolution | float | |
yResolution | float | |
resolutionUnit | { inches, centimeters } |
The meta-data for the Music class is a subset of the ID3v2.3.0 specification. Only the most significant fileds (the ones displayed by Winamp) were kept as a proof of concept.
We are using javamusictag to handle these.
Read/Write | |||
---|---|---|---|
Track | int | NULLABLE | TRCK |
Total Track | int | NULLABLE | TRCK |
Title | String | NULLABLE | TIT2 |
Album | String | NULLABLE | TALB |
Artist | String | NULLABLE | TPE1 |
Year | int | NULLABLE | TYER |
Genre | String | NULLABLE | TCON |
Comments | String | NULLABLE | COMM |
Composer | String | NULLABLE | TCOM |
Original Artist | String | NULLABLE | TOPE |
Copyright | String | NULLABLE | TCOP |
URL | URL | NULLABLE | WXXX |
Encoded by | String | NULLABLE | TENC |
Overridden | |||
Length | int | TLEN |
Read Only | |||
---|---|---|---|
UID | long | ||
fileSize | long | ||
created | Date | ||
modified | Date | ||
accessed | Date | ||
Read/Write | |||
owner | User | ||
group | Group | ||
perms | Permissions | ||
type | MimeType | javax.activation.MimeType | |
name | String | NULLABLE | |
stream | File | NULLABLE | |
related | Collection | ||
User Definable | |||
attributes | Map |
There are four types of meta-data per Item in SpoonFS.
Predefined data corresponding to a known type in the file store.
Free-formed user-defined key-value pairs.
The decision was made to persist know file types rather than having ad-hoc meta-data schemas. We decided that it was better to have a group of known schemas that users would know what meta-data was available for those types. This helps prevent users from creating version hell with schema types for these well-know objects.
Replaced by Persisted Object Hierarchy #2.
It should be possible to have a concept of representative elements in a static Association (i.e., an Association without a dynamic predicate). This would allow for a bunch of photos selected of a bike tour to have just one photo be the representative element for the association. One way to implement this would be to have each Photo have a Representative field, which points to the actual representative photo. Of course, then photos can be part of only one representable set. Perhaps the representative should be stored with the Association. So you ask an Item for an Association that it's part of, and then ask the Association for the representative element. If there is no representative element, just show all elements.
Again, representative elements should only be valid for static associations. If it were a dynamic Association and an element E were picked, if E's state changed so that it was no longer part of the Association, what would that mean? We would have an Association whose representative element was not part of the Association. Maybe this should be allowed, but it seems kind of dumb (e.g., why have a 10 day old e-mail be representative of the Association "All e-mails less than 7 days old"?)
As an alternative, perhaps we should meet in the middle and only allow static members of Associations to be representative. That is, when the person wants to make the member of an Association the representative, its inclusion in the Association had to be satisfied by a static part of the predicate (e.g., a particular UID) and not a dynamic part (e.g., age <>
As discussed before, a traditional filesystem has Files and Directories whereas SpoonFS will have Items and Relationships. This post describes Associations and their usage in the filesystem. Formally, an Association is just a unordered set of Items. In this respect, an Association is similar to a Directory in a traditional file system.
However, the power of Associations extends much further than Directory capabilities. First of all, it is possible for Items (for now, just think of Items and Files as being the same) to be in more than one Association. For example, imagine that Alice has recently taken several photos from her vacation in France. One thing that she could do is create a new Association named Vacation and put all of the recent photos in this Association. Furthermore, assume that Alice visited France because of a fascination with the Eiffel Tower. Alice has several photos from other people of the Eiffel Tower and these are all under an "Eiffel Tower" Association. Now that Alice has taken her own photos, she can also put these under the "Eiffel Tower" Association. Note that this would have been very difficult to do in a hierarchical file system; a picture of Alice in front of the Eiffel tower would need to be in both an "Eiffel Tower" directory and a "Vacation" directory. A hacky solution is available on platforms supporting hard links, but many mainstream filesystems (NTFS and FAT32) do not support this feature.
As a parenthetical comment, it was mentioned that Items should be thought of as just being Files. We now extend the concept of a SpoonFS Item to include Associations as well. That is, an Item is either a File, a Spoon, or an Association. Since Associations are sets of Items, it is possible to have Associations contain other Associations. Such a use for sub-Associations could be useful in organizing system files. For example, consider a "School" Association consisting of all of the work done for school (e.g., essays, assignments, OS projects, etc.). Now consider that there is an Association named "CS508" which corresponds to any files having to do with CS508 (e.g., PDF documents corresponding to the papers read). "CS508" could be placed as an Item in the "School" Association (along with other Associations pertaining to courses). Using Associations in this way is mirroring the functionality of a hierarchical file system. In fact, with this example, we wanted exactly a subset type of relationship, which is what hierarchical file systems provide. This example is useful to demonstrate that Associations are more powerful than just hierarchies: they can implement hierarchies (i.e., sub-Associations), but can also do much more (e.g., look at the previous example involving vacation photos).
As defined, Associations are sets of Items. The examples provided so far have offered sets that have a static predicate function. That is, the Association is told that it contains "these files", where "these files" are some set selected by the user. However, the predicate function for an Association can also be dynamic, allowing Associations to grow dynamically as new files are added. As a requirement, we allow Associations to query over the Attributes of an Item. For example, consider an Association entitled "Favourite Songs" in which the predicate function is "All MP3s whose "rating" attribute is 5 or more". An example from business could be "All Contacts that I have sent an E-mail to in the past five days". In this respect, Associations act somewhat like stored queries or views in a database. There is already a similar concept built into modern e-mail clients called virtual folders (such clients include Novell Evolution, Mozilla Thunderbird and Microsoft Outlook). Of course, virtual folders are only defined for mail messages in these applications. The great thing about refactoring this type of powerful behaviour into the filesystem is that all SpoonFS aware applications can benefit from it.