Package de.xima.fc.word
Class AsposeSimpleDataAdapter
- java.lang.Object
-
- de.xima.fc.word.AsposeSimpleDataAdapter
-
- All Implemented Interfaces:
IDataAdapter,IReplacer
public class AsposeSimpleDataAdapter extends Object implements IDataAdapter, IReplacer
-
-
Field Summary
Fields Modifier and Type Field Description static StringMATCHER_DYNAMIC_FIELD_REF
-
Constructor Summary
Constructors Constructor Description AsposeSimpleDataAdapter(HashMap<String,String> values)Deprecated.AsposeSimpleDataAdapter(Map<String,String> values)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringasStringValue(String[] value)StringasStringValue(List<String[]> value)HashMap<String,HashMap<String,String>>getFieldOptions(String identifier, boolean asAlias)A map with the select option for a given form field, usually a select field.List<String[]>getFieldValues(String fieldName)Map<String,List<String[]>>getFieldValuesMap()List<String[]>getFieldValuesMe(String fieldName)EReplacementInsertionTypegetInsertionType(String name)Map<String,String>getMetaDataMap()List<Pattern>getPatternList()String[]getStringsAsVal(String... val)booleanhasField(String fieldName)ERSTMAL: Lieferttrue, wenn das Formular ein Feld mit dem übergebenen Namen besitzt.booleanisElementLooped(String elementName)Diese Methode dient dazu, zu überprüfen ob ein Element ein Looped-Element istintloopCount(String elementName)Diese Methode dient dazu, die Anzahl der sich wiederholenden Elemente zu ermittelnbooleanmatchPlaceholder(String text)StringreplaceValue(String fieldName, IDataAdapter dataAdapter)StringresolveAliasName(String alias)
-
-
-
Field Detail
-
MATCHER_DYNAMIC_FIELD_REF
public static final String MATCHER_DYNAMIC_FIELD_REF
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AsposeSimpleDataAdapter
public AsposeSimpleDataAdapter(Map<String,String> values)
- Parameters:
values- Values for replacing placeholders in the document.
-
AsposeSimpleDataAdapter
@Deprecated public AsposeSimpleDataAdapter(HashMap<String,String> values)
Deprecated.- Parameters:
values- Values for replacing placeholders in the document.
-
-
Method Detail
-
replaceValue
public String replaceValue(String fieldName, IDataAdapter dataAdapter)
- Specified by:
replaceValuein interfaceIReplacer
-
getInsertionType
public EReplacementInsertionType getInsertionType(String name)
- Specified by:
getInsertionTypein interfaceIReplacer
-
getPatternList
public List<Pattern> getPatternList()
- Specified by:
getPatternListin interfaceIReplacer
-
matchPlaceholder
public boolean matchPlaceholder(String text)
- Specified by:
matchPlaceholderin interfaceIReplacer
-
getFieldValues
public List<String[]> getFieldValues(String fieldName)
- Specified by:
getFieldValuesin interfaceIDataAdapter
-
hasField
public boolean hasField(String fieldName)
Description copied from interface:IDataAdapterERSTMAL: Lieferttrue, wenn das Formular ein Feld mit dem übergebenen Namen besitzt.- Specified by:
hasFieldin interfaceIDataAdapter- Parameters:
fieldName- Name des Feldes- Returns:
- Liefert
true, wenn das Formular ein Feld mit dem übergebenen Namen besitzt
-
getFieldValuesMap
public Map<String,List<String[]>> getFieldValuesMap()
- Specified by:
getFieldValuesMapin interfaceIDataAdapter
-
isElementLooped
public boolean isElementLooped(String elementName)
Description copied from interface:IDataAdapterDiese Methode dient dazu, zu überprüfen ob ein Element ein Looped-Element ist- Specified by:
isElementLoopedin interfaceIDataAdapter- Parameters:
elementName- - Name des Elements dessen Looped-Eigenschaft geprüft werden soll- Returns:
truewenn das Element looped ist, ansonstenfalse
-
loopCount
public int loopCount(String elementName)
Description copied from interface:IDataAdapterDiese Methode dient dazu, die Anzahl der sich wiederholenden Elemente zu ermitteln- Specified by:
loopCountin interfaceIDataAdapter- Parameters:
elementName- - Name des Elements, für welches die Anzahl ermittelt werden soll- Returns:
- Anzahl der Elementwiederholungen oder
0wenn Element nicht looped ist
-
getMetaDataMap
public Map<String,String> getMetaDataMap()
- Specified by:
getMetaDataMapin interfaceIDataAdapter
-
resolveAliasName
public String resolveAliasName(String alias)
- Specified by:
resolveAliasNamein interfaceIDataAdapter
-
getStringsAsVal
public String[] getStringsAsVal(String... val)
- Specified by:
getStringsAsValin interfaceIDataAdapter
-
getFieldOptions
public HashMap<String,HashMap<String,String>> getFieldOptions(String identifier, boolean asAlias)
Description copied from interface:IDataAdapterA map with the select option for a given form field, usually a select field. The key is the value of the select option, the value is another map with the display text and title of the option. For example:{1={text=Option 1, title=}, 2={text=Option 2, title=}, 3={text=Option 3, title=}}That map may also contain additional columns for a given select option, when available, e.g.:{ Bahamas={text=Bahamas, Suchbegriff=Bahamas, Staatsname amtliche Kurzform=Bahamas, Staatsname amtliche Vollform=das Commonwealth der Bahamas, Staatsangehörigkeit=bahamaisch, Konti-nent=AME, ISO 3166-2=BS, ISO-3166-3=BHS, Destatis- BEV-Code=324}, Côte d’Ivoire={text=Côte d'Ivoire, Suchbegriff=Côte d'Ivoire, Staatsname amtliche Kurzform=Côte d’Ivoire, Staatsname amtliche Vollform=die Republik Côte d’Ivoire, Staatsangehörigkeit=ivorisch, Konti-nent=AFR, ISO 3166-2=CI, ISO-3166-3=CIV, Destatis- BEV-Code=231}, Jamaika={text=Jamaika, Suchbegriff=Jamaika, Staatsname amtliche Kurzform=Jamaika, Staatsname amtliche Vollform=Jamaika, Staatsangehörigkeit=jamaikanisch, Konti-nent=AME, ISO 3166-2=JM, ISO-3166-3=JAM, Destatis- BEV-Code=355} }- Specified by:
getFieldOptionsin interfaceIDataAdapter- Parameters:
identifier- A form field name or alias.asAlias- Whentrue, theidentifiershould be interpreted as an alias; whenfalse, theidentifiershould be interpreted as an element name.- Returns:
- A map with all options for the given field, if any.
-
asStringValue
public String asStringValue(List<String[]> value)
- Specified by:
asStringValuein interfaceIDataAdapter
-
asStringValue
public String asStringValue(String[] value)
- Specified by:
asStringValuein interfaceIDataAdapter
-
-