1 click access to everything!

1Cate
About 1Cate
Hosted 1Cate
1Cate FAQ
OpenURL Basics
1Cate CrossRef Module
JournalSeek

for Developers

Security

Eric Hellman has written an essay on OpenURL and Security issues that every OpenURL developer would be wise to read.

JSText

1Cate is built on top of "JSText", an open-source dynamic text engine written in java. The 1Cate Dynamic Text package is a lightweight dynamic text generation system closely integrated with Java. It has the power of Cold Fusion and is designed for speed, easy generation of dynamic URL's and object oriented web design.By implementing the com.openly.dt.DynamicTag interface, users can easily extend the capability of Dynamic Text templates to do almost anything imaginable.

OpenURL Referrer

OpenURL Referrer is an open-source plugin for firefox that adds OpenURL links to resources like Google Scholar.

XML OpenURL metadata formats

One of the really exciting possibilities made possible by the new XML capabilities of OpenURL is the use of subject-specific metadata formats. We envision an environment where OpenURL links could be made for all sorts of objects of interest to researchers. For example, there could be a metadata format for species, for genome fragments, for chemical compounds, for scriptural references, for legal citations... the list goes on and on.

In order to make this a reality, it needs to be easy to add new and specialized metadata formats to a variety of link servers. In this note, I describe how support for xml metadata formats can be added to 1Cate. By describing this process and making relevant pieces available for free use in other resolvers, we hope to encourage the development and implementation of new metadata formats.

First, a word about the data model internal to 1Cate. 1Cate uses a flat data model, with a rather large space of parameter names, each of which can acquire a value from a default file, from the query string, from a user cookie, or from various data processing operations.

When 1Cate encounters a reference to xml metadata, it first checks the metadata format to see whether it has a "handler" for the format. The "handler" is an XSLT document specifiying a transformation of the xml metadata into an xml format with a flat data model which 1Cate processes natively. The "Flat" xml schema uses attributes for both the parameter names and values so that it does not need to be changed to accompdate a new format.

The "Flat" xml schema and an xslt transformation of the NISO OpenURL "Journal" format (info:ofi/fmt:xml:xsd:journal) to Flat is available at http://nj.oclc.org/ofi/fmt/xml/xsd/Flat and http://nj.oclc.org/1Cate/jo-info-2-flat.xsl As you'll be able to see, these are pretty simple.

Once 1Cate has parsed the data into its data object, it then renders a response page using an html template selected based on the metadata format. So in order to add a metadata format, either a new response template must be generated, or an existing response template must be associated with the metadata format.

An example of a response page (for patents) is here. Data parameters are placed by parsed name onto the template using double-square bracket delimited tags. for example, "[[inventor]]" in the patent template is replaced by the inventor's name as given in the source data, while [[%inventor]] would be replaced by the URL-encoded inventor name.

OpenURL developers using Java should take a closer look at the "com.openly.util.Params" class, which is the base class for 1Cate's data object, and the com.openly.dt package, which does the dynamic text rendering in 1Cate. The com.openly.util.Params class and com.openly.dt package are available as Open Source with a free license. (see above)

Encore URL Cart

We're pleased to be able to release our EnCoRe URL cart software as open source. We think it's a pretty cool thing to do with OpenURL link-servers and it has potentially huge implications for Virtual Learning Environments (VLE) and Learning Object repositories.

A bit of background will help you understand the point of the URL cart.

Suppose you want to make it easy for a faculty member to build electronic course material based on "objects" in your library. The course material could be a list of journal articles on a specific topic, or perhaps a book chapter, or anything, really. A learning object wraps the digital object with metadata related to its uses in instruction and might associate the object with a set of instructional activities.

OpenURL provides a unique opportunity to assist the faculty member in the collection of digital objects from a library. Because the method is similar in many ways to the e-commerce "shopping carts" that are familiar to users, we thought of this as a URL "shopping" cart. The method we chose to implement the cart can be used on just about any web page, but when used with an OpenURL linkserver, the effect is transformative. With just a few clicks, a user can import URLs from just about any OpenURL enabled resource and make it available to a VLE system in a way that helps make the object portable between one institution and another.

Here's how it works. A small javascript is placed on the response page of a link server. For most users, the javascript has no effect and is invisible. For a user that has logged into a VLE authoring system, the javascript causes a "Add to Cart" button to display on the link-server response screen. when this button is clicked, the (Open)URL of the is loaded into a database and associated with the user. The user can then manipulate the list of (Open)URLs, begin to add instructional metadata to the (Open)URLs, or continue "shopping". The VLE system can access the list of urls directly from the database.

The application we're releasing implements the cart functions and shows how to do all the tricky parts. As you'll see, the result is almost magical. Our application does not implement any functions dealing with Learning object metadata, nor does it implement any authentication. These can be done by extending our classes and overwriting the appropriate methods.

