GitLab oppdateres til siste versjon den 21.08.2019 ifra 08:00/08:30. Oppdatering estimert til å ta omtrent 20/30+ minutter.

Commit 23f0ff82 authored by Ricco Førgaard's avatar Ricco Førgaard

Removed some external dependencies in tests. Now all tests but...

Removed some external dependencies in tests. Now all tests but OaiPmhServletTest should be independant of the API and a running Nesstar server.
Managed to get log4j going when running tests from Maven which makes the output a lot cleaner.
parent 87265caf
......@@ -102,5 +102,14 @@
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>${basedir}</directory>
<filtering>false</filtering>
<includes>
<include>*.txt</include>
</includes>
</resource>
</resources>
</build>
</project>
</project>
\ No newline at end of file
......@@ -4,15 +4,12 @@ import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Date;
import java.util.Map;
import nesstar.api.common.EGMSResource;
import org.apache.log4j.Logger;
import com.nesstar.oaipmh.NesstarServer;
import com.nesstar.oaipmh.controller.OAIRequest;
import com.nesstar.oaipmh.controller.RequestParser;
import com.nesstar.oaipmh.exceptions.IdDoesNotExistException;
import com.nesstar.api.NesstarObject;
......@@ -32,7 +29,7 @@ public class GetRecordResult extends OAIResult {
private void fetchResource() throws Exception {
try {
URL url = new URL(identifier);
payload = NesstarServer.getNesstarDB().lookup(url);
payload = retriveResourceFromServer(url);
if (payload == null) {
logger.fatal("Resource does not exist: " + identifier);
throw new IdDoesNotExistException(identifier);
......@@ -66,4 +63,8 @@ public class GetRecordResult extends OAIResult {
public boolean isEGMS() {
return payload instanceof EGMSResource;
}
protected NesstarObject retriveResourceFromServer(URL url) throws IOException, Exception {
return NesstarServer.getNesstarDB().lookup(url);
}
}
package com.nesstar.oaipmh.result;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.log4j.Logger;
import com.nesstar.api.*;
import com.nesstar.api.Catalog;
import com.nesstar.api.NesstarList;
import com.nesstar.api.Study;
import com.nesstar.oaipmh.NesstarServer;
import com.nesstar.oaipmh.util.Properties;
......@@ -52,13 +54,13 @@ public class IdentifyResult extends OAIResult {
public Date getEarliestDateStamp() throws Exception {
//TODO: caching her? JA! Kanskje tilogmed sjekk ved server startup...
if (earliestDate == null) {
NesstarList<Catalog> catalogs = NesstarServer.getServer().getCatalogs();
List<Catalog> catalogs = getCatalogsFromServer();
searchCatalogAndSetEarliestDate(catalogs);
}
return earliestDate;
}
protected void searchCatalogAndSetEarliestDate(NesstarList<Catalog> catalogs) {
protected void searchCatalogAndSetEarliestDate(List<Catalog> catalogs) {
if (catalogs.size() == 0) {
return;
}
......@@ -94,4 +96,14 @@ public class IdentifyResult extends OAIResult {
public String getCompression() {
return compression;
}
protected List<Catalog> getCatalogsFromServer() {
List<Catalog> catalogs = new ArrayList<Catalog>();
try {
catalogs = NesstarServer.getServer().getCatalogs();
} catch (Exception e) {
logger.error(e);
}
return catalogs;
}
}
......@@ -27,7 +27,7 @@ public class ListIdentifiersResult extends OAIResult {
}
}
private List<Study> getAllStudies() throws Exception {
protected List<Study> getAllStudies() throws Exception {
return NesstarServer.getServer().getStudies();
}
......
......@@ -27,7 +27,7 @@ public class DdiRecordBuilder extends GetRecordXmlBuilder {
}
protected MetadataType buildMetadata() throws Exception {
study = (Study) ((GetRecordResult) result).getNesstarObject();
study = getStudyFromResult();
xmlDocument = getDDIdocumentFromStudy(study);
MetadataType metadataType = new MetadataType();
metadataType.setAny(xmlDocument.getDocumentElement());
......@@ -37,7 +37,7 @@ public class DdiRecordBuilder extends GetRecordXmlBuilder {
protected Document getDDIdocumentFromStudy(Study study) throws Exception {
Document document = null;
try {
InputStream stream = study.getDDI().getStream();
InputStream stream = getInputStreamFromStudy(study);
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
document = builder.parse(stream);
......@@ -54,4 +54,11 @@ public class DdiRecordBuilder extends GetRecordXmlBuilder {
return document;
}
protected Study getStudyFromResult() {
return (Study) ((GetRecordResult) result).getNesstarObject();
}
protected InputStream getInputStreamFromStudy(Study study) throws IOException {
return study.getDDI().getStream();
}
}
......@@ -117,9 +117,9 @@ public abstract class OAIXmlBuilder {
return dateToXMLGregorianCalendar(today);
}
protected XMLGregorianCalendar dateToXMLGregorianCalendar(Date today) {
protected XMLGregorianCalendar dateToXMLGregorianCalendar(Date someDate) {
GregorianCalendar calendar = new GregorianCalendar(TimeZone.getTimeZone(TIME_ZONE));
calendar.setTime(today);
calendar.setTime(someDate);
XMLGregorianCalendar xmlCalendar = null;
try {
xmlCalendar = DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar);
......
# This sets the global logging level and specifies the appenders
log4j.rootLogger=rolling, myConsoleAppender
# settings for the console appender
log4j.appender.myConsoleAppender=org.apache.log4j.ConsoleAppender
log4j.appender.myConsoleAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.myConsoleAppender.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
log4j.rootLogger=rolling
log4j.appender.rolling=org.apache.log4j.RollingFileAppender
log4j.appender.rolling.File=${jboss.server.log.dir}/oaipmh.log
log4j.appender.rolling.MaxFileSize=1024KB
log4j.appender.rolling.MaxBackupIndex=7
log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
log4j.appender.rolling.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
\ No newline at end of file
log4j.appender.rolling.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
......@@ -145,7 +145,7 @@ public class OaiPmhServletTest {
assertEquals("en", language);
String relation = engine.evaluate("//OAI-PMH/GetRecord/record/metadata/dc/relation", document);
assertEquals("relation not implemented", relation); //TODO
assertEquals("", relation); //TODO Relation not yet implemented
String coverage = engine.evaluate("//OAI-PMH/GetRecord/record/metadata/dc/coverage", document);
assertEquals("Thu Jan 01 00:00:00 CET 1987", coverage);
......
package com.nesstar.oaipmh.mock;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Calendar;
import java.util.Date;
import java.util.EnumSet;
import java.util.GregorianCalendar;
import java.util.TimeZone;
import com.nesstar.api.DdiElement;
import com.nesstar.api.DdiList;
import com.nesstar.api.FileFormat;
import com.nesstar.api.ResultStream;
import com.nesstar.api.VarGroup;
import com.nesstar.api.Variable;
import com.nesstar.api.analysis.Metric;
import com.nesstar.api.analysis.Slice;
import com.nesstar.api.filter.CaseSubset;
public class StudyMock implements com.nesstar.api.Study {
public String getLabel() {
return "mock label";
}
public Date timeStamp() {
final GregorianCalendar calendar = new GregorianCalendar(2011, Calendar.JUNE, 24, 11, 49, 23);
calendar.setTimeZone(TimeZone.getTimeZone("UTC"));
return calendar.getTime();
}
public URL toURL() {
return null;
}
@Override
public DdiElement getElement(String path) {
return null;
}
@Override
public DdiList<Variable> getVariables() {
return null;
}
@Override
public DdiList<VarGroup> getVarGroups() {
return null;
}
@Override
public ResultStream download(FileFormat format, CaseSubset filter,
Variable... varSubset) throws IOException {
return null;
}
@Override
public ResultStream getDDI() throws IOException {
File ddixmlfile = new File("./src/test/resources/data/ddi.xml");
InputStream inputStream = new FileInputStream(ddixmlfile);
return new ResultStream("text/xml", inputStream);
}
@Override
public Slice tabulate(CaseSubset filter, Variable measureVar,
Variable[] weightVars, EnumSet<Metric> metrics, Variable... breakVars)
throws IOException {
return null;
}
}
package com.nesstar.oaipmh.xml;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.*;
import javax.xml.datatype.XMLGregorianCalendar;
import org.junit.Test;
import com.nesstar.oaipmh.result.GetRecordResult;
import com.nesstar.oaipmh.xml.oaipmh.HeaderType;
import com.nesstar.oaipmh.xml.oaipmh.RecordType;
public class DdiRecordBuilderTest extends GetRecordXmlBuilderTest {
private static final String TIMESTAMP = "2011-06-24T11:49:23+0000";
@Test
public void buildDDiXML() throws Exception {
GetRecordResult result = initResult("http://nesstar-nightly.nsd.uib.no:80/obj/fStudy/demo!gor");
String identifier = "http://example.com/identifier";
GetRecordResult result = initResult(identifier);
DdiRecordBuilder builder = new DdiRecordBuilder(result);
assertNotNull(builder.buildHeader());
assertNotNull(builder.buildRecord());
HeaderType headerType = builder.buildHeader();
assertEquals(identifier, headerType.getIdentifier());
assertEquals(TIMESTAMP, headerType.getDatestamp());
RecordType recordType = builder.buildRecord();
assertNotNull(recordType.getMetadata());
builder.buildXML();
XMLGregorianCalendar date = builder.getResponseDate();
assertEquals(2011, date.getYear());
assertEquals(6, date.getMonth());
assertEquals(24, date.getDay());
assertEquals(11, date.getHour());
assertEquals(49, date.getMinute());
assertEquals(23, date.getSecond());
}
}
package com.nesstar.oaipmh.xml;
import java.io.IOException;
import java.net.URL;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Hashtable;
import java.util.Map;
import java.util.TimeZone;
import org.junit.Before;
import com.nesstar.api.NesstarObject;
import com.nesstar.oaipmh.mock.ServletConfigMock;
import com.nesstar.oaipmh.mock.StudyMock;
import com.nesstar.oaipmh.controller.GetRecordController;
import com.nesstar.oaipmh.result.GetRecordResult;
import com.nesstar.oaipmh.util.Properties;
......@@ -17,19 +25,19 @@ public abstract class GetRecordXmlBuilderTest {
Properties.init(new ServletConfigMock());
}
protected GetRecordResult initResult(String metadataPrefix) throws Exception {
GetRecordResult result = new GetRecordResult(metadataPrefix);
protected GetRecordResult initResult(String identifier) throws Exception {
GetRecordResult result = new GetRecordResult(identifier) {
protected NesstarObject retriveResourceFromServer(URL url) throws IOException, Exception {
return (NesstarObject) new StudyMock();
}
public Date getResponseDate() {
final GregorianCalendar calendar = new GregorianCalendar(2011, Calendar.JUNE, 24, 11, 49, 23);
calendar.setTimeZone(TimeZone.getTimeZone("UTC"));
return calendar.getTime();
}
};
result.setVerb("GetRecord");
return result;
}
protected GetRecordController initRequest(String metadataPrefix) throws Exception {
Map<String, String[]> arguments = new Hashtable<String, String[]>();
arguments.put("verb", new String[] { "GetRecord" } );
arguments.put("metadataPrefix", new String[] { metadataPrefix } );
arguments.put("identifier", new String[] { "http://nesstar-nightly.nsd.uib.no:80/obj/fStudy/demo!gor" } );
//arguments.put("identifier", new String[] { "http://129.177.92.208:8800/obj/fStudy/demo-gor" } );
return new GetRecordController(arguments);
}
}
<?xml version='1.0' encoding='UTF-8'?>
<codeBook version="1.2.2" ID="demo-gor" xml-lang="en" xmlns="http://www.icpsr.umich.edu/DDI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.icpsr.umich.edu/DDI http://www.icpsr.umich.edu/DDI/Version1-2-2.xsd">
<docDscr>
<citation>
<titlStmt>
<titl>
dataset
</titl>
</titlStmt>
<prodStmt>
<prodDate date="2002-01-14">
2002-01-14
</prodDate>
<software version="4.0.3" date="2011-04-04">
Nesstar Publisher
</software>
</prodStmt>
<distStmt>
<depositr/>
</distStmt>
</citation>
<docSrc>
<titlStmt>
<titl>
dataset
</titl>
</titlStmt>
<distStmt>
<depositr/>
</distStmt>
</docSrc>
</docDscr>
<stdyDscr>
<citation>
<titlStmt>
<titl>
Demo: Demonstration dataset
</titl>
<IDNo>
demo-gor
</IDNo>
</titlStmt>
<rspStmt>
<AuthEnty affiliation="UK Data Archive">
Ward, M.
</AuthEnty>
<AuthEnty affiliation="UK Data Archive">
Eastaugh, K.
</AuthEnty>
<othId role="A Role" affiliation="Some organisation">
<p>
Test Person
</p>
</othId>
</rspStmt>
<prodStmt>
<producer>
UK Data Archive
</producer>
<copyright>
Copyright 2011 Norwegian Social Science Data Services (NSD)
</copyright>
<prodDate date="2005-12-24">
2005-12-24
</prodDate>
<software version="4.0.3" date="2011-04-04">
Nesstar Publisher
</software>
<fundAg>
Economic and Social Research Council
</fundAg>
<fundAg>
University of Essex
</fundAg>
</prodStmt>
<distStmt>
<distrbtr abbr="UKDA" affiliation="University of Essex, Wivenhoe Park, Colchester, Essex, England, CO4 3SQ" URI="http://www.data-archive.ac.uk/">
UK Data Archive
</distrbtr>
<depositr affiliation="Nuffield College (Oxford)"/>
<depDate date="1989-02-10"/>
</distStmt>
</citation>
<stdyInfo>
<subject>
<keyword>
AGE
</keyword>
<keyword>
BRITISH POLITICAL PARTIES
</keyword>
<keyword>
GENDER
</keyword>
<keyword>
HOUSING TENURE
</keyword>
<keyword>
MARITAL STATUS
</keyword>
<keyword>
NEWSPAPER READERSHIP
</keyword>
<keyword>
RELIGIOUS DENOMINATION
</keyword>
<keyword>
SCOTLAND
</keyword>
<topcClas>
British Election Studies
</topcClas>
<topcClas>
Election and campaign studies
</topcClas>
</subject>
<abstract>
<![CDATA[This dataset has been created specifically for demonstration purposes only.
Selected variables were taked from the BES 1987 dataset and other, dummy variables were created for specific purposes, e.g. to demonstrate the use of 'Time' variables and for mapping.]]>
</abstract>
<sumDscr>
<timePrd date="1987-01-01" event="single"/>
<nation>
Great Britain national
</nation>
<geogCover>
Great Britain
</geogCover>
<anlyUnit>
Individuals
</anlyUnit>
<universe>
Voters in Great Britain.
</universe>
<dataKind>
The kind of data.
</dataKind>
</sumDscr>
</stdyInfo>
<method>
<dataColl>
<timeMeth>
Cross-sectional (one-time) study
</timeMeth>
<sampProc>
Nationally representative probability sample drawn from the Electoral Registers of England, Wales and Scotland (south of the Caledonian Canal).
</sampProc>
<collMode>
Face-to-face interview; Self -completion.
</collMode>
<sources>
<dataSrc>
A list of data sources.
</dataSrc>
</sources>
<weight>
The weighting variable is called WEIGHT. The data must be weighted to take account of regional differences in response rates.
</weight>
</dataColl>
</method>
<othrStdyMat>
<relMat>
This is related.
<citation>
<titlStmt>
<titl>
A related material
</titl>
</titlStmt>
<holdings URI="http://www.nesstar.com"/>
<notes>
A related note.
</notes>
</citation>
</relMat>
<relStdy>
Group constituents: 359, 422, 666, 681, 830, 1533, 1614, 2005, 2568, 2981, 2983, 3171, 3887-3891, 4000, 4028
<citation>
<titlStmt>
<titl>
Group: 33066
</titl>
</titlStmt>
</citation>
</relStdy>
<relStdy>
<![CDATA[1591 Welsh Election Study, 1979
1604 Scottish Election Study, 1979
2655 British Election Campaign Study, 1987
2920 Study of The Labour Party Membership, December 1989 - May 1990
3175 British Elections, 1963-1992
3588 British Election Studies Information System (BESIS), 1964-1992
4180 Welsh Assembly Election Study, 1999
33099 Political Change in Britain, 1963-1970
]]>
<citation>
<titlStmt>
<titl>
Other Related:
</titl>
</titlStmt>
</citation>
</relStdy>
<relStdy>
<![CDATA[Constituent Datasets:
British Election Study, February 1974. Cross-Section Survey (SN:359)
British Election Study, 1969, June 1970, February 1974.
Panel Survey (SN:422)
British Election Study, October 1974. Cross-Section Survey (SN:666)
British Election Study, October 1974.
Scottish Cross-Section Sample (SN:681)
British Election Study: EEC Referendum Survey, 1975 (SN:830)
British Election Study, May 1979. Cross-Section Survey (SN:1533)
British Election Study, February 1974, October 1974, June 1975, May 1979. Panel Survey (SN:1614)
British General Election Study, 1983. Cross-Section Survey (SN:2005)
British General Election Study, 1987. Cross-Section Survey (SN:2568)
British General Election Study, 1992. Cross-Section Survey (SN:2981)
British General Election Panel Study, 1987-1992 (SN:2983)
General Election in Scotland, 1992 (SN:3171)
British General Election Study, 1997. Cross-Section Survey (SN:3887)
British Election Panel Study 1992-1997 (SN:3888)
Scottish Election Survey, 1997 (SN:3889)
British General Election Study, 1997 : Campaign Panel (SN:3890)
British General Election Study, 1997 : Ethnic Minority Survey (SN:3891)
British Election Panel Study, 1983, 1986 and 1987 (SN:4000)
British Election Panel Study, 1997-2001. Waves 1, 2, 3, 4 and 5 (1997-2000) (SN:4028)
]]>
<citation>
<titlStmt>
<titl>
Group 33099: Political Change in Britain, 1963-1970
</titl>
</titlStmt>
</citation>
</relStdy>
<relPubl>
<![CDATA[British Election Study, (1974) "The British Election Study panel sample 1974: methodological study", June.
British Election Study, (1974) "The British Election Survey: technical document", July.
Crewe, I., Sarlvik, B. and Alt, J., (1974) `The why and how of the February voting', "New Society", 12 September.
Crewe, I., Sarlvik, B. and Alt, J., (1974) "The flow of the vote 1970 February 1974 - October 1974".
Sarlvik, B., Crewe, I. and Alt, J., (1974) "Class and Party in the elections of 1974".
Crewe, I., Sarlvik, B. and Alt, J., "The decline of the two-party system", paper presented to Political Studies Association Conference, Oxford, March 1975.
British Election Study, (1975) "The British Election Study of October 1974: methodological report", April.
British Election Study, (1975) "The British Referendum Survey: a report on fieldwork for the Referendum Recall Study", August.
Fox, A., (1975) `Attitudes to immigration: a comparison of data from the 1970 and 1974 general election surveys', "New Community" Vol. IV (2), Summer.
Miller, W., (1975) Series of articles on the special Scottish surveys, "The Scotsman", October 10 and 12.
Sarlvik, B., et al, (1976) `Britain's membership of the EEC: a profile of electoral opinions in the spring of 1974 - with a postscript on the referendum', "European Journal of Political Science" Vol. 4 (1), March, pp.83-113.
Fox, A. and Alt, J., "The reliability of occupational coding", paper presented to SSRC Seminar on Longitudinal Studies, Cambridge, March 1976.
Crewe, I., Sarlvik, B. and Alt, J., "The erosion of partisanship 1964 - 1975", paper presented to the Political Studies Association Conference, Nottingham, March 1976.
Alt, J., "Personal well-being and economic trends in Britain", paper presented to ECPR Workshop on Protest, Dissatisfaction and Change, ECPR Joint Sessions, Louvain-la-Neuve, April 1976.
Alt, J., Sarlvik, B. and Crewe, I., (1976) `Partisanship and policy choice: issue preferences in the British electorate, February 1974', "British Journal of Political Science", 6(3), July.
Alt, J., Sarlvik, B. and Crewe, I., (1976) `Individual differences scaling and group attitude structures', "Quantity and Quality", Vol.10, December.
Crewe, I., Sarlvik, B. and Alt, J., (1976) `The election of February 1974' IN R. Rose (ed.), "Studies in British Politics", 3rd edition, London: Macmillan.
Crewe, I., Fox, A. and Alt, J., (1977) `Non-voting in British general elections 1966 - October 1974' IN C. Crouch (ed.), "British Political Sociology Yearbook: Vol. III,
Political Participation", London: Croom Helm.
Miller, W., (1977) `The connection between SNP voting and the demand for Scottish self government', "The European Journal of Political Research", 5(1), March.
Crewe, I., Sarlvik, B. and Alt, J., (1977) `Partisan dealignment in Britain 1964 - 1974', "British Journal of Political Science", 7(2), April.
Alt, J., Crewe, I. and Sarlvik, B., (1977) `Angels in plastic: Liberal support in 1974', "Political Studies", 25(3), September.
Crewe, I. and Sarlvik, B., (1979) `The Conservative Party and the electorate', IN T.L. Henry (ed.), "Conservative Party politics", London: Macmillan.
Alt, J.E., (1979) "The politics of economic decline", Cambridge University Press.
Crewe, I.M. and Sarlvik, B., (1979) `Popular attitudes and electoral strategy' IN Z. Layton-Henry (ed.), "Conservative Party politics", London: Macmillan.
Crewe, I.M., (1980) `Why the Conservatives Won', in H. Penniman (ed.), "Britain at the Polls", American Enterprise Institute.
Crewe, I.M., "Negative partisanship: some preliminary ideas using British data", Paper presented to European Consortium for Political Research, Florence, March, 1980.
Crewe, I.M., (1980) `Prospects for party realignment: an Anglo-American comparison' "Comparative Politics", 12(4), July.
Crewe, I.M., "The electoral decline of the Labour Party", paper presented to Conference on the Politics of the Labour Party, Nuffield College, Oxford, September 1980.
British Election Study, (1980) "A comparison of respondent's characteristics with known population parameters", Technical paper 1980:1.
British Election Study, (1980) "The British Election Study, May 1979 questionnaire", Technical paper 1980:2.
British Election Study, (1981) "A description of surveys conducted by the BES Research Project", Technical paper 1981:1.
British Election Study, (1981) "Questionnaire continuity guide", Technical paper 1981:2.
Crewe, I.M., (1981) `The Labour Party and the electorate', in D.A. Kavanagh (ed.), "The politics of the Labour Party", London: Allen Unwin.
Sarlvik, B., Crewe, I.M., and Robertson, D., "Why the parties were liked and disliked in the 1979 Election: an analysis of `Free Answer' survey data", paper presented to the Political Studies Association Conference, Hull, April 1981.
Crewe, I.M., "Electoral Volatility in Britain Since 1945", paper presented to the European Consortium for Political Research, Lancaster, 1981.
Crewe, I.M., "Party and the public", paper presented to the Hansard Society/American Enterprise Institute Conference on the Role of Political Parties, Ditchley Park, Oxfordshire, May 1981.
Heath, A.F. and MacDonald, S-K., (1988) `The demise of party identification theory?' "Electoral Studies", 7, pp.95-107.
Swaddle, K. and Heath, A. (1987) "Official and reported turnout in the British General Election of 1987", Nuffield College, University of Oxford.
Heath, A., (1991) "Understanding political change : voting behaviour in Britain 1964-1987", Oxford: Pergamon.
Heath, A.F. and Pierce, R. (1992) 'It was party identification all along : question-order effects on reports of party identification in Britain' "Electoral Studies", II.
Heath, A., et al, (eds.) (1993) "Labour's last chance : the 1992 election and beyond", Aldershot: Dartmouth.
Heath, A., Jowell, R. and Curtice, J. (2001) "The rise of New Labour: party policies and voter choices", Oxford: Oxford University Press.
Brook, L. and Taylor, B. (1996) "British Election Panel Study 1992-95: Interim technical notes", CREST Working Paper 41.
Taylor, B., Heath, A. and Lynn, P. (1996) "The British Election Panel Study 1992-95: Response characteristics and attrition", CREST Working Paper 40.
Surridge, P. et al, (1998) `The Scottish electorate and the Scottish parliament' "Scottish Affairs" special issue.
Saggar, S. (ed.) (1998) "Race and British electoral politics", London: UCL Press.
Thomson, K., Park, A. and Brook, L. (1999) "British General Election Study 1997: Cross-section Survey, Scottish Election Study, and Ethnic Minority Election Study", London: National Centre for Social Research.
]]>
<citation>
<titlStmt>
<titl>
By Principal Investigator:
</titl>
</titlStmt>
</citation>
</relPubl>
<relPubl>
<![CDATA[Taylor-Gooby, P. (1987) `Welfare attitudes : cleavage, consensus and citizenship' "The Quarterly Journal of Social Affairs", 3(3), pp.199-211.
Rabinowitz, G., Macdonald, S.E. and Listhaug, O., "Competing theories of issue voting : is discounting the explanation?", paper prepared for delivery at the Annual Meeting of American Political Science Association, Washington DC, September 2-5 1993.
Baker, J.R. et.al., "Looking at Legislatures : citizens' knowledge and perceptions of legislatures in Canada, Great Britain and the United States", paper prepared for delivery at the 16th International Congress of the International Political Science Association (RC8:2), Berlin, August 21-25 1994.
Baker, J.E. et al (1996) `Citizens' knowledge and perceptions of legislatures in Canada, Britain and the United States' "The Journal of Legislative Studies", 2(2), pp.44-62.
Kobori, M. (1996) `A study on the North-South divide in Britain of 80s : with reference to the difference of Labour's votes between the North and South' "Ryudai Law Review", 56, May, pp.72-104.
Bennett, S., Flickinger, R., and Rhine, S. "Political talk - over here, over there and over time : a comparative analysis of who talks about politics in Britain and the United States, 1959-1994", paper presented to the International Society of Political Psychology meeting, Vancouver, June 30th-July 3rd 1996.
Evans, G. and Norris, P. (1999) "Critical elections: British parties and voters in long-term perspective", London: Sage Publications.
Tunstall, H. et al (2000) 'Geographical scale, the 'feel-good factor' and voting at the 1997 general election in England and Wales' "Transactions of the Institute of British Geographers", 25, p.51-64.
Dardanelli, P. (2001) "The Europeanisation of regionalisation: European integration and public support for self-government in Scotland 1979/1997", Queen's Papers on Europeanisation, No. 5/2001, London School of Economics.
]]>
<citation>
<titlStmt>
<titl>
By Others:
</titl>
</titlStmt>
</citation>
</relPubl>