Docmosis API 4.5.0

com.docmosis.template.population
Class DataProviderKeyParser

java.lang.Object
  extended bycom.docmosis.template.population.DataProviderKeyParser

public class DataProviderKeyParser
extends Object

A utility class to parse keys for data provider elements.


Constructor Summary
DataProviderKeyParser()
           
 
Method Summary
static DataProviderCall parse(String key)
          Parse a key to fit into a hierarchical structure of a memory data provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataProviderKeyParser

public DataProviderKeyParser()
Method Detail

parse

public static DataProviderCall parse(String key)
                              throws DataProviderKeyException
Parse a key to fit into a hierarchical structure of a memory data provider.

Parameters:
key - the key to parse. Value types of keys include: - hotel - hotel.5 - hotel.floor - hotel.3.floor - hotel.floor.2 - hotel.1.floor.3 - hotel.0.floor.4.room.6 Keys may not start with a number. e.g. 0.hotel.2 is not valid. Keys may not have two consecutive numbers. e.g. hotel.1.2.floor.2 is not valid.
Returns:
an object that maps that actual call to the data provider to insert or retrieve the data.
Throws:
DataProviderKeyException - if an invalid key (as per the above examples) is passed in. It is recommended that if this method is being called in bulk, that these exceptions be logged as an error or warn, but not be fatal.

Docmosis API 4.5.0

Copyright © 2014 Docmosis Pty Ltd. All Rights Reserved.