Java Doc for ResourcePropertyLookup.java in  » Search-Engine » compass-2.0 » org » compass » core » mapping » 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.mapping 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.compass.core.mapping.ResourcePropertyLookup

ResourcePropertyLookup
final public class ResourcePropertyLookup (Code)
A simple lookup class, for a given path, will provide simple access to it's path and value converter. Also supports path escaping ('a.b' or will result in a.b and not alias a and resource property b).



Constructor Summary
public  ResourcePropertyLookup(CompassMapping compassMapping, String name)
    

Method Summary
public  ObjectfromString(String value)
     Returns the Object converted from the String value.
public  AliasMappinggetAliasMapping()
     Returns the alias mapping if using dot path notation.
public  StringgetAnalyzer()
     Returns the analyzer associated with the resource property.
public  StringgetDotPathAlias()
     Returns the alias used if using dot path notation.
public  StringgetLookupName()
     Returns the lookup name used in order to find the meta-data/property name.
public  StringgetPath()
     Returns the path matching the provided name.
public  ResourcePropertyMappinggetResourcePropertyMapping()
     Returns the property mapping for the provided name.
public  ResourcePropertyMapping[]getResourcePropertyMappings()
     Returns a list of property mappings for the provided name.
public  StringgetValue(Object value)
     Returns the String representation of the provided value Object.
public  booleanhasSpecificConverter()
     Returns true if there is a specific converter that can be used to convert the value.
public  StringnormalizeString(String value)
     Normalizes a given String value to a (hopefully) String value that mathces the one stored in the index.
public  voidsetConvertOnlyWithDotPath(boolean convertOnlyWithDotPath)
     Perform specialized convert only when dot path is used.


Constructor Detail
ResourcePropertyLookup
public ResourcePropertyLookup(CompassMapping compassMapping, String name)(Code)




Method Detail
fromString
public Object fromString(String value)(Code)
Returns the Object converted from the String value. If the ResourcePropertyLookup.hasSpecificConverter() returns true, will use the first mapping definition for the given name in order to conver it from String to Object. If it returns false, will use a Converter assigned to the given parameter class.
See Also:   org.compass.core.converter.ResourcePropertyConverter



getAliasMapping
public AliasMapping getAliasMapping()(Code)
Returns the alias mapping if using dot path notation. Returns null if dot path notation was not used.



getAnalyzer
public String getAnalyzer()(Code)
Returns the analyzer associated with the resource property. null if none is configured on the resource property or resource level.



getDotPathAlias
public String getDotPathAlias()(Code)
Returns the alias used if using dot path notation. Returns null if dot path notation was not used.



getLookupName
public String getLookupName()(Code)
Returns the lookup name used in order to find the meta-data/property name.



getPath
public String getPath()(Code)
Returns the path matching the provided name. The path is the actual name used to store in the index.



getResourcePropertyMapping
public ResourcePropertyMapping getResourcePropertyMapping()(Code)
Returns the property mapping for the provided name. If not using dot path notation, will return the first one that match the "meta-data" name within all of Compass mappings.



getResourcePropertyMappings
public ResourcePropertyMapping[] getResourcePropertyMappings()(Code)
Returns a list of property mappings for the provided name. When not using "dot path" which allows to narrows down to a specific property mapping, and a general meta-data name is used (such as title), will return all the property mappings for it within Compass mappings.



getValue
public String getValue(Object value)(Code)
Returns the String representation of the provided value Object. If ResourcePropertyLookup.hasSpecificConverter() return true, will use the first mapping definition for the given name in order to convert it from Object to String. If it returns false, will use a Converter assigned to the given parameter class.
See Also:   org.compass.core.converter.ResourcePropertyConverter



hasSpecificConverter
public boolean hasSpecificConverter()(Code)
Returns true if there is a specific converter that can be used to convert the value.

Note, when ResourcePropertyLookup.setConvertOnlyWithDotPath(boolean) is set the true, and the name passed to the lookup does not contain "dot notation", false will be returned.




normalizeString
public String normalizeString(String value)(Code)
Normalizes a given String value to a (hopefully) String value that mathces the one stored in the index.

If ResourcePropertyLookup.hasSpecificConverter() return false (note ResourcePropertyLookup.setConvertOnlyWithDotPath(boolean) ) will simply return the given value.

If the org.compass.core.converter.ResourcePropertyConverter states that it should not be used for normalization ( org.compass.core.converter.ResourcePropertyConverter.canNormalize returns false), the provided value will be returned.

If none of the above happens, will conver it org.compass.core.converter.ResourcePropertyConverter.fromString(Stringorg.compass.core.mapping.ResourcePropertyMapping) and then org.compass.core.converter.ResourcePropertyConverter.toString(Objectorg.compass.core.mapping.ResourcePropertyMapping) .




setConvertOnlyWithDotPath
public void setConvertOnlyWithDotPath(boolean convertOnlyWithDotPath)(Code)
Perform specialized convert only when dot path is used. Defaults to true.

Sometimes, several meta-data names are used with different converteres. For example map to title both a pure String value and also a numeric value. If using dot path notation, Compass will narrow down to the specfic converter (for example a.title.title). When not using dot path notation, Compass now has two options for conversion. If this flag is set to true (and not using dot path notation), Compass will use a converter based on the object type. If this flag is set to false, the first mapping is used to convert.




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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