redora.generator
Class ModelFileFinder

java.lang.Object
  extended by redora.generator.ModelFileFinder

public class ModelFileFinder
extends Object

Finds model files.

Author:
Nanjing RedOrange (www.red-orange.cn)
See Also:
FileLocations

Constructor Summary
ModelFileFinder(FileLocations where, String artifactId)
           
 
Method Summary
 File allModelFiles()
          Finds dumped allModel xml file in the local directory.
 Set<String> findIncludeFiles()
          Get all include documents file list
 Set<String> findModelFiles()
          Get all model documents file list
 File normalizedModelFile(String modelName)
          Finds dumped model xml file in the ~/.redora directory.
 SortedSet<String> upgradeFiles()
          Finds upgrade files in the upgrade directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelFileFinder

public ModelFileFinder(@NotNull
                       FileLocations where,
                       @NotNull
                       String artifactId)
Method Detail

findModelFiles

@NotNull
public Set<String> findModelFiles()
Get all model documents file list

Returns:
All "???.xml" files in the model directory (no sub directories)

findIncludeFiles

@NotNull
public Set<String> findIncludeFiles()
Get all include documents file list

Returns:
All "???.xml" files in the include directory (no sub directories)

upgradeFiles

@NotNull
public SortedSet<String> upgradeFiles()
Finds upgrade files in the upgrade directory.

Returns:
Empty or alphabetically sorted list

normalizedModelFile

@NotNull
public File normalizedModelFile(@NotNull
                                        String modelName)
Finds dumped model xml file in the ~/.redora directory.

Parameters:
modelName - Name of the model including .xml
Returns:
Path + file name of the model

allModelFiles

@NotNull
public File allModelFiles()
Finds dumped allModel xml file in the local directory.

Returns:
Empty or directory


Copyright © 2012 Nanjing RedOrange Co. ltd. All Rights Reserved.