cz.cuni.versatile.api.relops
Interface Many2OneMapping

All Superinterfaces:
PropertyMapping

public interface Many2OneMapping
extends PropertyMapping

A mapping which corresponds to an ordinary n-ary function (P1, P2, P3, ..., Pn) -> Pm.

It is used if there is a need to combine several simpler properties into a single property and then use this target property in the versioning code.

UAProf example: use BrowserUA.* (HtmlVersion, XhtmlVersion, BrowserVersion, BrowserName) and WapCharacteristics.* (WapVersion, WmlVersion, WmlScriptVersion) to derive a single DeviceMarkupClass, a hierarchical classification (taxonomy), to simplify the decisions based on a device markup capabilities.

Author:
Jaroslav Gergic

Method Summary
 Property[] getDomain()
          Returns an ordered list of properties which form a domain of this mapping.
 Property getRange()
          Returns a range of this mapping.
 java.lang.Object mapValue(java.lang.Object[] dom)
          Executes the actual transformation - a mapping.
 
Methods inherited from interface cz.cuni.versatile.api.relops.PropertyMapping
getDomainSet, getRangeSet, getReverse, providesReverse
 

Method Detail

getDomain

public Property[] getDomain()
Returns an ordered list of properties which form a domain of this mapping.

Returns:
an ordered list of domain properties
See Also:
PropertyMapping.getDomainSet()

getRange

public Property getRange()
Returns a range of this mapping.

Returns:
a range property

mapValue

public java.lang.Object mapValue(java.lang.Object[] dom)
Executes the actual transformation - a mapping.

Parameters:
dom - an ordered list of domain properties values (the order must correspond to the getDomain() method)
Returns:
a range property value