com.partnersoft.v3x.text
Class SplittingNamer

java.lang.Object
  extended by com.partnersoft.v3x.text.SplittingNamer
All Implemented Interfaces:
ObjectNamer, java.io.Serializable, ObjectTransform

public class SplittingNamer
extends java.lang.Object
implements ObjectNamer

A transform that generates a String name for an object by first generating a group name, then then looking up another transform in a Map, then running that. It can of course be nested further. A default is provided if all else fails.

See Also:
Serialized Form

Constructor Summary
SplittingNamer()
          Create a new SplittingNamer.
 
Method Summary
 ObjectNamer getDefaultNamer()
          Gets the value of defaultNamer
 java.util.Map getGroupNamers()
          Gets the value of groupNamers
 java.lang.String getGroupNameTemplate()
          Gets the value of groupNameTemplate
 java.util.Set getRequiredPaths()
           
 void setDefaultNamer(ObjectNamer argDefaultNamer)
          Sets the value of defaultNamer
 void setGroupNamers(java.util.Map argGroupNamers)
          Sets the value of groupNamers
 void setGroupNameTemplate(java.lang.String argGroupNameTemplate)
          Sets the value of groupNameTemplate
 java.lang.Object transform(java.lang.Object source)
          Our one method; this transforms one object into another.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplittingNamer

public SplittingNamer()
Create a new SplittingNamer.

Method Detail

transform

public java.lang.Object transform(java.lang.Object source)
Description copied from interface: ObjectTransform
Our one method; this transforms one object into another. Transformation must be nondestructive, but may produce a derived product that is still affected by changes to the original, so beware.

Specified by:
transform in interface ObjectTransform

getRequiredPaths

public java.util.Set getRequiredPaths()
Specified by:
getRequiredPaths in interface ObjectNamer

getGroupNameTemplate

public java.lang.String getGroupNameTemplate()
Gets the value of groupNameTemplate

Returns:
the value of groupNameTemplate

setGroupNameTemplate

public void setGroupNameTemplate(java.lang.String argGroupNameTemplate)
Sets the value of groupNameTemplate

Parameters:
argGroupNameTemplate - Value to assign to this.groupNameTemplate

getGroupNamers

public java.util.Map getGroupNamers()
Gets the value of groupNamers

Returns:
the value of groupNamers

setGroupNamers

public void setGroupNamers(java.util.Map argGroupNamers)
Sets the value of groupNamers

Parameters:
argGroupNamers - Value to assign to this.groupNamers

getDefaultNamer

public ObjectNamer getDefaultNamer()
Gets the value of defaultNamer

Returns:
the value of defaultNamer

setDefaultNamer

public void setDefaultNamer(ObjectNamer argDefaultNamer)
Sets the value of defaultNamer

Parameters:
argDefaultNamer - Value to assign to this.defaultNamer