|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.base.FormatElement | +--com.ibm.dse.services.ldap.MapFormat
This class represents a pseudo Composer format. It specifies a set of data mappings between one context and another. For each mapping defined in the map, an additional format can be specified. Given an externalized mapping definition:
Calling format on the map will, for the above 1) Create the format corresponding to the fString tag, and set the name of its data element to be userName 2) Call format(Context) on the format and store the string value returned in the data element named UN in contextB.
Field Summary | |
protected static java.lang.String |
endingTagName
|
Fields inherited from class com.ibm.dse.base.FormatElement |
dataElementName,
name |
Constructor Summary | |
MapFormat()
Map constructor. |
Method Summary | |
void |
addMapping(Mapping mapping)
Adds supplied mapping to this map. |
void |
addMapping(java.lang.Object key,
Mapping aMapping)
Add a mapping to this map. |
java.lang.String |
convertMapToString(Context sourceContext,
Context targetContext)
|
void |
deRegisterFormat(Mapping mapping)
Removes the format defined for the supplied mapping, if it exists. |
void |
deRegisterFormat(java.lang.Object key)
Removes the format defined for the supplied key, if it exists. |
java.lang.String |
format()
Functionally equivalent to calling format(Context, Context), except that the function will obtain the source and target context from the source and target context attributes of this class. |
java.lang.String |
format(Context sourceContext)
Functionally equivalent to calling format(Context, Context), except that the function will obtain the target context from the target context attribute of this class. |
java.lang.String |
format(Context sourceContext,
Context targetContext)
This function causes the transfer of data values from the source context to the target context. |
java.lang.String |
format(DataElement element)
The traditional format(DataElement) method. |
protected FormatElement |
getFormat(java.lang.String name)
Obtains a format instance depending on the supplied name. |
Mapping |
getMapping(java.lang.Object key)
Returns the mapping associated with the given key. |
java.lang.String |
getName()
Returns the name of this format element. |
Context |
getSourceContext()
Returns the source context attribute of this format element. |
java.lang.String |
getSourceContextName()
Returns the source context name attribute of this format element. |
java.lang.String |
getSourcePrefix()
Returns the source prefix attribute of this format element. |
Context |
getTargetContext()
Returns the target context attribute of this format element. |
java.lang.String |
getTargetContextName()
Returns the target context name attribute of this format element. |
java.lang.String |
getTargetPrefix()
Returns the target prefix attribute of this format element. |
java.lang.Object |
initializeFrom(Tag aTag)
Initializes the state of this format element from externalized data. |
java.util.Enumeration |
keys()
Returns the keys of this Map. |
void |
registerFormat(Mapping mapping,
FormatElement format)
Registers the supplied format to the supplied mapping. |
void |
registerFormat(java.lang.Object key,
FormatElement format)
Registers the supplied format to the supplied key. |
void |
removeMapping(Mapping mapping)
Removes this mapping from the map. |
void |
removeMapping(java.lang.Object key)
Removes this mapping from the map. |
void |
setName(java.lang.String newName)
Sets the name of this format element. |
void |
setSourceContext(Context newSourceContext)
Sets the source context attribute of this format element. |
void |
setSourceContextName(java.lang.String newSourceContextName)
Sets the source context name attribute of this format element. |
void |
setSourcePrefix(java.lang.String newSourcePrefix)
Sets the source prefix attribute of this format element. |
void |
setTargetContext(Context newTargetContext)
Sets the target context attribute of this format element. |
void |
setTargetContextName(java.lang.String newTargetContextName)
Sets the target context name attribute of this format element. |
void |
setTargetPrefix(java.lang.String newTargetPrefix)
Sets the target prefix attribute of this format element. |
Vector |
toStrings()
Returns a vector containing the string representation of the SGML tags used to externalize this object. |
DataElement |
unformat(java.lang.String str,
DataElement element)
This method is unused. |
Methods inherited from class com.ibm.dse.base.FormatElement |
exceptionInfo,
externalizer,
extract,
format,
getDataElementName,
getExternalizer,
getTagName,
isCacheable,
isConstant,
readExternal,
readExternal,
readObject,
reinitialize,
removeExternal,
rootDecorated,
setDataElementName,
setExternalizer,
setSize,
toString,
toTags,
unformat,
unformat,
writeExternal,
writeExternal |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected static final java.lang.String endingTagName
Constructor Detail |
public MapFormat()
Method Detail |
public void addMapping(Mapping mapping)
mapping
- com.ibm.dse.services.ldap.Mappingpublic void addMapping(java.lang.Object key, Mapping aMapping)
key
- java.lang.Objectmapping
- com.ibm.dse.services.ldap.Mappingpublic java.lang.String convertMapToString(Context sourceContext, Context targetContext) throws DSEInvalidRequestException
public void deRegisterFormat(Mapping mapping)
mapping
- com.ibm.dse.services.ldap.Mappingpublic void deRegisterFormat(java.lang.Object key)
key
- java.lang.Objectpublic java.lang.String format() throws DSEInvalidRequestException, DSEInvalidClassException, DSEInvalidArgumentException
public java.lang.String format(Context sourceContext) throws DSEInvalidRequestException, DSEInvalidClassException, DSEInvalidArgumentException
sourceContext
- com.ibm.dse.base.Contextpublic java.lang.String format(Context sourceContext, Context targetContext) throws DSEInvalidRequestException, DSEInvalidClassException, DSEInvalidArgumentException
sourceContext
- com.ibm.dse.base.ContexttargetContext
- com.ibm.dse.base.Contextpublic java.lang.String format(DataElement element) throws DSEInvalidClassException, DSEInvalidRequestException, DSEInvalidArgumentException
element
- com.ibm.dse.base.DataElementprotected FormatElement getFormat(java.lang.String name)
name
- java.lang.Stringpublic Mapping getMapping(java.lang.Object key)
key
- java.lang.Objectpublic java.lang.String getName()
public Context getSourceContext()
public java.lang.String getSourceContextName()
public java.lang.String getSourcePrefix()
public Context getTargetContext()
public java.lang.String getTargetContextName()
public java.lang.String getTargetPrefix()
public java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException, DSEException
aTag
- com.ibm.dse.base.Tagpublic java.util.Enumeration keys()
public void registerFormat(Mapping mapping, FormatElement format)
mapping
- com.ibm.dse.services.ldap.Mappingformat
- com.ibm.dse.base.FormatElementpublic void registerFormat(java.lang.Object key, FormatElement format)
key
- java.lang.Objectformat
- com.ibm.dse.base.FormatElementpublic void removeMapping(Mapping mapping)
hashcode
attribute of the mapping.mapping
- com.ibm.dse.services.ldap.Mappingpublic void removeMapping(java.lang.Object key)
mapping
- com.ibm.dse.services.ldap.Mappingpublic void setName(java.lang.String newName)
newName
- java.lang.Stringpublic void setSourceContext(Context newSourceContext)
newSourceContext
- com.ibm.dse.base.Contextpublic void setSourceContextName(java.lang.String newSourceContextName)
newSourceContextName
- java.lang.Stringpublic void setSourcePrefix(java.lang.String newSourcePrefix)
newSourcePrefix
- java.lang.Stringpublic void setTargetContext(Context newTargetContext)
newTargetContext
- com.ibm.dse.base.Contextpublic void setTargetContextName(java.lang.String newTargetContextName)
newTargetContextName
- java.lang.Stringpublic void setTargetPrefix(java.lang.String newTargetPrefix)
newTargetPrefix
- java.lang.Stringpublic Vector toStrings()
public DataElement unformat(java.lang.String str, DataElement element) throws DSEInvalidRequestException, DSEInvalidArgumentException
str
- java.lang.Stringelement
- com.ibm.dse.base.DataElement
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |