|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compass.core.lucene.LuceneResource
public class LuceneResource
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Constructor Summary | |
|---|---|
LuceneResource(Document document,
int docNum,
LuceneSearchEngine searchEngine)
|
|
LuceneResource(String alias,
Document document,
int docNum,
LuceneSearchEngine searchEngine)
|
|
LuceneResource(String alias,
LuceneSearchEngine searchEngine)
|
|
| 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 |
clear()
|
boolean |
containsKey(Object key)
|
boolean |
containsValue(Object value)
|
void |
copy(Resource resource)
Copies the content of the give Resource into the current one |
Set |
entrySet()
|
Object |
get(Object key)
|
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. |
int |
getDocNum()
Returns the Lucene document number. |
Document |
getDocument()
|
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. |
boolean |
isEmpty()
|
Set |
keySet()
|
Object |
put(Object key,
Object value)
|
void |
putAll(Map t)
|
Object |
remove(Object key)
|
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. |
ResourceKey |
resourceKey()
|
Resource |
setBoost(float boost)
Sets the boost level for the resource. |
void |
setDocNum(int docNum)
|
int |
size()
|
String |
toString()
|
Collection |
values()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public LuceneResource(String alias,
LuceneSearchEngine searchEngine)
public LuceneResource(Document document,
int docNum,
LuceneSearchEngine searchEngine)
public LuceneResource(String alias,
Document document,
int docNum,
LuceneSearchEngine searchEngine)
| Method Detail |
|---|
public void copy(Resource resource)
Resource
copy in interface Resourceresource - The resource to copy frompublic Document getDocument()
public ResourceKey resourceKey()
resourceKey in interface InternalResourcepublic String get(String name)
Resource
get in interface Resourcename - The name of the property
public Object getObject(String name)
Resource
getObject in interface Resourcename - The name of the property
public String[] getValues(String name)
Resourcenull.
getValues in interface Resourcename - the name of the property
String[] of property valuespublic String getAlias()
Resource
getAlias in interface ResourcegetAlias in interface AliasedObjectpublic String getId()
Resource
getId in interface Resourcepublic String[] getIds()
Resource
getIds in interface Resourcepublic Property getIdProperty()
Resource
getIdProperty in interface Resourcepublic Property[] getIdProperties()
Resource
getIdProperties in interface Resource
public Resource addProperty(String name,
Object value)
throws SearchEngineException
Resource
addProperty in interface Resourcename - the name of the propertyvalue - the value to be set (will be converted to a string).
SearchEngineException
public Resource addProperty(String name,
Reader value)
throws SearchEngineException
Resource
addProperty in interface Resourcename - the name of the propertyvalue - the value to be set (will be converted to a string).
SearchEngineExceptionpublic Resource addProperty(Property property)
Resource
addProperty in interface Resourceproperty - The properyt to addpublic Resource removeProperty(String name)
Resource
removeProperty in interface Resourcename - The last property name to removepublic Resource removeProperties(String name)
Resource
removeProperties in interface Resourcename - The properties name to removepublic Property getProperty(String name)
Resource
getProperty in interface Resourcename - The name of the property
public Property[] getProperties(String name)
Resource
getProperties in interface Resourcename - The name of the properties
public Property[] getProperties()
Resource
getProperties in interface Resourcepublic float getBoost()
Resource
getBoost in interface Resourcepublic Resource setBoost(float boost)
Resource
setBoost in interface Resourceboost - The boost level for the resourcepublic void setDocNum(int docNum)
public int getDocNum()
public String toString()
toString in class Objectpublic void clear()
clear in interface Mappublic boolean containsValue(Object value)
containsValue in interface Mappublic void putAll(Map t)
putAll in interface Mappublic Object remove(Object key)
remove in interface Map
public Object put(Object key,
Object value)
put in interface Mappublic Set entrySet()
entrySet in interface Mappublic Set keySet()
keySet in interface Mappublic boolean containsKey(Object key)
containsKey in interface Mappublic int size()
size in interface Mappublic boolean isEmpty()
isEmpty in interface Mappublic Collection values()
values in interface Mappublic Object get(Object key)
get in interface Map
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||