net.sf.farrago.catalog
Class FarragoReposUtil

java.lang.Object
  extended by net.sf.farrago.catalog.FarragoReposUtil

public abstract class FarragoReposUtil
extends Object

Static utilities for manipulating the Farrago repository.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/catalog/FarragoReposUtil.java#23 $
Author:
John V. Sichi

Nested Class Summary
private static class FarragoReposUtil.ExportRefProvider
           
private static class FarragoReposUtil.ImportRefResolver
           
static class FarragoReposUtil.InvalidXmlCharFilterInputStream
           
 
Field Summary
static String FARRAGO_CATALOG_EXTENT
           
static String FARRAGO_METAMODEL_EXTENT
           
static String FARRAGO_PACKAGE_NAME
           
 
Constructor Summary
FarragoReposUtil()
           
 
Method Summary
static XMIWriter createXmiWriter()
          Creates an XMIWriter that uses a UTF-8 encoding.
private static void deleteStorage(FarragoModelLoader modelLoader, FarragoPackage farragoPackage)
           
static void dumpRepository()
           
static void dumpRepository(FarragoModelLoader modelLoader)
           
static void dumpRepository(FarragoModelLoader modelLoader, boolean metamodelDumpOnly)
           
static void exportExtent(MDRepository mdrRepos, File file, String extentName)
           
static void exportSubModel(MDRepository mdrRepos, File outputFile, String subPackageName)
          Exports a submodel, generating qualified references by name to objects outside of the submodel.
private static void importExtent(MDRepository mdrRepos, File file, String extentName, String metaPackageExtentName, String metaPackageName)
           
static void importSubModel(MDRepository mdrRepos, URL inputUrl)
           
static boolean isReloadNeeded()
          Deprecated. pass FarragoModelLoader parameter
static boolean isReloadNeeded(FarragoModelLoader modelLoader)
           
static void main(String[] args)
           
private static void mainExportSubModel(String[] args)
           
private static void mainImportSubModel(String[] args)
           
static void reloadRepository()
          Deprecated. pass FarragoModelLoader parameter
static void reloadRepository(FarragoModelLoader modelLoader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FARRAGO_CATALOG_EXTENT

public static final String FARRAGO_CATALOG_EXTENT
See Also:
Constant Field Values

FARRAGO_METAMODEL_EXTENT

public static final String FARRAGO_METAMODEL_EXTENT
See Also:
Constant Field Values

FARRAGO_PACKAGE_NAME

public static final String FARRAGO_PACKAGE_NAME
See Also:
Constant Field Values
Constructor Detail

FarragoReposUtil

public FarragoReposUtil()
Method Detail

exportSubModel

public static void exportSubModel(MDRepository mdrRepos,
                                  File outputFile,
                                  String subPackageName)
                           throws Exception
Exports a submodel, generating qualified references by name to objects outside of the submodel.

Parameters:
mdrRepos - MDR repository containing submodel to export
outputFile - file into which XMI should be written
subPackageName - name of package containing submodel to be exported
Throws:
Exception

createXmiWriter

public static XMIWriter createXmiWriter()
Creates an XMIWriter that uses a UTF-8 encoding.

Returns:
the XMIWriter

importSubModel

public static void importSubModel(MDRepository mdrRepos,
                                  URL inputUrl)
                           throws Exception
Throws:
Exception

dumpRepository

public static void dumpRepository()
                           throws Exception
Throws:
Exception

dumpRepository

public static void dumpRepository(FarragoModelLoader modelLoader)
                           throws Exception
Throws:
Exception

dumpRepository

public static void dumpRepository(FarragoModelLoader modelLoader,
                                  boolean metamodelDumpOnly)
                           throws Exception
Throws:
Exception

isReloadNeeded

public static boolean isReloadNeeded()
Deprecated. pass FarragoModelLoader parameter


isReloadNeeded

public static boolean isReloadNeeded(FarragoModelLoader modelLoader)

reloadRepository

public static void reloadRepository()
                             throws Exception
Deprecated. pass FarragoModelLoader parameter

Throws:
Exception

reloadRepository

public static void reloadRepository(FarragoModelLoader modelLoader)
                             throws Exception
Throws:
Exception

exportExtent

public static void exportExtent(MDRepository mdrRepos,
                                File file,
                                String extentName)
                         throws Exception
Throws:
Exception

deleteStorage

private static void deleteStorage(FarragoModelLoader modelLoader,
                                  FarragoPackage farragoPackage)
                           throws Exception
Throws:
Exception

importExtent

private static void importExtent(MDRepository mdrRepos,
                                 File file,
                                 String extentName,
                                 String metaPackageExtentName,
                                 String metaPackageName)
                          throws Exception
Throws:
Exception

mainExportSubModel

private static void mainExportSubModel(String[] args)
                                throws Exception
Throws:
Exception

mainImportSubModel

private static void mainImportSubModel(String[] args)
                                throws Exception
Throws:
Exception

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception