Java XML JAXB Unmarshaller getUnmarshaller()

Here you can find the source of getUnmarshaller()

Description

Gets the results Unmarshaller (for validation results.)

License

Open Source License

Declaration

public static Unmarshaller getUnmarshaller() 

Method Source Code

//package com.java2s;
/*//from   w ww . j ava  2 s.  c  o  m
 * #%L
 * Object Model Validator Core
 * %%
 * Copyright (C) 2008 - 2013 University of Toronto (baderlab.org) and Memorial Sloan-Kettering Cancer Center (cbio.mskcc.org)
 * %%
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as 
 * published by the Free Software Foundation, either version 3 of the 
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Lesser Public License for more details.
 * 
 * You should have received a copy of the GNU General Lesser Public 
 * License along with this program.  If not, see
 * <http://www.gnu.org/licenses/lgpl-3.0.html>.
 * #L%
 */

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;

import javax.xml.bind.Unmarshaller;

public class Main {
    private static JAXBContext jaxbContext;

    /**
     * Gets the results Unmarshaller (for validation results.)
     * @return
     */
    public static Unmarshaller getUnmarshaller() {
        //return resultsMarshaller;
        try {
            return jaxbContext.createUnmarshaller();
        } catch (JAXBException e) {
            throw new RuntimeException("Failed to create Unmarshaller", e);
        }
    }
}

Related

  1. createUnmarshaller(Class jaxbBindClass)
  2. createUnmarshaller(Class clazz)
  3. createUnmarshaller(Class clazz)
  4. createUnmarshaller(Class clazz)
  5. createUnmarshaller(Object object)
  6. getUnmarshaller()
  7. getUnmarshaller()
  8. getUnmarshaller(Class jaxbClass)
  9. marshallUnmarshall(T inObj)