public class DefaultSchemaLdifExtractor extends Object implements SchemaLdifExtractor
Constructor and Description |
---|
DefaultSchemaLdifExtractor(File outputDirectory)
Creates an extractor which deposits files into the specified output
directory.
|
Modifier and Type | Method and Description |
---|---|
void |
extractOrCopy()
Extracts the LDIF files from a Jar file or copies exploded LDIF
resources without overwriting the resources if the schema has
already been extracted.
|
void |
extractOrCopy(boolean overwrite)
Extracts the LDIF files from a Jar file or copies exploded LDIF resources.
|
static URL |
getUniqueResource(String resourceName,
String resourceDescription)
Gets a unique resource from the class loader.
|
static InputStream |
getUniqueResourceAsStream(String resourceName,
String resourceDescription)
Gets the unique schema file resource from the class loader off the base path.
|
boolean |
isExtracted()
Gets whether or not schema folder has been created or not.
|
public DefaultSchemaLdifExtractor(File outputDirectory)
outputDirectory
- the directory where the schema root is extractedpublic boolean isExtracted()
isExtracted
in interface SchemaLdifExtractor
public void extractOrCopy(boolean overwrite) throws IOException
extractOrCopy
in interface SchemaLdifExtractor
overwrite
- over write extracted structure if true, false otherwiseIOException
- if schema already extracted and on IO errorspublic void extractOrCopy() throws IOException
extractOrCopy
in interface SchemaLdifExtractor
IOException
- if schema already extracted and on IO errorspublic static InputStream getUniqueResourceAsStream(String resourceName, String resourceDescription) throws IOException
resourceName
- the file name of the resource to loadresourceDescription
- human description of the resourceIOException
- if there are problems reading or finding a unique copy of the resourcepublic static URL getUniqueResource(String resourceName, String resourceDescription) throws IOException
resourceName
- the name of the resourceresourceDescription
- the description of the resourceIOException
- if there is an IO errorCopyright © 2003–2020 The Apache Software Foundation. All rights reserved.