org.exolab.castor.builder.conflict.strategy
Class BaseClassNameConflictResolver

java.lang.Object
  extended by org.exolab.castor.builder.conflict.strategy.BaseClassNameConflictResolver
All Implemented Interfaces:
ClassNameConflictResolver
Direct Known Subclasses:
TypeClassNameConflictResolver, XPATHClassNameConflictResolver

public abstract class BaseClassNameConflictResolver
extends java.lang.Object
implements ClassNameConflictResolver

Base class for class name conflict resolver implementations.

Author:
Werner Guttmann

Constructor Summary
BaseClassNameConflictResolver()
           
 
Method Summary
protected  java.lang.String calculateXPathPrefix(java.lang.String xpath)
          Calculate XPath prefix.
abstract  void changeClassInfoAsResultOfConflict(JClass jClass, java.lang.String xpath, java.lang.String typedXPath, Annotated annotated)
          Changes the JClass' internal class name, as a result of an XPATH expression uniquely identifying an XML artefact within an XML schema.
protected  SourceGenerator getSourceGenerator()
          Returns the calling SourceGenerator instance.
 void setSourceGenerator(SourceGenerator sourceGenerator)
          Sets the calling SourceGenerator instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseClassNameConflictResolver

public BaseClassNameConflictResolver()
Method Detail

changeClassInfoAsResultOfConflict

public abstract void changeClassInfoAsResultOfConflict(JClass jClass,
                                                       java.lang.String xpath,
                                                       java.lang.String typedXPath,
                                                       Annotated annotated)
Changes the JClass' internal class name, as a result of an XPATH expression uniquely identifying an XML artefact within an XML schema.

Specified by:
changeClassInfoAsResultOfConflict in interface ClassNameConflictResolver
Parameters:
jClass - The JClass instance whose local name should be changed.
xpath - XPATH expression used to defer the new local class name
typedXPath - typed XPATH expression used to defer the new local class name
annotated - Annotated instance

calculateXPathPrefix

protected java.lang.String calculateXPathPrefix(java.lang.String xpath)
Calculate XPath prefix.

Parameters:
xpath - The XPath to be transformed into a class name prefix
Returns:
The class name prefix to use.

setSourceGenerator

public void setSourceGenerator(SourceGenerator sourceGenerator)
Sets the calling SourceGenerator instance.

Specified by:
setSourceGenerator in interface ClassNameConflictResolver
Parameters:
sourceGenerator - The calling SourceGenerator instance.

getSourceGenerator

protected SourceGenerator getSourceGenerator()
Returns the calling SourceGenerator instance.

Returns:
the calling SourceGenerator instance


Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com