# $Id: data2.d2m,v 1.1 2007-01-26 12:59:05 mike Exp $

# Simple sample resource database for Keystone Resolver.
# This is largely derived from descriptions in ../doc/data-model
#
# This is in data-to-MySQL (d2m) format: see data2mysql.pl

*genre=tag,name
# "tag" is used for OpenURLs that have no value for rft.genre
journal,Journal		# from the journal mformat
book,Book		# from the book mformat
conference,Conference	# from the journal/book mformats
article,Article		# from the journal mformat
preprint,Preprint	# from the journal mformat
proceeding,Proceeding	# from the journal/book mformats
bookitem,Book Item	# from the book mformat
issue,Issue		# from the journal mformat
unknown,[Unknown]	# from the journal/book mformats
report,Report		# from the book mformat
document,Document	# from the book mformat

*mformat=genre_id,name,uri
4,Journal,info:ofi/fmt:kev:mtx:journal
2,Book,info:ofi/fmt:kev:mtx:book
0,Patent,info:ofi/fmt:kev:mtx:patent			# no genres defined
0,Dissertation,info:ofi/fmt:kev:mtx:dissertation	# no genres defined
0,Scholarly Service,info:ofi/fmt:kev:mtx:sch_svc	# no genres defined
0,Dublin Core,info:ofi/fmt:kev:mtx:dc			# no genres defined

*service_type=tag,name,priority
# These tags MUST NOT CHANGE -- code switches on them
fulltext,Full Text,10
websearch,Web Search,60
bookstore,On-Line Book Store,40
holdings,Local Holdings,20
ill,Inter-Library Loan,30
citation,Citation,50
abstract,Abstract,15
authorsearch,Author Search,45
citeref,Abstract,25

*genre_service_type=genre_id,service_type_id
#   ###	This is nowhere near complete.  We only deal with articles,
#	books and proceedings.  By inspection of a single proceeding
#	ContextObject, http://www.openly.com/1cate/test/myeg.txt, it
#	seems that proceedings are more like books than articles
#	(e.g. they have ISBNs), so for now we just treat them as
#	books.  But we know this is inadequate.
4,1
4,2
4,4
4,5
4,6
4,7
4,8
4,9
2,2
2,3
2,4
2,5
2,6
2,8
2,9
6,2
6,3
6,4
6,5
6,6
6,8
6,9

*identity=name,level,parent_id
Mike Taylor,person,2
Index Data,organisation,
Someone from Azle,person,4
Azle Public Library,library,5
TSLAC,consortium,

*credentials=service_id,identity_id
3,1	# Mike Taylor's access to Science Magazine's service
5,3	# Someone in Azle has access to EBSCO, if we can figure out how

*credentials_details=credentials_id,name,value
1,name,user
1,pass,waft-alone
2,name,user
2,pass,Seymour-write
2,referrer,http://www.texshare.edu/azle/

*sid=tag,recipe
### This example is totally made up.  We can do better.
MikeId,http://z3950.org/resolveMikeId?id=%i

*source=sid_id,name,url,encoding
### This example is totally made up.  We can do better.
1,Secret Source,http://ss.z3950.org/,iso-8859-1

*config=name,value
logfile,/tmp/kr.log
verbosity,2

*domain=domain,status
google.com,2
amazon.co.uk,0
ldap.caltech.edu,1

*provider=name,priority,contact
Keystone Reference Renderer,200,keystone@indexdata.com
American Association for the Advancement of Science,20,The AAAS President
EBSCO,30,ebsco@miketaylor.org.uk
Google,100,admin@google.com
Alltheweb,100,admin@alltheweb.com
AltaVista,100,admin@altavista.com
Virtual Provider of Nice Papers,10,mike@indexdata.com
Amazon,50,admin@amazon.com
BioOne,10,madeupaddress@bioone.org
Gale,10,madeupaddress@galegroup.com
Elsevier,10,j.paulik@elsevier.com

