class: ProcessSnippet

public class: ProcessSnippet
Author: vmakarenko (initial creation)
Project: Phase: 1.0; Status: Proposed; Version: $Revision: 1562 $ $LastChangedDate: 2009-02-16 15:; Complexity: 1
Dates: Created: 16.07.2009 15:12:35; Modified: 16.07.2009 15:12:35;
Flags: Active: false; IsRoot: false; IsLeaf: false;
Extension Points:
UUID: {D4D4B390-915F-4893-8973-FD98A3A64971}
HTML snippet generation class. TODO: NS support
 

Goto: Custom Properties, Fields, Methods

Appears in: citationmanager

Custom Properties
 
ProcessSnippet Attributes
Attribute Details
private static const String
  ITEM_ELEMENT_NAME
Initial: "item"
private static const Logger
  logger
Initial: Logger.getLogger(ProcessSnippet.class)
private static const String
  PARENT_ELEMENT_NAME
Initial: "content-model-specific"
private static const String
  PUBLICATION_NS
Initial: "http://escidoc.mpg.de/metadataprofile/schema/0.1/"
private static const String
  SNIPPET_ELEMENT_NAME
Initial: "dcterms:bibliographicCitation"
private static const String
  SNIPPET_NS
Initial: "http://purl.org/dc/terms/"
private static const String
  URL_ELEMENT_NAME
Initial: "dc:identifier"
 
ProcessSnippet Methods
Operation Details
private
addFrameworkPrefixUrl(
   Document doc,
   Element snippetElement,
   Element item):void
Sequential
Tags: throws=IOException
private
convertStyledTextToCssClass(
   String html):String
Sequential
Notes: Converts the style to the named CSS class
@return - Citaion style with CSS class representation
private
convertToAdditionalCssClass(
   String html):String
Sequential
Notes: Converts the style to the additional named CSS class (see FontStyle.cssClass)
@return - Citaion style with additional CSS class representation
public
export(
   Document doc,
   Map params,
   JasperReport jr,
   OutputStream os):void
Sequential
Tags: throws=JRException,IOException,CitationStyleManagerException
Notes: Takes org.w3c.dom.Document doc, processes it with InputStream report, populates element PARENT_ELEMENT_NAME with child SNIPPET_ELEMENT_NAME.
@param is - report of citation styles in {@link InputStream}
@link OutputStream}
private
extractPureCitation(
   String html):String
Sequential
Notes: Extracts pure citation html from generated html report see <code>net.sf.jasperreports.engine.export.oasis.JRHtmlExporter</code> for details
@return - pure citation style w/o html headers, tables, etc.
private
getElementWithPrefix(
   String xml,
   String element):String
Sequential
Notes: Get of NS prefix (dirty hack, TODO: replace with proper NS support)
@return
public static
main(
   String[] args):void
Sequential