org.exolab.castor.builder.conflict.strategy

Class BaseClassNameConflictResolver

Implemented Interfaces:
ClassNameConflictResolver
Known Direct Subclasses:
TypeClassNameConflictResolver, XPATHClassNameConflictResolver

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

Base class for class name conflict resolver implementations.
Author:
Werner Guttmann

Method Summary

protected String
calculateXPathPrefix(String xpath)
Calculate XPath prefix.
abstract void
changeClassInfoAsResultOfConflict(JClass jClass, String xpath, 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.

Method Details

calculateXPathPrefix

protected String calculateXPathPrefix(String xpath)
Calculate XPath prefix.
Parameters:
xpath - The XPath to be transformed into a class name prefix
Returns:
The class name prefix to use.

changeClassInfoAsResultOfConflict

public abstract void changeClassInfoAsResultOfConflict(JClass jClass,
                                                       String xpath,
                                                       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

getSourceGenerator

protected SourceGenerator getSourceGenerator()
Returns the calling SourceGenerator instance.
Returns:
the calling SourceGenerator instance

setSourceGenerator

public void setSourceGenerator(SourceGenerator sourceGenerator)
Sets the calling SourceGenerator instance.
Specified by:
setSourceGenerator in interface ClassNameConflictResolver
Parameters:
sourceGenerator - The calling SourceGenerator instance.

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