|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Resource
A Resource holds a list of meta data properties. The Resource is the basic data that is saved in Compass. Compass provides object to Resource mapping as well in the CompassSession object.
| Method Summary | |
|---|---|
Resource |
addProperty(Property property)
Add a property to the resource. |
Resource |
addProperty(String name,
Object value)
Adds a property to the resource based on resource mapping definitions. |
Resource |
addProperty(String name,
Reader value)
Adds a property to the resource based on resource mapping definitions. |
String |
get(String name)
Returns the string value of the property with the given name if any exist in this resource, or null. |
String |
getAlias()
Returns the mapping alias of the associated Resource |
float |
getBoost()
Returns the boost for the property. |
Property[] |
getProperties()
Returns all the properties for the resource. |
Property[] |
getProperties(String name)
Returns all the properties under the given name. |
Property |
getProperty(String name)
Returns the first property under the name. |
String[] |
getValues(String name)
Returns an array of values of the property specified as the method parameter. |
Resource |
removeProperties(String name)
Removes all the properties under the given name. |
Resource |
removeProperty(String name)
Remove the latest property added under the given name. |
Resource |
setAlias(String alias)
Sets the alias of the Resource. |
Resource |
setBoost(float boost)
Sets the boost level for the property. |
| Method Detail |
|---|
String getAlias()
Resource setAlias(String alias)
alias - String get(String name)
name -
String[] getValues(String name)
null.
name - the name of the property
String[] of property values
Resource addProperty(String name,
Object value)
throws SearchEngineException
name - the name of the propertyvalue - the value to be set (will be converted to a string).
SearchEngineException
Resource addProperty(String name,
Reader value)
throws SearchEngineException
name - the name of the propertyvalue - the value to be set (will be converted to a string).
SearchEngineExceptionResource addProperty(Property property)
property - Resource removeProperty(String name)
name - Resource removeProperties(String name)
name - Property getProperty(String name)
name -
Property[] getProperties(String name)
name -
Property[] getProperties()
float getBoost()
Resource setBoost(float boost)
boost -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||