org.compass.core.mapping
Interface ResourceMapping

All Superinterfaces:
AliasMapping, Mapping, MultipleMapping
All Known Implementing Classes:
AbstractResourceMapping, ClassMapping, NullResourceMapping, RawResourceMapping, XmlObjectMapping

public interface ResourceMapping
extends AliasMapping

A mapping defining a Resource saved in the Search Engine.

Author:
kimchy

Method Summary
 String getAllAnalyzer()
          Returns the analyzer name that is associated with the all property.
 String getAllProperty()
          Returns the name of the all property for the given resoruce.
 Property.TermVector getAllTermVector()
          Returns the term vector configuration for the given all proeprty.
 String getAnalyzer()
          Returns the analyzer name that need to be used with the resouce.
 ResourceAnalyzerController getAnalyzerController()
          Returns the analzer controller that is associated with the Resource.
 float getBoost()
          Returns the boost of the given resource.
 BoostPropertyMapping getBoostPropertyMapping()
          Returns an optional boost property mapping associated with the Resource in order to dynmaically set the resource boost value based on it.
 CascadeMapping[] getCascadeMappings()
          Returns a list of all the cascade mappings.
 ResourcePropertyMapping[] getIdMappings()
          Returns all the resource property mappings that acts as the id of the resource.
 ResourcePropertyMapping getResourcePropertyMapping(String propertyName)
          Returns the first resource property mapping that match the given proeprty name (Mapping.getName(), or null if not exists.
 ResourcePropertyMapping getResourcePropertyMappingByDotPath(String path)
          Returns the ResourcePropertyMapping that match the given path "dot" path (a.bValue.value), or null if none exists.
 ResourcePropertyMapping getResourcePropertyMappingByPath(PropertyPath path)
          Returns the ResourcePropertyMapping that match the given path (Mapping.getPath(), or null of not exists.
 ResourcePropertyMapping[] getResourcePropertyMappings()
          Returns all the resource property mappings that are assoicated with the resource mapping.
 ResourcePropertyMapping[] getResourcePropertyMappings(String propertyName)
          Returns the list of resource property mappings that match the given proeprty name (Mapping.getName(), or null if not exists.
 String[] getResourcePropertyNames()
          Returns all the mapped property names for the resoruce.
 SubIndexHash getSubIndexHash()
          The sub index that the Resource will be saved to in the search engine.
 boolean hasSpecificAnalyzerPerResourceProperty()
          Returns true if the resource proeprty mapping of the resource have a specific analyzer set.
 boolean isAllOmitNorms()
          Expert: If set, omit normalization factors associated with this indexed field.
 boolean isAllSupported()
          Returns true if the "all" property will be created for the resource.
 boolean isIncludePropertiesWithNoMappingsInAll()
          Returns true if when adding the different Resource properties, properties with no mappings will be added to the "all" property.
 boolean isRoot()
          Returns true if it is a root resource mapping.
 boolean operationAllowed(CascadeMapping.Cascade cascade)
          Returns is an operation is allowed to be performed on this resoruce mappings.
 
Methods inherited from interface org.compass.core.mapping.AliasMapping
getAlias, getExtendedAliases, getExtendingAliases, setAlias, setExtendedAliases, setExtendingAliases, shallowCopy
 
Methods inherited from interface org.compass.core.mapping.MultipleMapping
addMapping, getMapping, getMapping, mappingsIt
 
Methods inherited from interface org.compass.core.mapping.Mapping
controlsObjectNullability, copy, getConverter, getConverterName, getName, getPath, setConverter, setConverterName, setName, setPath
 

Method Detail

getSubIndexHash

SubIndexHash getSubIndexHash()
The sub index that the Resource will be saved to in the search engine.


getAnalyzer

String getAnalyzer()
Returns the analyzer name that need to be used with the resouce. Can be null.


getAllAnalyzer

String getAllAnalyzer()
Returns the analyzer name that is associated with the all property. Can be null.


hasSpecificAnalyzerPerResourceProperty

boolean hasSpecificAnalyzerPerResourceProperty()
Returns true if the resource proeprty mapping of the resource have a specific analyzer set.


getAnalyzerController

ResourceAnalyzerController getAnalyzerController()
Returns the analzer controller that is associated with the Resource. Can be null.


getBoostPropertyMapping

BoostPropertyMapping getBoostPropertyMapping()
Returns an optional boost property mapping associated with the Resource in order to dynmaically set the resource boost value based on it. Can be null.


getBoost

float getBoost()
Returns the boost of the given resource.


isRoot

boolean isRoot()
Returns true if it is a root resource mapping. If it is a root mapping, then it controlls the general Resource level settings like alias and sub-index. Usually, non-root resource mapping are mappings that are incorporated within another resoruce.


isAllSupported

boolean isAllSupported()
Returns true if the "all" property will be created for the resource. The all property is a special property that have all the other resource values in it to be searchable.


isIncludePropertiesWithNoMappingsInAll

boolean isIncludePropertiesWithNoMappingsInAll()
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.


getAllProperty

String getAllProperty()
Returns the name of the all property for the given resoruce.


getAllTermVector

Property.TermVector getAllTermVector()
Returns the term vector configuration for the given all proeprty.


isAllOmitNorms

boolean isAllOmitNorms()
Expert: If set, omit normalization factors associated with this indexed field. This effectively disables indexing boosts and length normalization for this field.


getIdMappings

ResourcePropertyMapping[] getIdMappings()
Returns all the resource property mappings that acts as the id of the resource. Used to load the resource or delete it.


getCascadeMappings

CascadeMapping[] getCascadeMappings()
Returns a list of all the cascade mappings. Will return null if no cascading is defined.


operationAllowed

boolean operationAllowed(CascadeMapping.Cascade cascade)
Returns is an operation is allowed to be performed on this resoruce mappings. Root mappings (isRoot() always return true, while if it is non root mappings, it should return true if it has cascade mappings that map one of the cascade operations.


getResourcePropertyNames

String[] getResourcePropertyNames()
Returns all the mapped property names for the resoruce.


getResourcePropertyMappings

ResourcePropertyMapping[] getResourcePropertyMappings()
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).


getResourcePropertyMapping

ResourcePropertyMapping getResourcePropertyMapping(String propertyName)
Returns the first resource property mapping that match the given proeprty name (Mapping.getName(), or null if not exists.


getResourcePropertyMappings

ResourcePropertyMapping[] getResourcePropertyMappings(String propertyName)
Returns the list of resource property mappings that match the given proeprty name (Mapping.getName(), or null if not exists.


getResourcePropertyMappingByPath

ResourcePropertyMapping getResourcePropertyMappingByPath(PropertyPath path)
Returns the ResourcePropertyMapping that match the given path (Mapping.getPath(), or null of not exists.


getResourcePropertyMappingByDotPath

ResourcePropertyMapping getResourcePropertyMappingByDotPath(String path)
Returns the ResourcePropertyMapping that match the given path "dot" path (a.bValue.value), or null if none exists.



Copyright (c) 2004-2006 The Compass Project.