com.ldodds.foaf.thinlet.model
Interface Model

All Superinterfaces:
Validatable
All Known Implementing Classes:
ModelImpl

public interface Model
extends Validatable

A FOAF data model.

A Model is constructed in two main circumstances: when reading data from the GUI prior to exporting, and when importing data from other data sources.

This interface isn't especially RDF-centric but can be seen as an abstraction over an RDF data model/graph that provides useful functionality for FOAF apps. It should be relatively straight-forward to create instances of this model that manipulate true RDF graphs underneath.

This is very much likely to change: its the bit of the app that I'm least comfortable with at the moment!

Author:
ldodds

Method Summary
 void addFriend(Person friend)
          Adds a friend of the current person.
 Person getCurrentPerson()
          Retrieves the current person, i.e the representation of the user entering data into the application.
 java.util.List getFriends()
          Retrieves the friends of the current person.
 void setCurrentPerson(Person p)
          Sets the current person
 
Methods inherited from interface com.ldodds.foaf.thinlet.model.Validatable
getErrors, validate
 

Method Detail

getCurrentPerson

public Person getCurrentPerson()
Retrieves the current person, i.e the representation of the user entering data into the application.
Returns:
the current person

getFriends

public java.util.List getFriends()
Retrieves the friends of the current person.
Returns:
a List of Person objects.

setCurrentPerson

public void setCurrentPerson(Person p)
Sets the current person
Returns:
a Person object. Cannot be null

addFriend

public void addFriend(Person friend)
Adds a friend of the current person. If the current person is null then a new empty person should be created.