Package org.hibernate.boot.jaxb.internal
Class XmlSources
java.lang.Object
org.hibernate.boot.jaxb.internal.XmlSources
Helper for building and handling
XmlSource references.
An XmlSource represents an XML document containing
O/R mapping metadata, either a JPA orm.xml file, or a
Hibernate .hbm.xml file.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic XmlSourcefromCacheableFile(File file) static XmlSourcefromCacheableFile(File file, boolean strict) static XmlSourcefromCacheableFile(File file, File cacheableDir) static XmlSourcefromCacheableFile(File file, File cacheableDir, boolean strict) static XmlSourcefromDocument(Document document) static XmlSourcestatic voidRead all.hbm.xmlmappings from a jar file and pass them to the givenConsumer.static XmlSourcefromResource(String resourceName, ClassLoaderService classLoaderService) Create anXmlSourcefrom a named resourcestatic XmlSourcefromStream(InputStream inputStream) static XmlSourcefromStream(InputStreamAccess inputStreamAccess) static XmlSourceCreate anXmlSourcefrom a URL
-
Constructor Details
-
XmlSources
public XmlSources()
-
-
Method Details
-
fromResource
Create anXmlSourcefrom a named resource -
fromUrl
Create anXmlSourcefrom a URL -
fromFile
-
fromCacheableFile
-
fromCacheableFile
-
fromCacheableFile
-
fromCacheableFile
-
fromStream
-
fromStream
-
fromDocument
-
fromJar
Read all.hbm.xmlmappings from a jar file and pass them to the givenConsumer.Assumes that any file named
*.hbm.xmlis a mapping document. This method does not supportorm.xmlfiles!- Parameters:
jar- a jar fileconsumer- a consumer of the resulting XML sources
-