package eu.dnetlib.data.sts.ds;

/**
 * {@link IDepotService} helper class.
 * @author mhorst
 * 
 *
 */
public class DepotServiceHelper {

	/**
	 * Builds XML store record.
	 * @param id may be null
	 * @param type
	 * @param content
	 * @return XML store record
	 */
	public static String buildStoreRecord(String id, String type, String content) {
		return "<storeRecord>" +
		  "<storeRecordIdentifier>" + (id!=null?id:"") + "</storeRecordIdentifier>" +
		  "<storeObject datatype=\""+type+"\">"+content+"</storeObject>" +
		  "</storeRecord>";
	}
	
	public static boolean isStoringStatusDone(String storingStatus) {
		return storingStatus.contains("<STORING_STATUS value=\"DONE\"/>");
	}
}
