FOAFRealm/digime/ETIDrafts/project
From Corrib Clan Wiki
Contents
|
Mobile FOAFRealm Analysis document
Slawomir Grzonkowski, Adam Gzella
Use Case model
Diagram
In diagram 1. we present use - case diagram of mobile FOAFRealm application.
Use case description and sequence diagrams
Log in FOAFRealm service.
This is the one use case that is connected with unlogged user. Before start working in the application unlogged user will log into application. To do so he/she needs to pass user name and password. If the credentials are correct user will get access to the system, otherwise he needs to enter username and password one more time.
Log out from FOAFRealm service
User wants to log out from FOAFRealm. This use case has standard and simple construction. User send request and system log out the user.
Edit profile
Allows user to edit information from his own profile stored in FOAFRealm. System needs to fetch users information, then displays the form for edit (filled with fetched data). Finally changed data is stored using SOAResource.
Manage bookmarks
In this use case user manage his bookmarks. This use case includes â??Get bookmarksâ?? use case and is extended by add, edit, remove bookmark use cases. Mentioned use cased will be explained in the following paragraphs.
Get bookmarks
System reads all the bookmarks available for the user, stored on the FOAFRealm server. System gets the bookmarks from SOAResource. The bookmarks are divided into directories.
Add bookmark
Allows user to add new bookmark into profile. A bookmark needs to be add into directory, thats why this use case is extended by Add directory and Get directories. In sequence diagram it can be seen that there are different actions taken if user wants to add directory and if user wants to select from existing one.
Add directory
Before adding new bookmark user wants to create directory to put the bookmark in. System displays suitable form and user creates new directory describing it by Wordnet and DDC semantic classifications.
Get directories
Gets all existing directories. User then could select one of this directory as a place to add a bookmark.
Remove bookmark
Allows user to remove the bookmark. This use case is very similar to the Remove friend use case. Instead of Get List of Friends we have here Get Bookmarks and remaining actions are analogical.
Edit bookmark
User could edit saved bookmark. This use case is very similar to to Edit Friend use case. Instead of Get List of Friends we have here Get Bookmarks and remaining actions are analogical.
Manage Friends
In this use case user manage his Friends. This use case includes Get List of Friends use case, and is extended by Add, Remove, Edit Friend use cases.
Get List of Friends
Gets the list of user's friends stored in FOAFRealm. System gets the answer from the SOAResource creates suitable classes and display the result.
Add Friend
To add a friend system displays a suitable form, user inserts friend's data. Friend is added into FOAFRealm using SOAResource.
Remove Friend
To remove friend user needs to get users' list and then select one user to remove. Action is executed by SOAResource, which returns the result to the application and the user.
Edit Friend
To edit friend user need to select it from a list, then system displays suitable form with data to edit. New user information is send into SOAResource, which returns the result of the action to the application and the user.
Send message
In this use case user could send a message to his/her Friend. He selects the friend from the users list, and then he create the message (either e-mail or sms). The message is send by the system.
Class diagram
The business class diagram has been prepared. We focused on communication between layers and business logic. In order to present comprehensible diagram, implementation details for modules like GUI and network have been omitted purposely. The dependences between GUI, network and main module are shown on components diagram. The aims of all classes have been described below the class diagram.
Package: org.digime.mainimpl
Class: Message
Description: The aim of the class is to provide one standard type that can be extended. Moreover, methods send and setAddressee must be overridden in order to adjust various implementation details, which are different for classes like sms or email.
Attributes:
textMessage: String
Methods:
send: void
setAddressee: void
Class: Email
Description: This class extends Message and adds implementation details required for sending emails
SuperClass: Message
Attributes:
Methods:
setSubject: void
override setAddressee: void
Class: SMS
Description: This class extends Message and adds implementation details required for sending sms messages
SuperClass: Message
Attributes:
Methods:
override setAddressee: void
Class: FriendsList
Description: This class contains collection of Friends and thus several instances of classes on mobile device side can be managed and browsed
SuperClass:
Attributes:
Friends: Collection<Friend>
Length: int
Methods:
getFriendAt(int x)
getNext()
hasMore()
Class: Friend
Description: This class is bean-styled, so it contain only fields and getters and setters for them.
SuperClass:
Attributes:
email: String
name: String
forename: String
friendshipLevel
Methods:
Class: User
Description: This is the main class that contains both bookmarks and Friends. Moreover, sending emails is provided.
SuperClass:
Attributes:
Friends: FriendsList
Directories: Collection<Directory>
Methods:
send(Message message)
Package: org.foafrealm.soa
Packages containing classes responsible for SOA layer realization.
Class: SOAResource
Description: Class is SOA layer wrapper for FOAFRealm services.
Attributes:
Methods: (essential, business model involved)
login(user,password)
getProfie()
setProfile()
getFriends(user)
addFirend(user)
editFriend(user,friend)
removeFriend(user,friend)
getBookmarsk(user)
getDirectories(user)
addDirectory(user)
addBookmark(user,bookmark)
editBookmark(user,bookmark)
removeBookmark(user,bookmark)
Package: org.digime.sscf
Package containing classes responsible for implementing Semantic Social Collaborative Filtering in J2ME application.
Class: Directory
Description:
Class implements XFoafDomain, from FOAFRealm, which describes domain of user interest, collection of resources and links to resources. Directory is semantically described using wordNet and DDC classifications.
Attributes:
userId
description
wordnetValue
DDCValue
Methods:
Class: Bookmark
Description:
Class implements XFoafSscfResource from FOAFRealm, which describes the resource in domain of interest.
Attributes:
domainId
description
value
Methods:
Classes Person, XFoafDomain, XFoafSscfResource, XFoafResource have been already implemented, changing their implementation is out of our scope. We are going only to expose them through SOA.
Statecharts Diagrams
Business classes
Most of the business classes have not complex states. They usually have only two states, and statecharts are not included into this documentation, except one diagram. We present the example of business class statechart - User class state diagram.
Implementation class
As implementation class we understand the main j2me application class. It will display all the forms, messages and invoke all the business classes.
Component diagrams
This diagram shows dependences between modules. The most important module is main module that controls GUI and network module. From the application perspective, SOA Interface is the most important FOAFRealm server side part.
Deployment diagrams
The deployment diagram contains three components. The Mobile Device component represents device that can run executable files implemented in J2ME. FOAFRealm server uses J2EE and takes advantage of SOA, which enable us to combine different environments like J2EE and J2ME. Moreover, it is possible to change the Mobile Device component by means of client written in other languages like PHP or .Net. The third component is database. The data will be stored as RDF triples. FOAFRealm server will extensively use XFOAF profiles that are stored in the database.



