class: ProcessCitationStyles

public class: ProcessCitationStyles
Author:
Project: Phase: 1.0; Status: Proposed; Version: 1.0; Complexity: 1
Dates: Created: 16.07.2009 15:12:34; Modified: 16.07.2009 15:12:34;
Flags: Active: false; IsRoot: false; IsLeaf: false;
Extension Points:
UUID: {7B07ADE3-A4E9-4f48-8468-C6CF7FC7FA71}
 

Goto: Custom Properties, Fields, Methods

Implements: CitationStyleHandler

See also: CitationStyleHandlerBean, CitationStylesCollection, FontStylesCollection, LayoutElementsCollection, ProcessScriptlet, CitationStyleHandler, TestCitationManager, RestServlet

Appears in: citationmanager

Connections
 
Custom Properties
 
ProcessCitationStyles Attributes
Attribute Details
public String
  CITATION_XML_FILENAME
Notes: Commonly used file name for citation style definition xml
public boolean
  CREATE_JRXML
Notes: if true the jrxml file of the report will be created, if false - otherwise
public CitationStylesCollection
  csc
Initial: null
Notes: CitationStyleDefinition
public String
  CSS_CLASS_POSTFIX
Notes: Css Class postfix
public JRDesignDataset
  dataSet
Initial: null
Notes: Dataset in JasperDesign which will be updated
public String
  DEFAULT_REPORTNAME
Notes: Default name for serialised output of the component: jrprint file
public String
  DEFAULT_STYLENAME
Notes: Default style name for, used as a starter for new style creation
public FontStylesCollection
  fsc
Initial: null
Notes: FontStylesCollection
public JasperDesign
  jasperDesign
Initial: null
Notes: default JasperDesign which will be updated with new this procedure.
public boolean
  KEEP_COMPILER_KEEP_JAVA_FILE
Notes: if true the jasper report compiler will not delete the old java execution plan file of the report, if false - otherwise
public boolean
  KEEP_OLD_SCRIPTLETS
Notes: if true the old scriptlets will not be deleted before the compilations of the new scriptlets, if false - otherwise
public LayoutElementsCollection
  lec
Initial: null
Notes: LayoutElementCollection
private static const Logger
  logger
Initial: Logger.getLogger(ProcessCitationStyles.class)
Notes: Logger for this class.
public Properties
  props
Notes: component properties
public ProcessScriptlet
  ps
Initial: null
Notes: ProcessScriptlet class instance
public String
  RESULT_CITATION_VARIABLE
Notes: Result of citation is used in jasper report
private static const String
  TASK_COMPILE
Initial: "compile"
private static const String
  TASK_COMPILE_FILL_VIEW
Initial: "compile-fill-view"
private static const String
  TASK_FILL
Initial: "fill"
Notes: tasks for test
private static const String
  TASK_FILL_SORT_TITLE
Initial: "sort-title"
private static const String
  TASK_HTML
Initial: "html"
private static const String
  TASK_ODT
Initial: "odt"
private static const String
  TASK_PDF
Initial: "pdf"
private static const String
  TASK_PRINT
Initial: "print"
private static const String
  TASK_RTF
Initial: "rtf"
private static const String
  TASK_TXT
Initial: "txt"
private static const String
  TASK_VALIDATE_CS
Initial: "validate-cs"
private static const String
  TASK_VALIDATE_DS
Initial: "validate-ds"
private static const String
  TASK_VIEW
Initial: "view"
private static const String
  TASK_XML
Initial: "xml"
 
ProcessCitationStyles Methods
Operation Details
public
addDefaultJRFields():void
Sequential
Tags: throws=JRException,FileNotFoundException,IOException
Notes: Fills JRFields[] of jasper report with elements are taken according to CitationElements.xsd
public
addDefaultJRVariables():void
Sequential
Tags: throws=JRException,FileNotFoundException,IOException
Notes: Add default variables of report
private
addJRField(
   String name,
   String expr):void
Sequential
Tags: throws=JRException
Notes: Add JasperReport field
private
addJRField(
   String name):void
