/** * Add a cacheable mapping file. * * @param xmlFile The name of the file to be added. This must be in a form * useable to simply construct a {@link java.io.File} instance. * @return this (for method chaining purposes) * @throws MappingException Indicates problems reading the cached file or processing * the non-cached file. * @see #addCacheableFile(java.io.File) */ public Configuration addCacheableFile(String xmlFile) throws MappingException { metadataSources.addCacheableFile( xmlFile ); return this; }
/** * Add a cached mapping file. A cached file is a serialized representation * of the DOM structure of a particular mapping. It is saved from a previous * call as a file with the name <tt>xmlFile + ".bin"</tt> where xmlFile is * the name of the original mapping file. * </p> * If a cached <tt>xmlFile + ".bin"</tt> exists and is newer than * <tt>xmlFile</tt> the <tt>".bin"</tt> file will be read directly. Otherwise * xmlFile is read and then serialized to <tt>xmlFile + ".bin"</tt> for use * the next time. * * @param xmlFile The cacheable mapping file to be added. * @return this (for method chaining purposes) * @throws MappingException Indicates problems reading the cached file or processing * the non-cached file. */ public Configuration addCacheableFile(File xmlFile) throws MappingException { metadataSources.addCacheableFile( xmlFile ); return this; }
/** * See {@link #addCacheableFile(java.io.File)} for description * * @param path The path to a file. Expected to be resolvable by {@link java.io.File#File(String)} * * @return this (for method chaining purposes) * * @see #addCacheableFile(java.io.File) */ public MetadataSources addCacheableFile(String path) { final Origin origin = new Origin( SourceType.FILE, path ); addCacheableFile( origin, new File( path ) ); return this; }
/** * Add a cached mapping file. A cached file is a serialized representation of the DOM structure of a * particular mapping. It is saved from a previous call as a file with the name {@code {xmlFile}.bin} * where {@code {xmlFile}} is the name of the original mapping file. * </p> * If a cached {@code {xmlFile}.bin} exists and is newer than {@code {xmlFile}}, the {@code {xmlFile}.bin} * file will be read directly. Otherwise {@code {xmlFile}} is read and then serialized to {@code {xmlFile}.bin} for * use the next time. * * @param file The cacheable mapping file to be added, {@code {xmlFile}} in above discussion. * * @return this (for method chaining purposes) */ public MetadataSources addCacheableFile(File file) { final Origin origin = new Origin( SourceType.FILE, file.getName() ); addCacheableFile( origin, file ); return this; }
/** * Add a cacheable mapping file. * * @param xmlFile The name of the file to be added. This must be in a form * useable to simply construct a {@link java.io.File} instance. * @return this (for method chaining purposes) * @throws MappingException Indicates problems reading the cached file or processing * the non-cached file. * @see #addCacheableFile(java.io.File) */ public Configuration addCacheableFile(String xmlFile) throws MappingException { metadataSources.addCacheableFile( xmlFile ); return this; }
/** * Add a cached mapping file. A cached file is a serialized representation * of the DOM structure of a particular mapping. It is saved from a previous * call as a file with the name <tt>xmlFile + ".bin"</tt> where xmlFile is * the name of the original mapping file. * </p> * If a cached <tt>xmlFile + ".bin"</tt> exists and is newer than * <tt>xmlFile</tt> the <tt>".bin"</tt> file will be read directly. Otherwise * xmlFile is read and then serialized to <tt>xmlFile + ".bin"</tt> for use * the next time. * * @param xmlFile The cacheable mapping file to be added. * @return this (for method chaining purposes) * @throws MappingException Indicates problems reading the cached file or processing * the non-cached file. */ public Configuration addCacheableFile(File xmlFile) throws MappingException { metadataSources.addCacheableFile( xmlFile ); return this; }
/** * See {@link #addCacheableFile(java.io.File)} for description * * @param path The path to a file. Expected to be resolvable by {@link java.io.File#File(String)} * * @return this (for method chaining purposes) * * @see #addCacheableFile(java.io.File) */ public MetadataSources addCacheableFile(String path) { final Origin origin = new Origin( SourceType.FILE, path ); addCacheableFile( origin, new File( path ) ); return this; }
/** * Add a cached mapping file. A cached file is a serialized representation of the DOM structure of a * particular mapping. It is saved from a previous call as a file with the name {@code {xmlFile}.bin} * where {@code {xmlFile}} is the name of the original mapping file. * </p> * If a cached {@code {xmlFile}.bin} exists and is newer than {@code {xmlFile}}, the {@code {xmlFile}.bin} * file will be read directly. Otherwise {@code {xmlFile}} is read and then serialized to {@code {xmlFile}.bin} for * use the next time. * * @param file The cacheable mapping file to be added, {@code {xmlFile}} in above discussion. * * @return this (for method chaining purposes) */ public MetadataSources addCacheableFile(File file) { final Origin origin = new Origin( SourceType.FILE, file.getName() ); addCacheableFile( origin, file ); return this; }