...
Items are contents under libraries. Items don't have their own permissions. They always inherit permissions from its parent library.
Items contain Dublin-core metadata: title,identifier, description, creator, date, format, language, rights, publisher, contributor, source, coverage, relation, subject, type. If the item is an image file, we also create a large, a medium, and a thumbnail jpeg images based on the master image. Therefore it will contain info about those three images. It also has some auditing fields: createdBy, createdDate, lastModifiedDate, modifiedBy. The xml text for a full item looks like:<item>
<libraryid>8bd219f0-f271-11db-b5bc-05f275694451</libraryid>
<id>fddb7233-ec8e-11db-b809-d59de43b7676</id>
<title>flowers</title>
<description>Spring flowers</description>
<createdBy>dongq</createdBy>
<createDate>2007-04-16T22:54:42.640-04:00</createDate>
<modifiedBy>dongq</modifiedBy>
<modifiedDate>2007-04-16T22:54:44.093-04:00</modifiedDate>
<contributor>Jane Smith</contributor>
<creator>John Smith</creator>
<date>3-3-2006</date>
<format>jpeg</format>
<language>English</language>
<publisher>none</publisher>
<rights>unspecified</rights>
<source>personal album</source>
<type>none</type>
<mimeType>image/jpeg</mimeType>
<size>615466</size>
<thumbnail>*http://localhost:8180/alfresco/guestDownload/direct/workspace/AP/fea61542-ec8e-11db-b809-d59de43b7676/thumbnail*</thumbnail>
<medium>*http://localhost:8180/alfresco/guestDownload/direct/workspace/AP/fead4136-ec8e-11db-b809-d59de43b7676/medium*</medium>
<large>*http://localhost:8180/alfresco/guestDownload/direct/workspace/AP/feb46d29-ec8e-11db-b809-d59de43b7676/large*</large>
</item>
To enhance performance, we cache the ids of thumbnail, medium and large child nodes as properties on the item node. We also cache the mimetype and size information of the master image.
We use the file extension (converted to lower case) to determine a file's mime type. The java library javax.activation.MimetypesFileTypeMap is used. In addition to the default mime types, additional mime types are defined in mime.types files in WEB-INF.
There are two sets of APIs for the item objects. One is items, which will get all items in the given library via its GET method. The other is item. Its GET method will retrieve an item, POST method will upload and create an item, PUT method will update an item and DELETE method will delete an item.
...