|
||||||||||
| 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. |
void |
copy(Resource resource)
Copies the content of the give Resource into the current one |
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. |
String |
getId()
Returns the id of the resource. |
Property[] |
getIdProperties()
Returns the id properties of the resource |
Property |
getIdProperty()
Returns the id property of the resource |
String[] |
getIds()
Returns the id values of the resource. |
Object |
getObject(String name)
Returns the object vlaue of the property with the given name if any exists in the resource, or null. |
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 |
setBoost(float boost)
Sets the boost level for the resource. |
| Method Detail |
|---|
String getAlias()
getAlias in interface AliasedObjectString getId()
String[] getIds()
Property getIdProperty()
Property[] getIdProperties()
String get(String name)
name - The name of the property
Object getObject(String name)
name - The name of the property
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 - The properyt to addResource removeProperty(String name)
name - The last property name to removeResource removeProperties(String name)
name - The properties name to removeProperty getProperty(String name)
name - The name of the property
Property[] getProperties(String name)
name - The name of the properties
Property[] getProperties()
float getBoost()
Resource setBoost(float boost)
boost - The boost level for the resourcevoid copy(Resource resource)
resource - The resource to copy from
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||