|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.org.ogsadai.dqp.lqp.SimpleRenameMap
public class SimpleRenameMap
Simple implementation of the RenameMap interface.
| Constructor Summary | |
|---|---|
SimpleRenameMap()
Constructor. |
|
SimpleRenameMap(java.util.List<Attribute> originalAttrList,
java.util.List<Attribute> renamedAttrList)
Constructor. |
|
| Method Summary | |
|---|---|
void |
add(Attribute originalAttribute,
Attribute renamedAttribute)
Adds the attribute mapping from original to renamed attribute. |
Attribute |
getOriginalAttribute(Attribute renamedAttribute)
Get original (input) attribute. |
java.util.List<Attribute> |
getOriginalAttributeList()
Get an ordered list of original attributes. |
RenameMap |
getOriginalToRenamedMap(java.util.List<Attribute> attributeList)
Gets a map of original attributes as keys and renamed attributes as values |
Attribute |
getRenamedAttribute(Attribute originalAttribute)
Get renamed (output) attribute. |
java.util.List<Attribute> |
getRenamedAttributeList()
Get an ordered list of renamed attributes. |
RenameMap |
getRenamedToOriginalMap(java.util.Collection<Attribute> attributes)
Gets a map with renamed attributes as keys and original attributes as values. |
void |
removeRenamedAttribute(Attribute attr)
Removes the renamed attributes for the renaming list. |
void |
resetRenamedAttributeSources(java.lang.String newSource)
Resets source in each attribute that belongs to the renamed attributes list. |
void |
setAttributeMatchMode(AttributeMatchMode matchMode)
Sets attribute match mode. |
int |
size()
Gets the number of entries in the map. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleRenameMap()
public SimpleRenameMap(java.util.List<Attribute> originalAttrList,
java.util.List<Attribute> renamedAttrList)
originalAttrList - a list of original attributesrenamedAttrList - a list of renamed attributes| Method Detail |
|---|
public void add(Attribute originalAttribute,
Attribute renamedAttribute)
add in interface RenameMaporiginalAttribute - original (input) attributerenamedAttribute - renamed (output) attribute
public Attribute getOriginalAttribute(Attribute renamedAttribute)
throws AmbiguousAttributeException,
AmbiguousMappingException
getOriginalAttribute in interface RenameMaprenamedAttribute - renamed (output) attribute
null if no mapping
exists
AmbiguousAttributeException - when renamed attribute is not unique in the list of renamed
attributes
AmbiguousMappingException - when an attribute could map to several original attributes if
we would to ignore positioning
public Attribute getRenamedAttribute(Attribute originalAttribute)
throws AmbiguousAttributeException,
AmbiguousMappingException
getRenamedAttribute in interface RenameMaporiginalAttribute - original (input) attribute
null if no mapping exists
AmbiguousAttributeException - when original attribute is not unique in the list of original
attributes
AmbiguousMappingException - when an attribute could map to several renamed attributes if
we would to ignore positioning (id, id, id) -> (id, id,
ident)public java.util.List<Attribute> getOriginalAttributeList()
getOriginalAttributeList in interface RenameMappublic java.util.List<Attribute> getRenamedAttributeList()
getRenamedAttributeList in interface RenameMappublic void resetRenamedAttributeSources(java.lang.String newSource)
resetRenamedAttributeSources in interface RenameMapnewSource - new source name
public RenameMap getRenamedToOriginalMap(java.util.Collection<Attribute> attributes)
throws AmbiguousMappingException,
AmbiguousAttributeException
getRenamedToOriginalMap in interface RenameMapattributes - a collection of renamed attributes
AmbiguousMappingException - if an attribute maps to an attribute in attributeList
AmbiguousAttributeException - if there are several possible mappings
public RenameMap getOriginalToRenamedMap(java.util.List<Attribute> attributeList)
throws AmbiguousMappingException,
AmbiguousAttributeException
getOriginalToRenamedMap in interface RenameMapattributeList - a list of original attributes
AmbiguousMappingException - if an attribute maps to an attribute in attributeList
AmbiguousAttributeException - if there are several possible mappingspublic int size()
size in interface RenameMappublic void removeRenamedAttribute(Attribute attr)
removeRenamedAttribute in interface RenameMapattr - renamed attribute to be removed.public void setAttributeMatchMode(AttributeMatchMode matchMode)
NAME_AND_NULL_SOURCE.
setAttributeMatchMode in interface RenameMappublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||