Package org.apache.openjpa.lib.meta
Interface MetaDataParser
-
- All Known Subinterfaces:
AbstractCFMetaDataFactory.Parser,SchemaParser
- All Known Implementing Classes:
CFMetaDataParser,PersistenceProductDerivation.ConfigurationParser,XMLMetaDataParser,XMLPersistenceMappingParser,XMLPersistenceMetaDataParser,XMLSchemaParser,XMLVersionParser
public interface MetaDataParserInterface for metadata parsers.- Author:
- Abe White
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Clears the cache of parsed resource names.java.util.ListgetResults()Return the results from the last parse.voidparse(java.io.File file)Parse the given file, which may be a directory, in which case it will be scanned recursively for metadata files.voidparse(java.io.Reader content, java.lang.String sourceName)Parse the metadata in the given reader.voidparse(java.lang.Class<?> cls, boolean topDown)Parse all possible metadata locations for the given class, going top-down or bottom-up.voidparse(java.lang.String rsrc)Parse the given resource.voidparse(java.net.URL url)Parse the given resource.voidparse(MetaDataIterator itr)Parse the metadata supplied by the given iterator.voidsetClassLoader(java.lang.ClassLoader loader)The classloader to use to resolve resources, or null for impl-defined default.
-
-
-
Method Detail
-
setClassLoader
void setClassLoader(java.lang.ClassLoader loader)
The classloader to use to resolve resources, or null for impl-defined default.
-
getResults
java.util.List getResults()
Return the results from the last parse.
-
parse
void parse(java.lang.String rsrc) throws java.io.IOExceptionParse the given resource.- Throws:
java.io.IOException
-
parse
void parse(java.net.URL url) throws java.io.IOExceptionParse the given resource.- Throws:
java.io.IOException
-
parse
void parse(java.io.File file) throws java.io.IOExceptionParse the given file, which may be a directory, in which case it will be scanned recursively for metadata files.- Throws:
java.io.IOException
-
parse
void parse(java.lang.Class<?> cls, boolean topDown) throws java.io.IOExceptionParse all possible metadata locations for the given class, going top-down or bottom-up. If the class is null, only top-level locations will be parsed.- Throws:
java.io.IOException
-
parse
void parse(java.io.Reader content, java.lang.String sourceName) throws java.io.IOExceptionParse the metadata in the given reader.- Parameters:
content- reader containing the metadata to parsesourceName- the name of the source being parsed, for use in error messages- Throws:
java.io.IOException
-
parse
void parse(MetaDataIterator itr) throws java.io.IOException
Parse the metadata supplied by the given iterator.- Throws:
java.io.IOException
-
clear
void clear()
Clears the cache of parsed resource names.
-
-