gov.nasa.pds.imaging.generate
Class Generator

java.lang.Object
  extended by gov.nasa.pds.imaging.generate.Generator

public class Generator
extends Object


Constructor Summary
Generator()
           
Generator(PDSObject pdsObject, File templateFile, String filePath, String confPath, File outputFile)
           
 
Method Summary
 void generate(boolean toStdOut)
          Functionality to generate the PDS4 Label from the Velocity Template
 org.apache.velocity.VelocityContext getContext()
           
 ContextMappings getContextMappings()
           
 String getFilePath()
           
 File getOutputFile()
           
 PDSObject getPdsObject()
           
 org.apache.velocity.Template getTemplate()
           
 File getTemplateFile()
           
 String getTemplatePath()
           
 void initTemplate()
          Initializes and reads in the Velocity Template into the Velocity Engine.
 void setContext()
          Sets the Velocity Template contexts specified by the PDSObject API and ContextMappings object.
 void setContext(org.apache.velocity.VelocityContext context)
           
 void setContextMappings(ContextMappings ctxMappings)
           
 void setFilePath(String filePath)
           
 void setOutputFile(File outputFile)
           
 void setPDSObject(PDSObject pdsObject)
           
 void setTemplate(org.apache.velocity.Template template)
           
 void setTemplateFile(File templateFile)
           
 void setTemplatePath(String templatePath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Generator

public Generator()
          throws Exception
Throws:
Exception

Generator

public Generator(PDSObject pdsObject,
                 File templateFile,
                 String filePath,
                 String confPath,
                 File outputFile)
          throws Exception
Throws:
Exception
Method Detail

generate

public void generate(boolean toStdOut)
              throws Exception
Functionality to generate the PDS4 Label from the Velocity Template

Parameters:
toStdOut - - Determines whether the output should be to a file or System.out
Throws:
Exception - - when output file does not exist, or error close String writer
TemplateException - - when output is null - reason needs to be found

getContext

public org.apache.velocity.VelocityContext getContext()

getContextMappings

public ContextMappings getContextMappings()

getFilePath

public String getFilePath()

getOutputFile

public File getOutputFile()

getPdsObject

public PDSObject getPdsObject()

getTemplate

public org.apache.velocity.Template getTemplate()

getTemplateFile

public File getTemplateFile()

getTemplatePath

public String getTemplatePath()

initTemplate

public void initTemplate()
                  throws TemplateException,
                         IOException
Initializes and reads in the Velocity Template into the Velocity Engine.

Throws:
TemplateException
IOException

setContext

public void setContext()
                throws TemplateException,
                       Exception
Sets the Velocity Template contexts specified by the PDSObject API and ContextMappings object.

Throws:
TemplateException
Exception

setContext

public void setContext(org.apache.velocity.VelocityContext context)

setContextMappings

public void setContextMappings(ContextMappings ctxMappings)

setFilePath

public void setFilePath(String filePath)

setOutputFile

public void setOutputFile(File outputFile)

setPDSObject

public void setPDSObject(PDSObject pdsObject)

setTemplate

public void setTemplate(org.apache.velocity.Template template)

setTemplateFile

public void setTemplateFile(File templateFile)

setTemplatePath

public void setTemplatePath(String templatePath)


Copyright © 2010-2013 Planetary Data System. All Rights Reserved.