View Javadoc
1   package org.kuali.ole.describe.service;
2   
3   import java.util.ArrayList;
4   import java.util.List;
5   
6   /**
7    * Created with IntelliJ IDEA.
8    * User: ?
9    * Date: 12/18/12
10   * Time: 3:29 PM
11   * To change this template use File | Settings | File Templates.
12   */
13  public class MockDiscoveryHelperService {
14  
15      List<String> isbnList;
16      List<String> issnList;
17      List<String> oclcList;
18      List<String> locationList;
19  
20      public MockDiscoveryHelperService(){
21          isbnList = new ArrayList<String>();
22          oclcList = new ArrayList<String>();
23          issnList = new ArrayList<String>();
24          locationList = new ArrayList<String>();
25  
26  
27          isbnList.add("9600000000000");
28          isbnList.add("9700000000000");
29          isbnList.add("9800000000000");
30          isbnList.add("9780348436357");
31  
32          issnList.add("0371-8419");
33          issnList.add("0372-8418");
34          issnList.add("0373-8417");
35          issnList.add("0374-8416");
36  
37          oclcList.add("(YBP)100552240");
38          oclcList.add("(YBP)100552241");
39          oclcList.add("(YBP)100552242");
40          oclcList.add("(YBP)100552243");
41  
42          locationList.add("Bloomington");
43          locationList.add("Indiana");
44          locationList.add("Fortwayne");
45      }
46  
47      public boolean isIsbnExists(String isbn){
48          if(isbn!=null && isbnList.contains(isbn.toString())){
49              return true;
50          }
51          return false;
52      }
53  
54      public boolean isIssnExists(String issn){
55          if(issn!=null && issnList.contains(issn.toString())){
56              return true;
57          }
58          return false;
59      }
60  
61      public boolean isOclcExists(String oclc){
62          if(oclc!=null && oclcList.contains(oclc.toString())){
63              return true;
64          }
65          return false;
66      }
67  
68      public boolean isLocationExists(String location){
69          if(location!=null && locationList.contains(location.toString())){
70              return true;
71          }
72          return false;
73      }
74  
75  }