org.compass.core.engine.utils
Class ResourceHelper

java.lang.Object
  extended by org.compass.core.engine.utils.ResourceHelper

public abstract class ResourceHelper
extends Object

Author:
kimchy

Method Summary
static String computeSubIndex(ResourceKey resourceKey)
           
static Property[] toIds(Resource resource, CompassMapping mapping)
           
static Property[] toIds(Resource resource, ResourceMapping resourceMapping)
          Same as toIds(org.compass.core.Resource, org.compass.core.mapping.ResourceMapping, boolean) with idsMustExist set the true.
static Property[] toIds(Resource resource, ResourceMapping resourceMapping, boolean idsMustExist)
          Gets the id properties based on the resource mapping from the give resource.
static Property[] toIds(SearchEngine searchEngine, String[] values, ResourceMapping mapping)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

computeSubIndex

public static String computeSubIndex(ResourceKey resourceKey)
                              throws SearchEngineException
Throws:
SearchEngineException

toIds

public static Property[] toIds(Resource resource,
                               CompassMapping mapping)
                        throws SearchEngineException
Throws:
SearchEngineException

toIds

public static Property[] toIds(Resource resource,
                               ResourceMapping resourceMapping)
                        throws SearchEngineException
Same as toIds(org.compass.core.Resource, org.compass.core.mapping.ResourceMapping, boolean) with idsMustExist set the true.

Throws:
SearchEngineException

toIds

public static Property[] toIds(Resource resource,
                               ResourceMapping resourceMapping,
                               boolean idsMustExist)
                        throws SearchEngineException
Gets the id properties based on the resource mapping from the give resource. If must the flag idsMustExists is set, will throw an exception if id value not found, otherise will return null.

Throws:
SearchEngineException

toIds

public static Property[] toIds(SearchEngine searchEngine,
                               String[] values,
                               ResourceMapping mapping)
                        throws SearchEngineException
Throws:
SearchEngineException


Copyright (c) 2004-2006 The Compass Project.