org.formaria.builder.generic
Class ComponentMapping

java.lang.Object
  extended by org.formaria.builder.generic.ComponentMapping

public class ComponentMapping
extends java.lang.Object

A mapping for converting the file type to a component type or a set of component types

Copyright (c) Formaria Ltd., 2001-2008, This software is licensed under the GNU Public License (GPL), please see license.txt for more details. If you make commercial use of this software you must purchase a commercial license from Formaria.


Constructor Summary
ComponentMapping(java.lang.String tag)
          Creates a new instance of ComponentMapping
 
Method Summary
 void addAttributeMapping(java.lang.String srcAttrib, java.lang.String destAttrib, java.lang.String componentRef, java.lang.String destValue)
           
 void addComponentType(java.lang.String typeStr, java.lang.String name, int spans, boolean isMain)
          Add a Aria component types to be output when the mapped element is processed
 java.util.ArrayList getAttributeMapping()
          Get the attributes supported by this mapping
 java.util.ArrayList getComponentTypes()
          Get the component types supported by this mapping
 java.lang.Object[] getMatchParams()
          Get the additional match parameters - if any
 java.lang.String getTag()
          Get the mapping's tag
 java.lang.String getTypeName()
          Return the type associated with this mapping
 void setMatchParams(java.lang.Object[] mp)
          Get the additional match parameters - if any
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentMapping

public ComponentMapping(java.lang.String tag)
Creates a new instance of ComponentMapping

Parameters:
tag - the file format tag used to identify the component type
Method Detail

addComponentType

public void addComponentType(java.lang.String typeStr,
                             java.lang.String name,
                             int spans,
                             boolean isMain)
Add a Aria component types to be output when the mapped element is processed

Parameters:
typeStr - the type of component to be instantiated
name - the name by which the component is referenced within the mapping
span - the number of components this component contains

addAttributeMapping

public void addAttributeMapping(java.lang.String srcAttrib,
                                java.lang.String destAttrib,
                                java.lang.String componentRef,
                                java.lang.String destValue)

getTag

public java.lang.String getTag()
Get the mapping's tag

Returns:
the tag

getTypeName

public java.lang.String getTypeName()
Return the type associated with this mapping

Returns:
the type name

getComponentTypes

public java.util.ArrayList getComponentTypes()
Get the component types supported by this mapping

Returns:
the list of types

getAttributeMapping

public java.util.ArrayList getAttributeMapping()
Get the attributes supported by this mapping

Returns:
the attribute mappings

getMatchParams

public java.lang.Object[] getMatchParams()
Get the additional match parameters - if any

Returns:
the parameters or null

setMatchParams

public void setMatchParams(java.lang.Object[] mp)
Get the additional match parameters - if any

Parameters:
mp - the new match parameters