uk.apl.jxc.mapper
Class XMLMapping

java.lang.Object
  extended by uk.apl.jxc.mapper.AbstractXMLMapping
      extended by uk.apl.jxc.mapper.XMLMapping

public class XMLMapping
extends AbstractXMLMapping

Encapsulates the mapping of an XML element to another schema

Author:
Andrew Leigh

Constructor Summary
XMLMapping(java.lang.String sourcePath, java.lang.String targetPath)
          Constructs a new AbstractXMLMapping
XMLMapping(java.lang.String sourcePath, java.lang.String targetPath, java.lang.String condition)
          Constructs a new AbstractXMLMapping
XMLMapping(java.lang.String sourcePath, java.lang.String targetPath, java.lang.String condition, XSLTFunction function)
          Constructs a new AbstractXMLMapping
 
Method Summary
 boolean isDefault()
          When true the value of sourcePath will be defaulted as a literal value into the target instead of being used to select from the source schema.
 
Methods inherited from class uk.apl.jxc.mapper.AbstractXMLMapping
conditionsEqual, create, getCondition, getDefaultValue, getFunction, getSelectString, getSourcePath, getTargetElementName, getTargetPath, isAttribute, isConditional, isEmpty, isRootElement, isTargetAttributeOrLeaf, targetsEqual
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLMapping

public XMLMapping(java.lang.String sourcePath,
                  java.lang.String targetPath)
Constructs a new AbstractXMLMapping

Parameters:
sourcePath - path to and including the element or attribute in the source schema
targetPath - path to and including the element or attribute in the target schema
Throws:
InvalidMappingException - if an attempt is made to construct an XMLMapping with a null or empty sourcePath or targetPath
See Also:
AbstractXMLMapping.create(java.lang.String, java.lang.String, java.lang.String, uk.apl.jxc.XSLTFunction, java.lang.String)

XMLMapping

public XMLMapping(java.lang.String sourcePath,
                  java.lang.String targetPath,
                  java.lang.String condition)
Constructs a new AbstractXMLMapping

Parameters:
sourcePath - path to and including the element or attribute in the source schema
targetPath - path to and including the element or attribute in the target schema
condition - a boolean XPath condition for the mapping, the mapping will only be performed if the condition evaluates to true
Throws:
InvalidMappingException - if an attempt is made to construct an XMLMapping with a null or empty sourcePath or targetPath
See Also:
AbstractXMLMapping.create(java.lang.String, java.lang.String, java.lang.String, uk.apl.jxc.XSLTFunction, java.lang.String)

XMLMapping

public XMLMapping(java.lang.String sourcePath,
                  java.lang.String targetPath,
                  java.lang.String condition,
                  XSLTFunction function)
Constructs a new AbstractXMLMapping

Parameters:
sourcePath - path to and including the element or attribute in the source schema
targetPath - path to and including the element or attribute in the target schema
condition - a boolean XPath condition for the mapping, the mapping will only be performed if the condition evaluates to true
function - an XPath function to be applied to the mapping
Throws:
InvalidMappingException - if an attempt is made to construct an XMLMapping with a null or empty sourcePath or targetPath
See Also:
AbstractXMLMapping.create(java.lang.String, java.lang.String, java.lang.String, uk.apl.jxc.XSLTFunction, java.lang.String)
Method Detail

isDefault

public boolean isDefault()
When true the value of sourcePath will be defaulted as a literal value into the target instead of being used to select from the source schema.

Specified by:
isDefault in class AbstractXMLMapping
Returns:
always false indicating this is not a default mapping
See Also:
XMLDefault


Copyright 2010 Andrew Leigh. All Rights Reserved.