Sequential
Tags: throws=JRException
Notes: Add JasperReport field where XPath equals the name
private
addJRVariable(
   String name,
   String expr):void
Sequential
Tags: throws=JRException
Notes: Add JasperReport variable
@param description is XPath to the variable in DataSource
public
addLayoutElementToVariablesMap(
   CitationStyle cs,
   LayoutElement le):void
Sequential
Tags: throws=CitationStyleManagerException,JRException
Notes: Add le to variablesMap is taken from LayoutElements.xml
public
applyElements(
   CitationStyle cs,
   LayoutElement le,
   String delimiter):String
Sequential
Tags: throws=CitationStyleManagerException,JRException
Notes: Creates expression string with all subelements of le. Inserts delimiter between subelements
@return extended expression String
public
applyParameters(
   LayoutElement le,
   String expr,
   boolean isRepeatable):String
Sequential
Tags: throws=CitationStyleManagerException,JRException
Notes: Create expression string on hand of Parameters:
<li>delimiter</li> - only for repeatable elements
<li>startsWith</li>
<li>endsWith</li>
<li>maxLength</li>
<li>maxLengthEndsWith</li>
<li>validIf</li>
<li>fontStyle</li>
@param p is Parameters to be applied
@return extended expression String
public
compileCitationStyleJRToFile(
   String csName):void
Sequential
Tags: throws=JRException,CitationStyleManagerException,IOException
public
compileCitationStyleJRToFileBase(
   String csName,
   String postfix):void
Sequential
Tags: throws=JRException,CitationStyleManagerException,IOException
Notes: Compiles JasperDesign file and saves it into .jasper file
@param path A path to the CitationStyles directory
public
compileCitationStyleJRToXml(
   String csName):void
Sequential
Tags: throws=JRException,CitationStyleManagerException,IOException
public
compileCitationStyleJRToXmlBase(
   String csName,
   String postfix):void
Sequential
Tags: throws=JRException,CitationStyleManagerException,IOException
Notes: Compiles JasperDesign file and saves it into .jrxml file
@param path A path to the CitationStyles directory
public
compileCssClassCitationStyleJRToFile(
   String csName):void
Sequential
Tags: throws=JRException,CitationStyleManagerException,IOException
public
compileCssClassCitationStyleJRToXml(
   String csName):void
Sequential
Tags: throws=JRException,CitationStyleManagerException,IOException
public
compileReport(
   String csName):void
Sequential
Tags: throws=JRException,IOException,CitationStyleManagerException
Notes: @param root
public
compileScriptletToFile(
   String csName):void
Sequential
Tags: throws=CitationStyleManagerException,IOException
public
explainStyles():String
Sequential
Tags: throws=CitationStyleManagerException
Notes: Explains citation styles and output types for them
@see de.mpg.escidoc.services.citationmanager.CitationStyleHandler#explainStyles()
public
fillReport(
   String csName,
   String ouf,
   String dsFile):void
Sequential
Tags: throws=IOException,JRException,CitationStyleManagerException
public
fillReportBase(
   String csName,
   String ouf,
   String dsFile,
   String jrpName):void
Sequential
Tags: throws=IOException,JRException,CitationStyleManagerException
Notes: Fill report on DataSet
@param root is a root dir of application
private
fillReportToOutputStream(
   String citationStyle,
   OutputStream os,
   String outFormat,
   String itemList):void
Sequential
Tags: throws=JRException,IOException,CitationStyleManagerException
Notes: Fills Citation Style to an OutputStream
private
findInFieldsMap(
   String name):boolean
Sequential
Notes: Find field by name in fieldsMap
@return true if found otherwise
private
findInVariablesMap(
   String name):boolean
Sequential
Notes: Find variable by name in variablesMap
@return true if found otherwise
private
findRefLocation(
   String ref):char
