de.dnb.oai.harvester.Message Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of oaiharvester Show documentation
Show all versions of oaiharvester Show documentation
A Java implementation of OAI-PMH 2.0 specification.
See http://www.openarchives.org/pmh/
The newest version!
/**********************************************************************
* Class Message
*
* Copyright (c) 2005-2012, German National Library / Deutsche Nationalbibliothek
* Adickesallee 1, D-60322 Frankfurt am Main, Federal Republic of Germany
*
* This program is free software.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Kadir Karaca Kocer -- German National Library
*
**********************************************************************/
package de.dnb.oai.harvester;
/**
* Some usefull messages.
*
* @since 10.09.2005
* @author Alexander Slotta
*
* 20090108 Some englisch corrections by Karaca Koçer.
*/
public class Message
{
/**
* Warn message with default value. Value for max. connection is invalid.
*
* @param number number of max. connections
* @return message string
* @since 10.09.2005
* @author Alexander Slotta
*/
public static String msg10(int number) {
return "The max. connection value " + number + " is invalid, harvester set it to default.";
}
/**
* Error message for can't connect oai data provider
*
* @param dataProviderUrl the data provider URL
* @return message string
* @since 10.09.2005
* @author Alexander Slotta
*/
public static String msg11(String dataProviderUrl) {
return "Can't connect OAI Provider Server with address=\"" +
dataProviderUrl + "\". The harvester stopped. ";
}
/**
* Error message for can't validate oai data provider response
*
* @return message string
* @since 10.09.2005
* @author Alexander Slotta
*/
public static String msg12() {
return "Can't validate OAI Provider Server response. Response isn't " +
"in a correct OAI-PMH data format. Harvester stopped. ";
}
/**
* Default error message.
* @param errorStatement commen error statement
* @return message string
* @since 10.09.2005
* @author Alexander Slotta
*/
public static String msg13(String errorStatement) {
return errorStatement;
}
/**
* Error message for move the tempFile into error directory
*
* @param errorDir the error directory name
* @param tmpFilename the temprary filename
* @return message string
* @since 02.11.2005
* @author Alexander Slotta
*/
public static String msg14(String tmpFilename, String errorDir) {
return "Move \"" + tmpFilename + "\" into error directory: \"" + errorDir + "\". ";
}
/**
* Error message for no output is set.
*
* @return message string
* @since 10.04.2006
* @author Alexander Slotta
*/
public static String msg15() {
return "No database or filesystem output is set.";
}
/**
* Error message for can't parse OAI Provider Server response.
*
* @return message string
* @since 12.04.2006
* @author Alexander Slotta
*/
public static String msg16() {
return "Can't parse the OAI Provider Server response. Response " +
"isn't in a correct OAI-PMH data format. Harvester stopped. ";
}
/**
* Warn message with default value. In database select task list statement
* the datetime was null.
*
* @param datetime the current datetime for select
* @return message string
* @since 10.09.2005
* @author Alexander Slotta
*/
public static String msg20(String datetime) {
return "Database: SELECT statement problem for task list. " +
"Datetime was NULL. It was setting to " + datetime;
}
/**
* Access message for start task proccess.
*
* @param requestUrl the request URL with parameters
* @return message string
* @since 10.09.2005
* @author Alexander Slotta
*/
public static String msg30(String requestUrl) {
return "Harvesting started. Request: " + requestUrl;
}
/**
* Access message for task proccess done with number of harvest records.
*
* @param numberOfRecords the number of records
* @return message string
* @since 10.09.2005
* @author Alexander Slotta
*/
public static String msg31(int numberOfRecords) {
return "Harvesting finished. Harvested records: " + numberOfRecords;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy