Class CiNiiService


  • public class CiNiiService
    extends Object
    Author:
    Keiji Suzuki
    • Field Detail

      • timeout

        protected int timeout
    • Constructor Detail

      • CiNiiService

        public CiNiiService()
    • 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.HttpException
        IOException
      • 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.HttpException
        IOException
      • 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 by
        appId - 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 title
        author - record author
        year - record year
        maxResults - maximun number of results returned
        appId - 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.