19
http://www.hull.ac.uk/esig/cree/index.html CREE Contextual Resource Evaluation Environment Stewart Waller [email protected] (Archaeology Data Service, University of York) Portals and Portlets 2006: Portlet development for the CREE project

Http:// CREE Contextual Resource Evaluation Environment Stewart Waller [email protected] (Archaeology Data Service,

Embed Size (px)

Citation preview

Page 1: Http:// CREE Contextual Resource Evaluation Environment Stewart Waller sjw143@york.ac.uk (Archaeology Data Service,

http://www.hull.ac.uk/esig/cree/index.html

CREEContextual Resource Evaluation Environment

Stewart [email protected]

(Archaeology Data Service, University of York)

Portals and Portlets 2006:

Portlet development for the CREE project

Page 2: Http:// CREE Contextual Resource Evaluation Environment Stewart Waller sjw143@york.ac.uk (Archaeology Data Service,

The CREE project arose from the Joint Information Systems Committee programme: Portals: Investigations into User Requirements

• Assess, test and document user requirements

• for Internet-based search tools

• both through their native interfaces

• and embedded within portal and non-portal environments

• in a broad range of user contexts.

http://www.hull.ac.uk/esig/cree/index.html

CREEContextual Resource Evaluation Environment

BACKGROUND:

Project Aims:

Page 3: Http:// CREE Contextual Resource Evaluation Environment Stewart Waller sjw143@york.ac.uk (Archaeology Data Service,

http://www.hull.ac.uk/esig/cree/index.html

CREEContextual Resource Evaluation Environment

HEIRPORT : Historic Environment Information Resources Portal

Page 4: Http:// CREE Contextual Resource Evaluation Environment Stewart Waller sjw143@york.ac.uk (Archaeology Data Service,

http://www.hull.ac.uk/esig/cree/index.html

CREEContextual Resource Evaluation Environment

HEIRPORT : Zava(x) Framework

Page 5: Http:// CREE Contextual Resource Evaluation Environment Stewart Waller sjw143@york.ac.uk (Archaeology Data Service,

http://www.hull.ac.uk/esig/cree/index.html

CREEContextual Resource Evaluation Environment

Portlet to replace the Servlet Interface

Zava Server

Web browser

Zavax Client (Mediation + Transformation)

Page 6: Http:// CREE Contextual Resource Evaluation Environment Stewart Waller sjw143@york.ac.uk (Archaeology Data Service,

http://www.hull.ac.uk/esig/cree/index.html

CREEContextual Resource Evaluation Environment

Cocoon outputs plain XML

Zavax Client (Mediation)

Web browser

Zava Server

Page 7: Http:// CREE Contextual Resource Evaluation Environment Stewart Waller sjw143@york.ac.uk (Archaeology Data Service,

http://www.hull.ac.uk/esig/cree/index.html

CREEContextual Resource Evaluation Environment

Portlet to communicate directly with Zavax Mediation

Portal Environment

PortletPortlet

Portlet Portlet

Zava ServerZavax Client (Mediation)

Page 8: Http:// CREE Contextual Resource Evaluation Environment Stewart Waller sjw143@york.ac.uk (Archaeology Data Service,

http://www.hull.ac.uk/esig/cree/index.html

CREEContextual Resource Evaluation Environment

Portlet to communicate directly with Zavax Mediation

Portal Environment

PortletPortlet

Portlet Portlet

Zava ServerZavax Client (Mediation)

Portal Environment

PortletPortlet

Portal Environment

Portlet Portlet

Page 9: Http:// CREE Contextual Resource Evaluation Environment Stewart Waller sjw143@york.ac.uk (Archaeology Data Service,

http://www.hull.ac.uk/esig/cree/index.html

CREEContextual Resource Evaluation Environment

HEIRPORT lite : implementation

Core functionality

• Exploited the portlet MVC design pattern:

• Model held in portlet session as Java bean

• processAction() acts as Controller to send/receive XML, updates model accordingly

• renderAction passes elements of model, styled using XSLT, to View JSP’s

Page 10: Http:// CREE Contextual Resource Evaluation Environment Stewart Waller sjw143@york.ac.uk (Archaeology Data Service,

http://www.hull.ac.uk/esig/cree/index.html

CREEContextual Resource Evaluation Environment

HEIRPORT lite : implementation

Extra functionality

• Notepad

• Export

• (rough) Inter Portlet Communication

Page 11: Http:// CREE Contextual Resource Evaluation Environment Stewart Waller sjw143@york.ac.uk (Archaeology Data Service,

http://www.hull.ac.uk/esig/cree/index.html

CREEContextual Resource Evaluation Environment

HEIRPORT lite : search

Step 1.The HEIRPORT framework is based upon the CIMI profile allowing for searches based on: What, Where, When, Who, Title, Location by coordinate etc.

However, for the purpose of this demonstrator, the portlet has been restricted to a simple What, Where and When search.

Step 2.HEIRPORT is based around a multi-threaded model allowing simultaneous Z39.50 searches across a number of different target datasets.

The option to choose which targets to query has thus been presented here.

Step 3. Pressing the start button begins the search query.

Page 12: Http:// CREE Contextual Resource Evaluation Environment Stewart Waller sjw143@york.ac.uk (Archaeology Data Service,

http://www.hull.ac.uk/esig/cree/index.html

CREEContextual Resource Evaluation Environment

