Hibernate ORM JaxbRoot - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM JaxbRoot class.

This code example shows how to use the following methods:
        Unmarshaller unmarshaller = jc.createUnmarshaller(); 
        unmarshaller.setSchema( schema ); 
        StreamSource stream = new StreamSource( in ); 
        JAXBElement<T> elem = unmarshaller.unmarshal( stream, clazz ); 
        Origin origin = new Origin( null, fileName ); 
        return new JaxbRoot<T>( elem.getValue(), origin ); 
    } 
 
    private static Schema getMappingSchema(String schemaVersion, ClassLoaderService classLoaderService) { 
        URL schemaUrl = classLoaderService.locateResource( schemaVersion ); 
        SchemaFactory sf = SchemaFactory.newInstance( javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI ); 
        Schema schema = null; 
        try { 
            schema = sf.newSchema( schemaUrl ); 
        } 
        catch ( SAXException e ) { 
            LOG.debugf( "Unable to create schema for %s: %s", schemaVersion, e.getMessage() ); 
        } 
        return schema; 
    } 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Hibernate ORM JaxbRoot Methods: