public class SchemaStatsHelper extends java.lang.Object implements SourceFileHelper
Modifier and Type | Class and Description |
---|---|
private static class |
SchemaStatsHelper.SourceSpec
Simple data structure to store key data for reverse mapping purposes.
|
Modifier and Type | Field and Description |
---|---|
private static java.lang.String[] |
headings
Column headings.
|
private java.util.HashMap |
reverse
Store a reverse lookup from the schema name to the source file.
|
Constructor and Description |
---|
SchemaStatsHelper() |
Modifier and Type | Method and Description |
---|---|
void |
addMapping(java.lang.String schema,
java.lang.String source,
boolean df)
Add a mapping definition from the given schema name to the original
source file that defined that schema.
|
java.lang.String[] |
getHeadings()
Obtain the list of source file descriptions which is suitable for use
as the column headings in the source file index table.
|
CopySpec[] |
getSpecifications(java.lang.String schema,
java.lang.String outDir)
Provide the list of copy specifications for the given source file and
output directory.
|
java.lang.String |
getURL(java.lang.String relPath,
java.lang.String schema,
java.lang.String line)
Create a URL to link to the given source file and line number.
|
private static final java.lang.String[] headings
private java.util.HashMap reverse
public java.lang.String[] getHeadings()
getHeadings
in interface SourceFileHelper
public CopySpec[] getSpecifications(java.lang.String schema, java.lang.String outDir)
getSpecifications
in interface SourceFileHelper
schema
- Schema AST filename.outDir
- Root of the output directory where all copies must be made.public java.lang.String getURL(java.lang.String relPath, java.lang.String schema, java.lang.String line)
getURL
in interface SourceFileHelper
relPath
- Relative path to the root of the output directory where the
source files copies were made.schema
- Schema AST filename.line
- The line number to which to link.public void addMapping(java.lang.String schema, java.lang.String source, boolean df)
schema
- The schema AST file name.source
- The source file.df
- true
if this source file is a .df file.