org.hibernate.boot.jaxb.spi.Binder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-core Show documentation
Show all versions of hibernate-core Show documentation
Hibernate's core ORM functionality
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or .
*/
package org.hibernate.boot.jaxb.spi;
import java.io.InputStream;
import javax.xml.transform.Source;
import org.hibernate.boot.jaxb.Origin;
/**
* Contract for performing JAXB binding.
*
* @author Steve Ebersole
*/
public interface Binder {
/**
* Bind from an XML source.
*
* @param source The XML source.
* @param origin The descriptor of the source origin
*
* @return The bound JAXB model
*/
public Binding bind(Source source, Origin origin);
/**
* Bind from an InputStream
*
* @param stream The InputStream containing XML
* @param origin The descriptor of the stream origin
*
* @return The bound JAXB model
*/
public Binding bind(InputStream stream, Origin origin);
}