org.apache.openjpa.lib.meta
Interface MetaDataSerializer

All Known Subinterfaces:
AbstractCFMetaDataFactory.Serializer, SchemaSerializer
All Known Implementing Classes:
AnnotationPersistenceMappingSerializer, AnnotationPersistenceMetaDataSerializer, CFMetaDataSerializer, XMLMetaDataSerializer, XMLPersistenceMappingSerializer, XMLPersistenceMetaDataSerializer, XMLSchemaSerializer

public interface MetaDataSerializer

Interface for meta data serializers.

Author:
Abe White

Field Summary
static int APPEND
           
static int COMPACT
           
static int PRETTY
           
static int VERBOSE
           
 
Method Summary
 void serialize(File file, int flags)
          Serialize the current set of objects to the given file.
 void serialize(int flags)
          Serialize the current set of objects to the files from which they were parsed.
 void serialize(Map output, int flags)
          Serialize the current set of objects to the files from which they were parsed.
 void serialize(Writer out, int flags)
          Serialize the current set of objects to the given stream.
 

Field Detail

COMPACT

static final int COMPACT
See Also:
Constant Field Values

PRETTY

static final int PRETTY
See Also:
Constant Field Values

APPEND

static final int APPEND
See Also:
Constant Field Values

VERBOSE

static final int VERBOSE
See Also:
Constant Field Values
Method Detail

serialize

void serialize(int flags)
               throws IOException
Serialize the current set of objects to the files from which they were parsed. Any objects for which a source file cannot be determined will not be included in the output.

Parameters:
flags - bit flags specifying the output flags; e.g. PRETTY
Throws:
IOException

serialize

void serialize(Map output,
               int flags)
               throws IOException
Serialize the current set of objects to the files from which they were parsed. The objects must implement the SourceTracker interface.

Parameters:
output - if null, then serialize directly to the file system; otherwise, populate the specified Map with keys that are the File instances, and values that are the String contents of the MetaData
flags - bit flags specifying the output flags; e.g. PRETTY
Throws:
IOException

serialize

void serialize(File file,
               int flags)
               throws IOException
Serialize the current set of objects to the given file.

Parameters:
flags - bit flags specifying the output flags; e.g. PRETTY | APPEND
Throws:
IOException

serialize

void serialize(Writer out,
               int flags)
               throws IOException
Serialize the current set of objects to the given stream.

Parameters:
flags - bit flags specifying the output flags; e.g. PRETTY
Throws:
IOException


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.