Revision 2818
Added by Matt Jones over 18 years ago
LSIDAuthorityData.java | ||
---|---|---|
26 | 26 |
|
27 | 27 |
import java.io.InputStream; |
28 | 28 |
|
29 |
import org.apache.commons.logging.Log; |
|
30 |
import org.apache.commons.logging.LogFactory; |
|
31 |
|
|
29 | 32 |
import com.ibm.lsid.server.LSIDDataService; |
33 |
import com.ibm.lsid.server.LSIDRequestContext; |
|
30 | 34 |
import com.ibm.lsid.server.LSIDServerException; |
31 | 35 |
import com.ibm.lsid.server.LSIDServiceConfig; |
32 |
import com.ibm.lsid.server.LSIDRequestContext; |
|
33 | 36 |
|
34 | 37 |
public class LSIDAuthorityData implements LSIDDataService { |
35 | 38 |
|
36 | 39 |
private LSIDDataLookup lookup = null; |
37 |
|
|
40 |
private static Log logger = LogFactory.getLog( "edu.ucsb.nceas.metacat.lsid" ); |
|
41 |
|
|
38 | 42 |
public InputStream getData(LSIDRequestContext lsid) throws LSIDServerException { |
39 |
System.out.println("Getting data (Metacat): " + lsid.getLsid().toString());
|
|
43 |
logger.debug("Getting data (Metacat): " + lsid.getLsid().toString());
|
|
40 | 44 |
if (lookup == null) |
41 | 45 |
throw new LSIDServerException(500, "Cannot query database"); |
42 | 46 |
return lookup.lsidData(lsid.getLsid()); |
... | ... | |
49 | 53 |
} |
50 | 54 |
|
51 | 55 |
public void initService(LSIDServiceConfig cf) throws LSIDServerException { |
52 |
System.out.println("Starting LSIDAuthorityData (Metacat).");
|
|
56 |
logger.info("Starting LSIDAuthorityData (Metacat).");
|
|
53 | 57 |
lookup = new LSIDDataLookup(); |
54 | 58 |
} |
55 | 59 |
} |
Also available in: Unified diff
Added apache commons logging to the LSID servlet using log4j. Remove println statements.