Version 5 (modified by grimnes, 19 years ago) (diff) |
---|
Adding new datasources to Gnowsis is easy, a new datasource needs to define at minimum three classes:
- A class implementing Aperture:DataSourceFactory
- A class implementing Aperture:CrawlerFactory a
- A class extending Gnowsis:ConfigPanel
The factory classes have to have constructors that take no parameters, so that we can instantiate them with class.newInstance().
Pack these classes up in a jar, write a sensible manifest and put them in ~/.gnowsis-beta/datasources
An example MANIFEST.MF:
Manifest-Version: 1.0 Created-By: 1.4.2_09 (Apple Computer, Inc.) Gnowsis-DS-CrawlerFactory: org.gnowsis.data.datasource.rss.RSSCrawlerFactory Gnowsis-DS-DataSourceFactory: org.gnowsis.data.datasource.rss.RSSDataSourceFactory Gnowsis-DS-ConfigPanel: org.gnowsis.data.datasource.rss.RSSConfigPanel Gnowsis-DS-Icon: /org/gnowsis/data/datasource/rss/rssicon.png Gnowsis-DS-Label: RSS Datasource Gnowsis-DS-Desc: A datasource for crawling RSS feeds.
Note that blank lines are not allowed.
!A quick guide to creating your own aperture datasource (in eclipse):
Here I will step through all the steps required to create a new aperture datasource and how to package it so that it can be used with gnowsis. I will create a datasource that wraps an RSS/Atom feed, and I will base it on rome.
- Create a new Eclipse project, copy the main aperture jar (mine is aperture-2006.1-alpha-2.jar) and the 3 sesame jars into the project and add them to the build-path.
- Create a new class that implements CrawlerFactory, tell Eclipse to add all unimplemented methods.
- Create a new class that implements DataSourceFactory, add unimplemented methods.
- Create a new class that extends DataSourceBase - create a public static URI called TYPE, and return this in the getType().
public static URI TYPE=new URIImpl("http://example.org/RSSDataSource");
- Create a new
Attachments (2)
- Picture 1.png (55.1 KB) - added by grimnes 19 years ago.
- Picture 2.png (50.2 KB) - added by grimnes 19 years ago.
Download all attachments as: .zip