org.compass.core.mapping.osem
Class OsemMappingIterator.ClassPropertyAndResourcePropertyGatherer

java.lang.Object
  extended by org.compass.core.mapping.osem.OsemMappingIterator.ClassPropertyAndResourcePropertyGatherer
All Implemented Interfaces:
OsemMappingIterator.ClassMappingCallback
Direct Known Subclasses:
ClassMapping.PostProcessMappingCallback
Enclosing class:
OsemMappingIterator

public static class OsemMappingIterator.ClassPropertyAndResourcePropertyGatherer
extends Object
implements OsemMappingIterator.ClassMappingCallback

Gathers both ClassPropertyMappings and ResourcePropertyMappings.

Also performs duplicate detection for referenced aliases. Duplicate mappings might occur when the referenced alias is referencing several mappings (in case of the referenced class actually contructing an object tree). Mappings that exist in the base class will be travesrsed twice without the duplicate detection. The onBeginMultipleMapping(ClassMapping,org.compass.core.mapping.Mapping) detects such mappings, processes only the first one, and returns false for the rest (denoting not to continue the investigation of this referenced mapping).


Constructor Summary
OsemMappingIterator.ClassPropertyAndResourcePropertyGatherer()
           
 
Method Summary
 List<ClassPropertyMapping> getClassPropertyMappings()
           
 List<ResourcePropertyMapping> getResourcePropertyMappings()
           
 boolean onBeginClassMapping(ClassMapping classMapping)
           
 void onBeginCollectionMapping(AbstractCollectionMapping collectionMapping)
           
 boolean onBeginMultipleMapping(ClassMapping classMapping, Mapping mapping)
           
 void onCascadeMapping(ClassMapping classMapping, PlainCascadeMapping cascadeMapping)
           
 void onClassPropertyMapping(ClassMapping classMapping, ClassPropertyMapping classPropertyMapping)
           
 void onClassPropertyMetaDataMapping(ClassPropertyMetaDataMapping classPropertyMetaDataMapping)
           
 void onComponentMapping(ClassMapping classMapping, ComponentMapping componentMapping)
           
 void onConstantMetaDataMappaing(ClassMapping classMapping, ConstantMetaDataMapping constantMetaDataMapping)
           
protected  void onDuplicateMapping(ClassMapping classMapping, ObjectMapping actualMapping, ObjectMapping duplicateMapping)
           
 void onDynamicMetaDataMapping(ClassMapping classMapping, DynamicMetaDataMapping dynamicMetaDataMapping)
           
 void onEndClassMapping(ClassMapping classMapping)
           
 void onEndCollectionMapping(AbstractCollectionMapping collectionMapping)
           
 void onEndMultiplMapping(ClassMapping classMapping, Mapping mapping)
           
 void onParentMapping(ClassMapping classMapping, ParentMapping parentMapping)
           
 void onReferenceMapping(ClassMapping classMapping, ReferenceMapping referenceMapping)
           
 void onResourcePropertyMapping(ResourcePropertyMapping resourcePropertyMapping)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OsemMappingIterator.ClassPropertyAndResourcePropertyGatherer

public OsemMappingIterator.ClassPropertyAndResourcePropertyGatherer()
Method Detail

getClassPropertyMappings

public List<ClassPropertyMapping> getClassPropertyMappings()

getResourcePropertyMappings

public List<ResourcePropertyMapping> getResourcePropertyMappings()

onBeginClassMapping

public boolean onBeginClassMapping(ClassMapping classMapping)
Specified by:
onBeginClassMapping in interface OsemMappingIterator.ClassMappingCallback

onEndClassMapping

public void onEndClassMapping(ClassMapping classMapping)
Specified by:
onEndClassMapping in interface OsemMappingIterator.ClassMappingCallback

onBeginMultipleMapping

public boolean onBeginMultipleMapping(ClassMapping classMapping,
                                      Mapping mapping)
Specified by:
onBeginMultipleMapping in interface OsemMappingIterator.ClassMappingCallback

onDuplicateMapping

protected void onDuplicateMapping(ClassMapping classMapping,
                                  ObjectMapping actualMapping,
                                  ObjectMapping duplicateMapping)

onEndMultiplMapping

public void onEndMultiplMapping(ClassMapping classMapping,
                                Mapping mapping)
Specified by:
onEndMultiplMapping in interface OsemMappingIterator.ClassMappingCallback

onBeginCollectionMapping

public void onBeginCollectionMapping(AbstractCollectionMapping collectionMapping)
Specified by:
onBeginCollectionMapping in interface OsemMappingIterator.ClassMappingCallback

onEndCollectionMapping

public void onEndCollectionMapping(AbstractCollectionMapping collectionMapping)
Specified by:
onEndCollectionMapping in interface OsemMappingIterator.ClassMappingCallback

onClassPropertyMapping

public void onClassPropertyMapping(ClassMapping classMapping,
                                   ClassPropertyMapping classPropertyMapping)
Specified by:
onClassPropertyMapping in interface OsemMappingIterator.ClassMappingCallback

onParentMapping

public void onParentMapping(ClassMapping classMapping,
                            ParentMapping parentMapping)
Specified by:
onParentMapping in interface OsemMappingIterator.ClassMappingCallback

onCascadeMapping

public void onCascadeMapping(ClassMapping classMapping,
                             PlainCascadeMapping cascadeMapping)
Specified by:
onCascadeMapping in interface OsemMappingIterator.ClassMappingCallback

onComponentMapping

public void onComponentMapping(ClassMapping classMapping,
                               ComponentMapping componentMapping)
Specified by:
onComponentMapping in interface OsemMappingIterator.ClassMappingCallback

onReferenceMapping

public void onReferenceMapping(ClassMapping classMapping,
                               ReferenceMapping referenceMapping)
Specified by:
onReferenceMapping in interface OsemMappingIterator.ClassMappingCallback

onConstantMetaDataMappaing

public void onConstantMetaDataMappaing(ClassMapping classMapping,
                                       ConstantMetaDataMapping constantMetaDataMapping)
Specified by:
onConstantMetaDataMappaing in interface OsemMappingIterator.ClassMappingCallback

onClassPropertyMetaDataMapping

public void onClassPropertyMetaDataMapping(ClassPropertyMetaDataMapping classPropertyMetaDataMapping)
Specified by:
onClassPropertyMetaDataMapping in interface OsemMappingIterator.ClassMappingCallback

onDynamicMetaDataMapping

public void onDynamicMetaDataMapping(ClassMapping classMapping,
                                     DynamicMetaDataMapping dynamicMetaDataMapping)
Specified by:
onDynamicMetaDataMapping in interface OsemMappingIterator.ClassMappingCallback

onResourcePropertyMapping

public void onResourcePropertyMapping(ResourcePropertyMapping resourcePropertyMapping)
Specified by:
onResourcePropertyMapping in interface OsemMappingIterator.ClassMappingCallback


Copyright (c) 2004-2008 The Compass Project.