org.compass.core.mapping.osem
Class ClassMapping

java.lang.Object
  extended by org.compass.core.mapping.AbstractMapping
      extended by org.compass.core.mapping.AbstractMultipleMapping
          extended by org.compass.core.mapping.AbstractResourceMapping
              extended by org.compass.core.mapping.osem.ClassMapping
All Implemented Interfaces:
AliasMapping, Mapping, MultipleMapping, PostProcessingMapping, ResourceMapping

public class ClassMapping
extends AbstractResourceMapping
implements ResourceMapping, PostProcessingMapping

Author:
kimchy

Field Summary
 
Fields inherited from class org.compass.core.mapping.AbstractMultipleMapping
mappings, mappingsMap
 
Constructor Summary
ClassMapping()
           
 
Method Summary
 Mapping copy()
          Copies over the mapping definition into a newly instanciated Mapping object.
protected  void doPostProcess()
          Post process by using the dynamic find operations to cache them.
 List findClassPropertyIdMappings()
          Dynamically finds all the ClassIdPropertyMappings for the class.
 String getClassPath()
           
 ClassIdPropertyMapping[] getClassPropertyIdMappings()
           
 ClassPropertyMapping[] getClassPropertyMappings()
           
 Class getClazz()
           
 ResourcePropertyMapping getResourcePropertyMappingByDotPath(String path)
          Returns the ResourcePropertyMapping that match the given path "dot" path (a.bValue.value), or null if none exists.
 ResourcePropertyMapping[] getResourcePropertyMappings()
          Returns all the resource property mappings that are assoicated with the resource mapping.
 boolean isIncludePropertiesWithNoMappingsInAll()
          Returns true if when adding the different Resource properties, properties with no mappings will be added to the "all" property.
 boolean isPoly()
           
 void setClassPath(String classPath)
           
 void setClazz(Class clazz)
           
 void setPoly(boolean poly)
           
 AliasMapping shallowCopy()
           
 
Methods inherited from class org.compass.core.mapping.AbstractResourceMapping
addMapping, copy, getAlias, getAllAnalyzer, getAllProperty, getAllTermVector, getAnalyzer, getAnalyzerController, getBoost, getExtendedMappings, getIdMappings, getResourcePropertyMapping, getResourcePropertyMappingByPath, getResourcePropertyMappings, getResourcePropertyNames, getSubIndex, hasSpecificAnalyzerPerResourceProperty, isAllSupported, isRoot, postProcess, setAlias, setAllAnalyzer, setAllProperty, setAllSupported, setAllTermVector, setAnalyzer, setAnalyzerController, setBoost, setExtendedMappings, setRoot, setSubIndex, shallowCopy
 
Methods inherited from class org.compass.core.mapping.AbstractMultipleMapping
clearMappings, copy, getMapping, getMapping, mappingsIt, mappingsSize, removeExistingByName, removeExistingByPath, shallowCopy
 
Methods inherited from class org.compass.core.mapping.AbstractMapping
controlsObjectNullability, copy, getConverter, getConverterName, getName, getPath, setConverter, setConverterName, setName, setPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.compass.core.mapping.ResourceMapping
getAlias, getAllAnalyzer, getAllProperty, getAllTermVector, getAnalyzer, getAnalyzerController, getBoost, getIdMappings, getResourcePropertyMapping, getResourcePropertyMappingByPath, getResourcePropertyMappings, getResourcePropertyNames, getSubIndex, hasSpecificAnalyzerPerResourceProperty, isAllSupported, isRoot
 
Methods inherited from interface org.compass.core.mapping.Mapping
controlsObjectNullability, getConverter, getConverterName, getName, getPath, setConverter, setConverterName, setName, setPath
 
Methods inherited from interface org.compass.core.mapping.PostProcessingMapping
postProcess
 
Methods inherited from interface org.compass.core.mapping.MultipleMapping
getMapping, getMapping, mappingsIt
 

Constructor Detail

ClassMapping

public ClassMapping()
Method Detail

copy

public Mapping copy()
Description copied from interface: Mapping
Copies over the mapping definition into a newly instanciated Mapping object.

Specified by:
copy in interface Mapping

shallowCopy

public AliasMapping shallowCopy()
Specified by:
shallowCopy in interface AliasMapping

doPostProcess

protected void doPostProcess()
                      throws MappingException
Post process by using the dynamic find operations to cache them.

Specified by:
doPostProcess in class AbstractResourceMapping
Throws:
MappingException

getResourcePropertyMappings

public ResourcePropertyMapping[] getResourcePropertyMappings()
Description copied from interface: ResourceMapping
Returns all the resource property mappings that are assoicated with the resource mapping. Note, that it is an important method, since it might be that not all the mappings that were added to the resource mapping are of type ResourcePropertyMapping, and using this method you can be assured that ALL the ResourcePropertyMappings will be returned (even deep ones).

Specified by:
getResourcePropertyMappings in interface ResourceMapping

getClassPropertyMappings

public ClassPropertyMapping[] getClassPropertyMappings()

getClassPropertyIdMappings

public ClassIdPropertyMapping[] getClassPropertyIdMappings()

findClassPropertyIdMappings

public List findClassPropertyIdMappings()
Dynamically finds all the ClassIdPropertyMappings for the class.

Returns:
A list of the class ClassIdPropertyMappings.

getResourcePropertyMappingByDotPath

public ResourcePropertyMapping getResourcePropertyMappingByDotPath(String path)
Description copied from interface: ResourceMapping
Returns the ResourcePropertyMapping that match the given path "dot" path (a.bValue.value), or null if none exists.

Specified by:
getResourcePropertyMappingByDotPath in interface ResourceMapping

isIncludePropertiesWithNoMappingsInAll

public boolean isIncludePropertiesWithNoMappingsInAll()
Description copied from interface: ResourceMapping
Returns true if when adding the different Resource properties, properties with no mappings will be added to the "all" property. A resoruce can have property with no mappings if it was added programtically to the resource.

Specified by:
isIncludePropertiesWithNoMappingsInAll in interface ResourceMapping

isPoly

public boolean isPoly()

setPoly

public void setPoly(boolean poly)

getClassPath

public String getClassPath()

setClassPath

public void setClassPath(String classPath)

getClazz

public Class getClazz()

setClazz

public void setClazz(Class clazz)


Copyright (c) 2004-2006 The Compass Project.