Java Doc for Resource.java in  » Search-Engine » compass-2.0 » org » compass » core » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Search Engine » compass 2.0 » org.compass.core 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.compass.core.Resource

All known Subclasses:   org.compass.core.converter.mapping.CollectionResourceWrapper,
Resource
public interface Resource extends AliasedObject,Serializable(Code)
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.
author:
   kimchy




Method Summary
 ResourceaddProperty(String name, Object value)
     Adds a property to the resource based on resource mapping definitions.
 ResourceaddProperty(String name, Reader value)
     Adds a property to the resource based on resource mapping definitions.
 ResourceaddProperty(Property property)
     Add a property to the resource.
 voidcopy(Resource resource)
    
 StringgetAlias()
    
 floatgetBoost()
     Returns the boost for the property.
 StringgetId()
     Returns the id of the resource.
 Property[]getIdProperties()
    
 PropertygetIdProperty()
    
 String[]getIds()
     Returns the id values of the resource.
 ObjectgetObject(String name)
     Returns the object vlaue of the property with the given name if any exists in the resource, or null.
 Property[]getProperties(String name)
     Returns all the properties under the given name.
 Property[]getProperties()
     Returns all the properties for the resource.
 PropertygetProperty(String name)
     Returns the first property under the name.
 StringgetUID()
     Returns the unique id of the resource.
 StringgetValue(String name)
     Returns the string value of the property with the given name if any exist in this resource, or null.
 String[]getValues(String name)
     Returns an array of values of the property specified as the method parameter.
 ResourceremoveProperties(String name)
     Removes all the properties under the given name.
 ResourceremoveProperty(String name)
     Remove the latest property added under the given name.
 ResourcesetBoost(float boost)
     Sets the boost level for the resource.
 ResourcesetProperty(String name, Object value)
     Sets a property to the resource (removes then adds) based on resource mapping definitions.
 ResourcesetProperty(String name, Reader value)
     Sets a property to the resource (removes then adds) based on resource mapping definitions.
 ResourcesetProperty(Property property)
     Sest a property to the resource (removes then adds).



Method Detail
addProperty
Resource addProperty(String name, Object value) throws SearchEngineException(Code)
Adds a property to the resource based on resource mapping definitions. If the property already exists in the resource (the name exists), it will be added on top of it (won't replace it). ONLY use this method with resource mapping.
Parameters:
  name - the name of the property
Parameters:
  value - the value to be set (will be converted to a string).
throws:
  SearchEngineException -



addProperty
Resource addProperty(String name, Reader value) throws SearchEngineException(Code)
Adds a property to the resource based on resource mapping definitions. If the property already exists in the resource (the name exists), it will be added on top of it (won't replace it). ONLY use this method with resource mapping.
Parameters:
  name - the name of the property
Parameters:
  value - the value to be set (will be converted to a string).
throws:
  SearchEngineException -



addProperty
Resource addProperty(Property property)(Code)
Add a property to the resource. If the property already exists in the resource (the name exists), it will be added on top of it (won't replace it). Note: Compass adds all properties specified in mapping file, adding extra properties to a Resource will make the index out of sync with mapping.
Parameters:
  property - The properyt to add



copy
void copy(Resource resource)(Code)
Copies the content of the give Resource into the current one
Parameters:
  resource - The resource to copy from



getAlias
String getAlias()(Code)
Returns the mapping alias of the associated Resource The alias



getBoost
float getBoost()(Code)
Returns the boost for the property. The boost value



getId
String getId()(Code)
Returns the id of the resource. Used when there is only one id for the resource. The id of the resource.



getIdProperties
Property[] getIdProperties()(Code)
Returns the id properties of the resource The id properties of the resource



getIdProperty
Property getIdProperty()(Code)
Returns the id property of the resource The id properties of the resource



getIds
String[] getIds()(Code)
Returns the id values of the resource. The id values of the resource



getObject
Object getObject(String name)(Code)
Returns the object vlaue of the property with the given name if any exists in the resource, or null. If multiple properties exists with this name, this methods returns the first value added.

If a converter is associated with the property in one of Compass mapping definitions, it will be used to convert the string value to an object value. If there is no converter associated with the property, the string value will be returned.
Parameters:
  name - The name of the property The first object value that match the name (converted if possible)




getProperties
Property[] getProperties(String name)(Code)
Returns all the properties under the given name.
Parameters:
  name - The name of the properties An array of properties that match the name



getProperties
Property[] getProperties()(Code)
Returns all the properties for the resource. All the properties



getProperty
Property getProperty(String name)(Code)
Returns the first property under the name.
Parameters:
  name - The name of the property The first proeprty that match the name



getUID
String getUID() throws CompassException(Code)
Returns the unique id of the resource. Note, the ids must be set on this resource in order to get the uid, if not a CompassException will be thrown.



getValue
String getValue(String name)(Code)
Returns the string value of the property with the given name if any exist in this resource, or null. If multiple properties exist with this name, this method returns the first value added.
Parameters:
  name - The name of the property The first value that match the name



getValues
String[] getValues(String name)(Code)
Returns an array of values of the property specified as the method parameter. This method can return null.
Parameters:
  name - the name of the property a String[] of property values



removeProperties
Resource removeProperties(String name)(Code)
Removes all the properties under the given name.
Parameters:
  name - The properties name to remove



removeProperty
Resource removeProperty(String name)(Code)
Remove the latest property added under the given name.
Parameters:
  name - The last property name to remove



setBoost
Resource setBoost(float boost)(Code)
Sets the boost level for the resource.
Parameters:
  boost - The boost level for the resource



setProperty
Resource setProperty(String name, Object value) throws SearchEngineException(Code)
Sets a property to the resource (removes then adds) based on resource mapping definitions. If the property already exists in the resource (the name exists), it will be added on top of it (won't replace it). ONLY use this method with resource mapping.
Parameters:
  name - the name of the property
Parameters:
  value - the value to be set (will be converted to a string).
throws:
  SearchEngineException -



setProperty
Resource setProperty(String name, Reader value) throws SearchEngineException(Code)
Sets a property to the resource (removes then adds) based on resource mapping definitions. If the property already exists in the resource (the name exists), it will be added on top of it (won't replace it). ONLY use this method with resource mapping.
Parameters:
  name - the name of the property
Parameters:
  value - the value to be set (will be converted to a string).
throws:
  SearchEngineException -



setProperty
Resource setProperty(Property property)(Code)
Sest a property to the resource (removes then adds). If the property already exists in the resource (the name exists), it will be added on top of it (won't replace it). Note: Compass adds all properties specified in mapping file, adding extra properties to a Resource will make the index out of sync with mapping.
Parameters:
  property - The properyt to add



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.