|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compass.core.mapping.support.AbstractMapping
org.compass.core.mapping.support.AbstractMultipleMapping
org.compass.core.mapping.support.AbstractResourceMapping
public abstract class AbstractResourceMapping
| Field Summary |
|---|
| Fields inherited from class org.compass.core.mapping.support.AbstractMultipleMapping |
|---|
mappings, mappingsByNameMap |
| Constructor Summary | |
|---|---|
AbstractResourceMapping()
|
|
| Method Summary | |
|---|---|
int |
addMapping(Mapping mapping)
No duplicate names are allowed when added an id (applies the property names) |
protected void |
copy(AbstractResourceMapping resourceMapping)
|
protected abstract void |
doPostProcess()
|
String |
getAlias()
Returns the alias this mapping is associated with. |
AllMapping |
getAllMapping()
Returns a set of settings associated with the all mappings. |
String |
getAnalyzer()
Returns the analyzer lookup name of this alias mapping. |
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. |
String[] |
getExtendedAliases()
Returns a list of aliases that this alias extends. |
String[] |
getExtendingAliases()
Returns a list of all the aliases that extend this mapping. |
Mapping[] |
getIdMappings()
Gets the idMappings of the resource. |
ResourcePropertyMapping[] |
getResourceIdMappings()
Returns all the id mappigns for the low level resource mapping. |
ResourcePropertyMapping |
getResourcePropertyMapping(String propertyName)
Returns the first resource property mapping that match the given proeprty name ( Mapping.getName(), or
null if not exists. |
ResourcePropertyMapping |
getResourcePropertyMappingByPath(PropertyPath path)
Returns the ResourcePropertyMapping that match the given path
(Mapping.getPath(), or
null of not exists. |
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. |
SpellCheckType |
getSpellCheck()
Returns the default spell check mode. |
SubIndexHash |
getSubIndexHash()
The sub index that the Resource will be saved to in the
search engine. |
String |
getUIDPath()
Returns the uid property name. |
boolean |
hasSpecificAnalyzerPerResourceProperty()
Returns true if the resource proeprty mapping of the resource have
a specific analyzer set. |
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. |
void |
postProcess()
Perform the post processing of the mapping, after it's internal data has been set. |
void |
setAlias(String alias)
Sets the alias this mapping is associated with. |
void |
setAllMapping(AllMapping allMapping)
|
void |
setAnalyzer(String analyzer)
Sets the analyzer lookup name of this alias mapping. |
void |
setAnalyzerController(ResourceAnalyzerController analyzerController)
|
void |
setBoost(float boost)
|
void |
setBoostPropertyMapping(BoostPropertyMapping boostPropertyMapping)
|
void |
setCascades(CascadeMapping[] cascades)
|
void |
setExtendedAliases(String[] extendedMappings)
Sets a list of aliases that this alias extends. |
void |
setExtendingAliases(String[] extendingAliases)
Sets a list of all the aliases that extend this mapping. |
void |
setRoot(boolean isRoot)
|
void |
setSpellCheck(SpellCheckType spellCheck)
|
void |
setSubIndexHash(SubIndexHash subIndexHash)
|
void |
setUIDPath(String uid)
Sets the path under which the internal UID of the resource is stored. |
void |
shallowCopy(AbstractResourceMapping resourceMapping)
|
| Methods inherited from class org.compass.core.mapping.support.AbstractMultipleMapping |
|---|
addMappings, clearMappings, copy, getMapping, getMapping, mappingsIt, mappingsSize, removeExistingByName, replaceMappings, shallowCopy |
| Methods inherited from class org.compass.core.mapping.support.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 |
|---|
getResourcePropertyMappingByDotPath, getResourcePropertyMappings |
| Methods inherited from interface org.compass.core.mapping.AliasMapping |
|---|
shallowCopy |
| Methods inherited from interface org.compass.core.mapping.MultipleMapping |
|---|
getMapping, getMapping, mappingsIt |
| Methods inherited from interface org.compass.core.mapping.Mapping |
|---|
controlsObjectNullability, copy, getConverter, getConverterName, getName, getPath |
| Methods inherited from interface org.compass.core.mapping.AliasMapping |
|---|
shallowCopy |
| Methods inherited from interface org.compass.core.mapping.MultipleMapping |
|---|
getMapping, getMapping, mappingsIt |
| Methods inherited from interface org.compass.core.mapping.Mapping |
|---|
controlsObjectNullability, copy, getConverter, getConverterName, getName, getPath |
| Methods inherited from interface org.compass.core.mapping.MultipleMapping |
|---|
getMapping, getMapping, mappingsIt |
| Methods inherited from interface org.compass.core.mapping.Mapping |
|---|
controlsObjectNullability, copy, getConverter, getConverterName, getName, getPath |
| Methods inherited from interface org.compass.core.mapping.internal.InternalMapping |
|---|
setConverter, setConverterName, setName, setPath |
| Methods inherited from interface org.compass.core.mapping.Mapping |
|---|
controlsObjectNullability, copy, getConverter, getConverterName, getName, getPath |
| Constructor Detail |
|---|
public AbstractResourceMapping()
| Method Detail |
|---|
public Mapping[] getIdMappings()
getIdMappings in interface ResourceMappingpublic AllMapping getAllMapping()
ResourceMapping
getAllMapping in interface ResourceMappingpublic void setAllMapping(AllMapping allMapping)
setAllMapping in interface InternalResourceMappingpublic SpellCheckType getSpellCheck()
ResourceMapping
getSpellCheck in interface ResourceMappingpublic void setSpellCheck(SpellCheckType spellCheck)
setSpellCheck in interface InternalResourceMappingpublic ResourcePropertyMapping[] getResourceIdMappings()
ResourceMapping
getResourceIdMappings in interface ResourceMappingprotected void copy(AbstractResourceMapping resourceMapping)
public void shallowCopy(AbstractResourceMapping resourceMapping)
public void postProcess()
throws MappingException
PostProcessingMapping
postProcess in interface PostProcessingMappingMappingException
protected abstract void doPostProcess()
throws MappingException
MappingExceptionpublic int addMapping(Mapping mapping)
addMapping in interface InternalMultipleMappingaddMapping in class AbstractMultipleMappingmapping - The mapping to add
public ResourcePropertyMapping[] getResourcePropertyMappings(String propertyName)
ResourceMappingMapping.getName(), or
null if not exists.
getResourcePropertyMappings in interface ResourceMappingpublic ResourcePropertyMapping getResourcePropertyMapping(String propertyName)
ResourceMappingMapping.getName(), or
null if not exists.
getResourcePropertyMapping in interface ResourceMappingpublic ResourcePropertyMapping getResourcePropertyMappingByPath(PropertyPath path)
ResourceMappingResourcePropertyMapping that match the given path
(Mapping.getPath(), or
null of not exists.
getResourcePropertyMappingByPath in interface ResourceMappingpublic CascadeMapping[] getCascadeMappings()
ResourceMapping
getCascadeMappings in interface ResourceMappingpublic boolean operationAllowed(CascadeMapping.Cascade cascade)
ResourceMappingResourceMapping.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.
operationAllowed in interface ResourceMappingpublic String getAlias()
AliasMapping
getAlias in interface AliasMappingpublic void setAlias(String alias)
InternalAliasMapping
setAlias in interface InternalAliasMappingpublic String[] getExtendedAliases()
AliasMapping
getExtendedAliases in interface AliasMappingpublic void setExtendedAliases(String[] extendedMappings)
InternalAliasMapping
setExtendedAliases in interface InternalAliasMappingpublic void setUIDPath(String uid)
InternalResourceMapping
setUIDPath in interface InternalResourceMappingpublic String getUIDPath()
ResourceMapping
getUIDPath in interface ResourceMappingpublic float getBoost()
ResourceMapping
getBoost in interface ResourceMappingpublic void setBoost(float boost)
public String getAnalyzer()
AliasMapping
getAnalyzer in interface AliasMappinggetAnalyzer in interface ResourceMappingpublic void setAnalyzer(String analyzer)
InternalAliasMapping
setAnalyzer in interface InternalAliasMappingpublic boolean isRoot()
ResourceMappingtrue 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.
isRoot in interface ResourceMappingpublic void setRoot(boolean isRoot)
public SubIndexHash getSubIndexHash()
ResourceMappingResource will be saved to in the
search engine.
getSubIndexHash in interface ResourceMappingpublic void setSubIndexHash(SubIndexHash subIndexHash)
public boolean hasSpecificAnalyzerPerResourceProperty()
ResourceMappingtrue if the resource proeprty mapping of the resource have
a specific analyzer set.
hasSpecificAnalyzerPerResourceProperty in interface ResourceMappingpublic ResourceAnalyzerController getAnalyzerController()
ResourceMappingResource.
Can be null.
getAnalyzerController in interface ResourceMappingpublic void setAnalyzerController(ResourceAnalyzerController analyzerController)
public BoostPropertyMapping getBoostPropertyMapping()
ResourceMappingResource
in order to dynmaically set the resource boost value based on it. Can be null.
getBoostPropertyMapping in interface ResourceMappingpublic void setBoostPropertyMapping(BoostPropertyMapping boostPropertyMapping)
public String[] getResourcePropertyNames()
ResourceMapping
getResourcePropertyNames in interface ResourceMappingpublic String[] getExtendingAliases()
AliasMapping
getExtendingAliases in interface AliasMappingpublic void setExtendingAliases(String[] extendingAliases)
InternalAliasMapping
setExtendingAliases in interface InternalAliasMappingpublic void setCascades(CascadeMapping[] cascades)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||