Package org.dspace.submit.lookup
Class CiNiiService
- java.lang.Object
-
- org.dspace.submit.lookup.CiNiiService
-
public class CiNiiService extends Object
- Author:
- Keiji Suzuki
-
-
Field Summary
Fields Modifier and Type Field Description protected inttimeout
-
Constructor Summary
Constructors Constructor Description CiNiiService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description gr.ekt.bte.core.RecordgetByCiNiiID(String id, String appId)protected List<String>getCiNiiIDs(String title, String author, int year, int maxResults, String appId)Get CiNii NAIDs by searching CiNii OpenURL API with title, author and yearprotected gr.ekt.bte.core.Recordsearch(String id, String appId)Get metadata by searching CiNii RDF API with CiNii NAIDList<gr.ekt.bte.core.Record>searchByTerm(String title, String author, int year, int maxResults, String appId)voidsetTimeout(int timeout)
-
-
-
Method Detail
-
setTimeout
public void setTimeout(int timeout)
-
getByCiNiiID
public gr.ekt.bte.core.Record getByCiNiiID(String id, String appId) throws org.apache.http.HttpException, IOException
- Throws:
org.apache.http.HttpExceptionIOException
-
searchByTerm
public List<gr.ekt.bte.core.Record> searchByTerm(String title, String author, int year, int maxResults, String appId) throws org.apache.http.HttpException, IOException
- Throws:
org.apache.http.HttpExceptionIOException
-
search
protected gr.ekt.bte.core.Record search(String id, String appId) throws IOException, org.apache.http.HttpException
Get metadata by searching CiNii RDF API with CiNii NAID- Parameters:
id- CiNii NAID to search byappId- registered application identifier for the API- Returns:
- record metadata
- Throws:
IOException- A general class of exceptions produced by failed or interrupted I/O operations.org.apache.http.HttpException- Represents a XML/HTTP fault and provides access to the HTTP status code.
-
getCiNiiIDs
protected List<String> getCiNiiIDs(String title, String author, int year, int maxResults, String appId) throws IOException, org.apache.http.HttpException
Get CiNii NAIDs by searching CiNii OpenURL API with title, author and year- Parameters:
title- record titleauthor- record authoryear- record yearmaxResults- maximun number of results returnedappId- registered application identifier for the API- Returns:
- matching NAIDs
- Throws:
IOException- A general class of exceptions produced by failed or interrupted I/O operations.org.apache.http.HttpException- Represents a XML/HTTP fault and provides access to the HTTP status code.
-
-