com.extentech.ExtenXLS.binder
Class CellBinderUtils

java.lang.Object
  extended by com.extentech.ExtenXLS.binder.CellBinderUtils

public class CellBinderUtils
extends Object

Utility Class for CellBinder API

Since:
Version:
Author:
John McMahon -- Copyright ©2011Extentech Inc.
See Also:

Field Summary
static boolean DEBUG
           
static short NAMEDRANGELOOKUP
           
static String RDFSTUB
          Create a 'stub' RDF from a WorkBook using its Named Range informaiton to create Name-based CellRanges
static short SINGLECELLLOOKUP
           
 
Constructor Summary
CellBinderUtils()
           
 
Method Summary
static XMLBeanNode createNewNode(PersistenceEngine factory, String nodetype)
          Create a new XMLBeanNode
static void createRDF(WorkBookHandle bk, String rdfName, List cells, Object mappings, HashMap datasources, HashMap vars)
          Create an RDF from a template, a list of ranges and a data object of mappings
static void createRDFfromOfficeWriterMappings(DocumentHandle bk, String rdfName, List mappings, List ranges, HashMap datasources)
          Create an RDF from a template and a list of ranges + a data object storing element info mapped to specific cells/fieldnames RoundTrip Reporting style
static HashMap getDataMarkers(WorkBookHandle wb, String matchPattern)
          create 2 List objects from workbook - a list of ranges and a list of mappings This is used with OfficeWriter-style mappings
static List getNamedRangesFromWorkBook(WorkBookHandle wb)
          get a List of named range mappings from a workbook
static void getRDFFromDataMarkers(WorkBookHandle book, String matchPattern, HashMap datasources, HashMap vars)
           
static void getRDFFromDO(WorkBookHandle book, Object dob, HashMap datasources)
           
static String getRDFName(String sourcePath)
           
static String getRelativePath(String fname, String sourcePath)
           
static String initRDFFile(String workingdir, String templateName)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RDFSTUB

public static final String RDFSTUB
Create a 'stub' RDF from a WorkBook using its Named Range informaiton to create Name-based CellRanges

See Also:
Constant Field Values

NAMEDRANGELOOKUP

public static final short NAMEDRANGELOOKUP
See Also:
Constant Field Values

SINGLECELLLOOKUP

public static final short SINGLECELLLOOKUP
See Also:
Constant Field Values

DEBUG

public static final boolean DEBUG
See Also:
Constant Field Values
Constructor Detail

CellBinderUtils

public CellBinderUtils()
Method Detail

getRDFFromDO

public static void getRDFFromDO(WorkBookHandle book,
                                Object dob,
                                HashMap datasources)

getRDFFromDataMarkers

public static void getRDFFromDataMarkers(WorkBookHandle book,
                                         String matchPattern,
                                         HashMap datasources,
                                         HashMap vars)

getNamedRangesFromWorkBook

public static List getNamedRangesFromWorkBook(WorkBookHandle wb)
get a List of named range mappings from a workbook

Parameters:
wb -
matchPattern -
Returns:

getDataMarkers

public static HashMap getDataMarkers(WorkBookHandle wb,
                                     String matchPattern)
create 2 List objects from workbook - a list of ranges and a list of mappings This is used with OfficeWriter-style mappings

Parameters:
wb -
matchPattern -
Returns:

createRDFfromOfficeWriterMappings

public static void createRDFfromOfficeWriterMappings(DocumentHandle bk,
                                                     String rdfName,
                                                     List mappings,
                                                     List ranges,
                                                     HashMap datasources)
Create an RDF from a template and a list of ranges + a data object storing element info mapped to specific cells/fieldnames RoundTrip Reporting style

Parameters:
rdfName -
templateName -
mappings -
ranges -

createRDF

public static void createRDF(WorkBookHandle bk,
                             String rdfName,
                             List cells,
                             Object mappings,
                             HashMap datasources,
                             HashMap vars)
Create an RDF from a template, a list of ranges and a data object of mappings

Parameters:
rdfName -
templateName -
mappings -
ranges -

initRDFFile

public static String initRDFFile(String workingdir,
                                 String templateName)
                          throws Exception
Throws:
Exception

getRDFName

public static String getRDFName(String sourcePath)

getRelativePath

public static String getRelativePath(String fname,
                                     String sourcePath)

createNewNode

public static XMLBeanNode createNewNode(PersistenceEngine factory,
                                        String nodetype)
Create a new XMLBeanNode

Parameters:
factory -
nodetype -
Returns:


Copyright © 2011 Extentech Inc. All Rights Reserved.