HEIRPORT lite : retrieve

Depending on the speed of the various remote targets, the user is eventually forwarded to the target summary screen.

At this point, the user can decide to fetch the records from a particular target. The number of ‘records returned’ and ‘results per page’ can be configured in the user preferences screen.

Page 13: Http:// CREE Contextual Resource Evaluation Environment Stewart Waller sjw143@york.ac.uk (Archaeology Data Service,

http://www.hull.ac.uk/esig/cree/index.html

CREEContextual Resource Evaluation Environment

HEIRPORT lite : present

After HEIRPORT lite has fetched records from a particular target, the user is taken to the results screen as shown here.

The query trail is maintained across the top of the results listing.

Simple paging links are included.

At this point, the user can select several records and choose to add them to the notepad using the ‘update notepad’ button.

Alternatively, the user can choose to view more detailed information for a particular record by clicking on the title of a particular record.

Page 14: Http:// CREE Contextual Resource Evaluation Environment Stewart Waller sjw143@york.ac.uk (Archaeology Data Service,

http://www.hull.ac.uk/esig/cree/index.html

CREEContextual Resource Evaluation Environment

HEIRPORT lite : detail

The record details screen provides more information for the particular record.

The information here is based upon whatever details the target database contains for that record. Thus, certain records may be sparse whilst others may contain rich information across a number of different fields.

The fields are largely based upon the Dublin Core metadata standard.

When spatial information is available, a simple map is generated showing the position of the record as a red spot. Also links to various external mapping services are presented.

Page 15: Http:// CREE Contextual Resource Evaluation Environment Stewart Waller sjw143@york.ac.uk (Archaeology Data Service,

http://www.hull.ac.uk/esig/cree/index.html

CREEContextual Resource Evaluation Environment

HEIRPORT lite : notepad

Throughout the session, records can be added to the notepad. This acts in much the same way as a typical web-based shopping cart system. That is, the user can add and remove records as he/she sees fit.

Using this cart-based system, the user can aggregate information from various searches across different datasets.

The ability to export the contents of the notepad in a number of different formats has also been included – although at this point only XML is available as the chosen output format.

Page 16: Http:// CREE Contextual Resource Evaluation Environment Stewart Waller sjw143@york.ac.uk (Archaeology Data Service,

http://www.hull.ac.uk/esig/cree/index.html

CREEContextual Resource Evaluation Environment

HEIRPORT lite : (rough) inter portlet communication

• JSR-168 has no direct support for Inter Portlet Communication

• IBM’s ‘click-to-action’ (C2A) cooperative portlet technology found in recent versions of the WebSphere portal API is a good example of how future IPC can be implemented as brokered portlet messaging

code to declare portlet extension: if(ses.getAttribute("extMap")==null) { // create ActionURL() for this portlet PortletURL mapURL = res.createActionURL();

// store PortletURL in portlet session with application scope ses.setAttribute("mapURL", mapURL, PortletSession.APPLICATION_SCOPE);

// flag portlet is running ses.setAttribute("extMap", "running", PortletSession.APPLICATION_SCOPE); }

Using the portlet session to communicate between two portlets in the SAME portlet application:

Objects can be stored in either the PORTLET_SCOPE or the APPLICATION_SCOPE.

So we can create and store a PortletURL object within the APPLICATION_SCOPE

Page 17: Http:// CREE Contextual Resource Evaluation Environment Stewart Waller sjw143@york.ac.uk (Archaeology Data Service,

http://www.hull.ac.uk/esig/cree/index.html

CREEContextual Resource Evaluation Environment

code to retrieve and amend PortletURL:

// declare a new PortletURL PortletURL detailLink;

// is Map Extension running? if (ses.getAttribute("extMap")!=null) { // copy the mapURL from the session object detailLink=(PortletURL)ses.getAttribute("mapURL"); } else { // use default PortletURL detailLink=res.createActionURL(); }

// amend URL with various action parameters detailLink.setParameter("mode", "details"); detailLink.setParameter("record", recordID);

• JSR-168 has no direct support for Inter Portlet Communication

• IBM’s ‘click-to-action’ (C2A) cooperative portlet technology found in recent versions of the WebSphere portal API is a good example of how future IPC can be implemented as brokered portlet messaging

HEIRPORT lite : (rough) inter portlet communication

Once a PortletURL has been stored in the APPLICATION_SCOPE,

Any portlet within the same portlet application can retrieve this as a handle to the specific portlet action method.

Not dynamic – portlet actions can only be triggered by clicking on the link rather than by an event

Page 18: Http:// CREE Contextual Resource Evaluation Environment Stewart Waller sjw143@york.ac.uk (Archaeology Data Service,

http://www.hull.ac.uk/esig/cree/index.html

CREEContextual Resource Evaluation Environment

WSRP: web services for remote portlets

• Used WSRP-4J – Apache Portals Project

• Encountered various issues:

• Portlet preferences locked to either WSRP or Pluto depending on which was called first

• Images didn’t always come through

• Portlet URL didn’t always generate correctly

• WSRP-4J not yet final – still in incubator status

Page 19: Http:// CREE Contextual Resource Evaluation Environment Stewart Waller sjw143@york.ac.uk (Archaeology Data Service,

http://www.hull.ac.uk/esig/cree/index.html

CREEContextual Resource Evaluation Environment

Questions ?

End.