Sequential
Tags: throws=CitationStyleManagerException
Notes: Find ref location: whether in FieldsMap or in VariablesMap
@return char 'F' - for FieldsMap and 'V' for VariablesMap
public
getCsc():CitationStylesCollection
Sequential
public
getDataSet():JRDesignDataset
Sequential
public
getFsc():FontStylesCollection
Sequential
public
getJasperDesign():JasperDesign
Sequential
Notes: ---------------
public
getLec():LayoutElementsCollection
Sequential
Notes: @return
public
getMimeType(
   String cs,
   String ouf):String
Sequential
Tags: throws=CitationStyleManagerException
Notes: (non-Javadoc)
@see de.mpg.escidoc.services.citationmanager.CitationStyleHandler#getMimeType(java.lang.String, java.lang.String)
public
getOutput(
   String citationStyle,
   String outFormat,
   String itemList):byte
Sequential
Tags: throws=JRException,IOException,CitationStyleManagerException
public
getOutputFormats(
   String cs):String
Sequential
Tags: throws=CitationStyleManagerException
Notes: (non-Javadoc)
@see de.mpg.escidoc.services.citationmanager.CitationStyleHandler#getOutputFormats(java.lang.String)
public
getPs():ProcessScriptlet
Sequential
public
getStyles():String
Sequential
Tags: throws=CitationStyleManagerException
Notes: (non-Javadoc)
@see de.mpg.escidoc.services.citationmanager.CitationStyleHandler#getStyles()
public
isCitationStyle(
   String citationStyle):boolean
Sequential
Tags: throws=CitationStyleManagerException
Notes: (non-Javadoc)
@see de.mpg.escidoc.services.citationmanager.CitationStyleHandler#isCitationStyle(java.lang.String)
public static
main(
   String[] args):void
Sequential
Tags: throws=JRException,IOException,CitationStyleManagerException,TransformerException
Notes: Main class method. An application starts form here.
@return Nothing
public
parseCitationStyle(
   String name):void
Sequential
Tags: throws=FileNotFoundException,CitationStyleManagerException,JRException,IOException
public
parseCitationStyleBase(
   String name,
   boolean hasCssClasses):void
Sequential
Tags: throws=CitationStyleManagerException,JRException,FileNotFoundException,IOException
public
parseCssClassCitationStyle(
   String name):void
Sequential
Tags: throws=FileNotFoundException,CitationStyleManagerException,JRException,IOException
public
ProcessCitationStyles():
Sequential
public
saveCitationStyleBundle(
   String name):void
Sequential
Tags: throws=JRException,IOException,CitationStyleManagerException
public
saveCssClassCitationStyleBundle(
   String name):void
Sequential
Tags: throws=JRException,IOException,CitationStyleManagerException
public
setCsc(
   CitationStylesCollection csc):void
Sequential
public
setDataSet(
   JRDesignDataset dataSet):void
Sequential
public
setFsc(
   FontStylesCollection fsc):void
Sequential
public
setJasperDesign(
   JasperDesign jasperDesign):void
Sequential
Tags: throws=FileNotFoundException,JRException,IOException
public
setJasperDesignDefaultProperties(
   String name):void
Sequential
Tags: throws=CitationStyleManagerException
Notes: Populates following default properties of jasperDesign:
<code>name, scriptletClass, query root, report header</code>,
public
setLec(
   LayoutElementsCollection lec):void
Sequential
public
setPs(
   ProcessScriptlet ps):void
Sequential
private
translateToJRExpression(
   String expr):String
Sequential
Tags: throws=JRException
Notes: Substitute all ${...} of the valid-if elements with the correct JRExpression notation for JRField reference: $F{...} or JRVariable reference: $V{...}
@param vi - validIf expression
private static
usage():void
Sequential
Tags: throws=FileNotFoundException,IOException
public
verifyCitationStyle():void
Sequential
Tags: throws=JRException,CitationStyleManagerException
Notes: Validates
public
viewReport(
   String jrpName,
   String csName,
   String outFormat):void
Sequential
Tags: throws=JRException
Notes: View report in different output formats
@param root is a root dir of application
public
viewReport(
   String csName):void
Sequential
Tags: throws=JRException
public
viewReport(
   String csName,
   String outFormat):void
Sequential
Tags: throws=JRException