The EnCoRe enabling of a link-server can be done with a tiny snippet of html, and should work with ANY OpenURL resolver.

DEMO

For a demo of the EnCoRe URL cart, try this OpenURL:
http://isi.1cate.com/?genre=article&issn=1064-4318&title=Brandweek&atitle=The+ lesson+does+not+compute.&aulast=Janoff&aufirst=Barry&date=2003-09-15&volume=44& issue=33&spage=40&sid=Gale%3AExpanded+Academic+ASAP

You should not see the "add this item to My Links" link.

Next "Log In" to the Cart system at
http://trial.1cate.org/encore/index.html

There is no password checking on this system (it's a demo!) so it doesn't matter what you enter, and don't expect any privacy.

Now try this openURL for the same item:
http://trial.1cate.org/?genre=article&issn=1064-4318&title=Brandweek&atitle=The+ lesson+does+not+compute.&aulast=Janoff&aufirst=Barry&date=2003-09-15&volume=44& issue=33&spage=40&sid=Gale%3AExpanded+Academic+ASAP&

You'll see that you now have an "add this item to My Links" link. (If you don't, you might have to option-reload if you have something stuck in your cache)play on as you like.

SOFTWARE

The EnCoRe URL Cart is packaged as a java servlet webapp. It makes use of Openly's JSText dynamic text engine (see above), along with our com.openly.servlet package which be included in the next JSText release. It is prepackaged for use with Apache TomCat and MySQL, but can also be used with any servlet engine and JDBC capable databases such as Oracle. We use the bitmechanic connection pooler for performance.

CREDITS

Our work on the EnCoRe URL cart was funded in part by Joint Information Systems Committee (JISC) and would not have occurred without the inspiration and creativity of the EnCoRe team at the University of Derby in England, including Melanie Keady, Charles Shields, Juliet Szondi, Linda Swanson, Glenn Handley, Ros Doig, Daniel Owen-McGee, Matt Keehan and Sally Rimmer.

INSTALLATION

installing the EnCoRe Cart webapp
  1. Download the encore cart distribution from http://read.openly.com/encore/encorewebapp052.zip (505KB)
  2. copy the "encore" directory to your webapps directory
  3. Make this database in your database
    create table encore.mylinks (mylinks_id int not null auto_increment,
                category_id varchar(20),user_id varchar(20),url text,
                primary key(mylinks_id)); 
  4. Customize the following in encore/WEB-INF/properties/encore.properties
    Encore.dbURL=Encore.username=Encore.password=Encore.baseURL=
    (if not using mySQL, change the Driver class property, too)
  5. Enter the host and library name where you're installing the Cart service in encore/WEB-INF/properties/encoreParams.properties
  6. (If using Oracle, add the Oracle classes (classes12.jar) to encore/WEB-INF/lib/ )
  7. Replace 127.0.0.1 with the new host on the encore/index.html and encore/buttonLoader.js files
  8. Add this to any web page you want to "encore-enable"<script src="http://<your host>:8080/encore/buttonLoader.js"></script>
  9. restart your servlet engine
  10. login at http://<your host>:8080/encore/index.html
  11. customize html in the files in encore/WEB-INF/templates/
  12. Visit any encore-enabled page and add urls to your cart as desired.

FOR PROGRAMMERS

package uk.ac.derby.encore version 0.5
encore-cart05.jar 19741 bytes
there are three classes in this package

Cart.java
is the main servlet class.
the init method uses GlobalSettingsResolver to load servlet properties file and default params.
the doGet method loads params from the query string. The "action" param determines the action and a result template to use.

URLCart.java
handles all interaction with the database. It gets initialize with the following properties:

  • Encore.dbURL - jdbc url
  • Encore.username - sql user name
  • Encore.password - sql password
  • Encore.database - sql database containing the URL Cart table
  • Encore.tableName - the name of the table containing the URL Cart table
  • Encore.baseURL - the local OpenURL baseURL
  • Encore.sqlDriver - the SQL driver class to use
  • Encore.userColName - the name of the column containing the user identifiers - default "userid"
  • Encore.urlColName - the name of the column containing the urls - default "url"
  • Encore.typeColName - the name of the column containing the url types - default "type"
  • Encore.idColName - the name of the column containing the url record id - default "id"

SavedURL.java
is an immutable object that represents the URL in the database, with a constructor and accessor methods for type and id and some String accessors for the url itself. On interesting method is the public boolean isOpenURL(String base) which has some simple logic that judges whether a URL is an OpenURL.

SUMMARY

Please let us know if you encounter difficulties. We can't make any promises (unless of course you pay us), but we'd love to see this get put to use in as many places as possible.

About 1Cate    Hosted 1Cate    1Cate FAQ    OpenURL Basics    CrossRef    OpenURL Referrer Plugin    JournalSeek    


1Cate    for Developers    for Publishers    News    About Us


© 1999-2006, OCLC, Inc.