*service=service_type_id,provider_id,tag,name,priority,url_recipe,need_auth,auth_recipe,disabled
# -- Full-text --
#   ###	Until we get information from TDNet, our only sources of full
#	text are the individual palaeontology journals I know about.
#	This isn't great as it doesn't help us to test the ability of
#	a single service to resolve multiple journals.
1,7,APP,Acta Palaeontologica Polonica,10,,0,,0
1,7,,Proceedings - National Academy of Sciences USA,10,http://www.pnas.org/cgi/content/full/%v/%i/%p,0,,0
# Science Magazine offers free access to content a year older or more.
# %i is typically omitted from citations, but can probably be
# mechanically derived from %v and the date.
1,2,Science,Science Magazine Full Text,10,,1,,0
# We actually only have access to Paleontological Society abstracts at
# present, but the good news is this service provides two journals:
# _Paleobiology_ and _Journal of Paleontology_
1,7,,Paleontological Journals Online,20,http://www.psjournals.org/paleoonline/?request=get-abstract&issn=%I&volume=%03v&issue=%02i&page=%04p,0,,0
# Got this from http://RMN1021:TX76020@www.texshare.edu/azle/
# I don't think we have a way to use this
1,3,,EBSCO,30,http://search.epnet.com/Login.aspx?authtype=url%%2cip%%2cuid&profile=ehost&defaultdb=aph,0,,0

*service=service_type_id,provider_id,tag,name,priority,url_recipe,need_auth,auth_recipe,disabled
# -- Web Search --
2,4,,Google,10,http://www.google.com/search?q=%%22%t%%22,0,,0
2,5,,Alltheweb,20,http://alltheweb.com/search?q=%%22%t%%22,0,,0
2,6,,AltaVista,30,http://www.altavista.com/web/results?q=%%22%t%%22,0,,0

*service=service_type_id,provider_id,tag,name,priority,url_recipe,need_auth,auth_recipe,disabled
# -- ILL requests --
# No idea how to handle ILL Requests

*service=service_type_id,provider_id,tag,name,priority,url_recipe,need_auth,auth_recipe,disabled
# -- Holdings --
# No idea how to handle local holdings searches

*service=service_type_id,provider_id,tag,name,priority,url_recipe,need_auth,auth_recipe,disabled
# -- Citations --
# These are too complex to describe in a printf()-like little
# language, so the rendering code just switches on the tag.
6,1,JVP,JVP-style citation,10,,0,,1
6,1,APP,APP-style citation,20,,0,,0

*service=service_type_id,provider_id,tag,name,priority,url_recipe,need_auth,auth_recipe,disabled
# -- Abstracts --
7,2,ScienceAbstracts,Science Magazine Abstracts,10,,0,,0

*service=service_type_id,provider_id,tag,name,priority,url_recipe,need_auth,auth_recipe,disabled
# -- Author Search --
8,4,,Google,10,http://www.google.com/search?q=%%22%A %a%%22,0,,0

*service=service_type_id,provider_id,tag,name,priority,url_recipe,need_auth,auth_recipe,disabled
# -- On-line book store --
3,8,,Amazon.com,10,http://www.amazon.com/exec/obidos/ASIN/%*{isbn}/thedinosaurrea0a,0,,0

*service=service_type_id,provider_id,tag,name,priority,url_recipe,need_auth,auth_recipe,disabled
# -- Miscellaneous --
# Various bits and pieces which must come at the end of the list so as
# not to disturb the ordering, hence IDs referred to in the
# service_serial table.
7,9,,BioOne,10,http://www.bioone.org/bioone/?request=get-document&issn=%{issn}&volume=%03{volume}&issue=%02{issue}&page=%04{spage},0,,0
1,10,Infotrac,Gale Infotrac,10,,0,,0
6,1,Endnote,Endnote-style citation,20,,0,,1
9,1,,Endnote citation,15,%{THIS}&svc_dat=indexdata:citation:Endnote,0,,0
6,1,author,Author and year,20,,0,,0
# Elsevier is number 19
1,11,Elsevier,Elsevier,10,,0,,0

*serial=name,issn
Acta Palaeontologica Polonica,0567-7920
Proceedings - National Academy of Sciences USA,0027-8424
Science Magazine,1095-9203
Paleobiology,0094-8373 
Journal of Paleontology,0022-3360
Journal of Vertebrate Paleontology,0272-4634
Annales de Paléontologie,0753-3969

*serial_alias=serial_id,alias
1,Acta Paleontologica Polonica
2,PNAS
3,Science
4,Palaeobiology
5,JP
5,Journal of Palaeontology
6,Journal of Vertebrate Paleontology
6,JVP
7,Annales de Paleontologie

*service_serial=service_id,serial_id
1,1
2,2
3,3
4,4
4,5
11,3
14,6
15,3
19,1
19,7

