View Javadoc
1   /*
2    * Copyright 2013 The Kuali Foundation.
3    * 
4    * Licensed under the Educational Community License, Version 1.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    * http://www.opensource.org/licenses/ecl1.php
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.ole.select.businessobject;
17  
18  import com.thoughtworks.xstream.XStream;
19  
20  public class OlePatronRecordHandler {
21  
22      public OlePatronDocuments retrievePatronFromXML(String xml) {
23          XStream xStream = new XStream();
24          xStream.alias("olePatronDocuments", OlePatronDocuments.class);
25          xStream.alias("olePatronDocument", OLERequestorPatronDocument.class);
26          xStream.alias("olePatronId", String.class);
27          xStream.alias("barcode", String.class);
28          xStream.alias("borrowerType", String.class);
29          xStream.alias("firstName", String.class);
30          xStream.alias("lastName", String.class);
31          xStream.alias("activeIndicator", Boolean.class);
32          xStream.addImplicitCollection(OlePatronDocuments.class, "olePatronDocuments");
33          return (OlePatronDocuments) xStream.fromXML(xml);
34      }
35  }