Thursday, December 22, 2005

Implementation Changes

I've hit some snags during implementation. I've made some design changes to accommodate them. I'm going to document them as I go to keep Ken informed, and to have a place to go back to in case I ever wonder "WTF did I do that?"

Removed Owner, Group and Permissions
I removed file ownership and access control for two reasons. They would either require some ThreadContext object to track the actor, or adding a "actor" parameter to every method call to check permissions. This would pollute the interface right now. It may be added later.
Java has a nice ACL library that we may want to use instead. My mental stack is too full to figure it out right now.
Address is a first class citizen
I promoted the "Address" abstraction to be a first class citizen. It's used by Contact, Meeting, and Photo, so I think it should be 1st class. I am making it immutable for now.
Created our own MimeType
I was planning to use the activation framework's MimeType object, but it isn't immutable. I don't want the mime type that is describing a file to be changeable. It doesn't make sense for an instance of Music to have a Document mime type. I wrote a quick little immutable mime type.

Tuesday, December 20, 2005

Persisted Object Hierarchy #2

Dynamic AssociationStatic AssociationAssociationDocumentMeetingContactPhotoImageMusicAudioItem

Replaces Persisted Object Hierarchy.

Meta-Data

Dynamic Association Meta-Data

Dynamic Association

extends Association extends Item.

query [a persisted query]

Static Association Meta-Data

Static Association

extends Association extends Item.

Read/Write
relation Collection <> (promoted to r/w)
representative Item

Association Meta-Data

Association

extends Item.

Read Only
relation Collection <>

Document Meta-Data

Document

extends Item.

Defined by Data
words int
sentences int
paragraphs int
pages int ???
Read/Write
status { WORK_IN_PROGRESS, DRAFT, FINAL, ABANDONED }
contributors Collection <>
keywords Collection <>
abstract String

Monday, December 19, 2005

Meeting Meta-Data

Meeting

extends Item.

Meeting is based on the vEvent object in the iCalendar format as described in RFC 2445 (HTML).

Reference implementation: iCal4j.

summary String
description String
agenda Document (added)
minutes Document (added)
material Collection <> (added)
comments Collection <>
start Date
end Date
location Address
status { TENTATIVE, CONFIRMED, CANCELLED }
organizer Contact
attendees Collection <>
lastMeeting Meeting (added)
nextMeeting Meeting (added)
Attendee
attendee Contact
role { CHAIR, REQ-PARTICIPANT, OPT-PARTICIPANT, NON-PARTICIPANT } ROLE
status { NEEDS-ACTION, ACCEPTED, DECLINED, TENTATIVE, DELEGATED } PARTSTAT
delagatedTo Attendee delegateTo
delagatedFrom Attendee delegateFrom

Sunday, December 11, 2005

Contact Meta-Data

Contact

extends Item

Contact is based on the vCard specification. Vcard is formalized in RFC 2425 (HTML) and RFC 2426 (HTML). See Vcard as RDF/XML, hCard for more info.

Reference implementation: vCard4j.

Read/Write
name Name N
nicknames List <> NICKNAME
photo Photo PHOTO
birthday Date BDAY
addresses Collection <> ADR
telephone Collection <> TEL
email Collection <> (TODO: should there be TYPEs for this?) EMAIL
url URL URL
title String TITLE
role String ROLE
agent Contact AGENT
organization String ORG
unit List <> ORG
Name
family String
given String
additional List <>
prefix List <>
suffix List <>
Address
type[] { dom, intl, postal, parcel, home, work, pref }
poBox String
extended String
street String
city (locality) String
state (region) String
postalCode String
country ISOCode
Telephone
type[] { home, work, msg, voice, fax, cell, video, pager, bbs, modem, car, isdn, pcs, pref }
number String (vcard recomends canonical)

Friday, December 9, 2005

Photo Meta-Data

Photo's meta-data is based on the EXIF specification and the IPTC spec.

EXIF

See the EXIF v2.2 spec and sample data.

IPTC

IPTC IIM v4.1 spec.

Refernece implementations

Photo

extends Image extends Item

Read Only (exif)
Camera Camera
Exposure Time float
F Number float
Original Date
Digitized Date
Shutter Speed float
Aperture float
Exposure Bias float
Max Apature float
Subject Distance float
Metering Mode { unknown, Average, CenterWeightedAverage, Spot, MultiSpot, Pattern, Partial, other }
Flash Flash
FocalLength float
Read/Write (iptc)
Object Name String
Keywords Collection <>
By Line Collection <>
Country (primary location) String TODO: use ISO countries?
Province (state) String
City String
Headline String
Caption String
Read/Write (custom)
Subjects Collection <>
Camera
Make String
Model String
Flash
Fired { Fired, NotFired }
Returned { NoStrobeReturnDetectionFunction, StrobeReturnLightNotDetected, StrobeReturnLightDetected }
Mode { unknown, CompulsoryFiring, CompulsorySupression, Auto }
Function { Present, NoFlash }
RedEye { RedEyeReduction, NoRedEyeReduction }

TODO: should these "float" values be "rationals"?

Sunday, November 27, 2005

Image Meta-Data

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 }

Music Meta-Data

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.

Music

extends Audio extends Item

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

Audio Meta-Data

Audio

extends Item

Read Only
Length int Length of audio in mills