Blog信息 |
blog名称: 日志总数:1304 评论数量:2242 留言数量:5 访问次数:7623498 建立时间:2006年5月29日 |

| |
[Java Open Source]integrate compass (lucene) and appfuse 软件技术
lhwork 发表于 2007/1/23 8:51:29 |
I've been playing with Compass and Appfuse to give search capability. I made notes as I was going and post them here in case anyone else finds them useful. A big thanks to Matt and Shay for these two projects, they work so well together :-)
This is a barebones setup, my next job, (I think), is to rework the SpringController to give back a list with hi |
|
[Java Open Source]Compass - springside 中的应用 软件技术
lhwork 发表于 2007/1/22 18:12:32 |
1.概述
springside 官方网站: http://www.springside.org.cn
网站: http://www.compassframework.org/
Compass是一流的开放源码JAVA搜索引擎框架,对于你的应用修饰,搜索引擎语义更具有能力。依靠顶级的Lucene搜索引擎,Compass 结合了,像 Hibernate和 Sprin的流行的框架,为你的应用提供了从数据模型和数据源同步改变的搜索力.并且添加了2方面的特征,事物管理和快速更新优化. Compass的目标是:把java应用简单集成到搜索引擎中.编码更少,查找数据更便捷 .
2.Object/Search Engine Mapping - 配置XML
OSEM: 对象搜索引擎影影射(Ob |
|
[Java Open Source]Compass: Integrate Search into your apps 软件技术
lhwork 发表于 2007/1/22 17:14:01 |
Motivation
In many applications, there is a user requirement to search or look up domain entities. It is either required as an entry point into the application or as a mechanism for filling in forms. Typically, this is solved either by navigation (presenting the domain hierarchically so the user can locate and choose an item) or by a search form (presenting the user with a form containing a number of fields they can search on).
Related< |
|
[Java Open Source]Compass读文档笔记 软件技术
lhwork 发表于 2007/1/22 14:42:34 |
Compass是基于Lucene 的更高层的抽象,假如你正打算做关于搜索方面的模块的话,那我建议你使用Compass,他提供了可配置方案,而且比Lucene更加容易使用。如果你的系统中使用Spring, Hibernate,JDO, IBatis。。。 Compass是最好的选择,他能够非常方便的集成到现有系统中去。 1. Compass的framework的系统结构。 感觉Compass的代码的结构简直就是剽窃Hibernate的,可能Compass的最初目的是用来整合Hibernate的, CompassConfiguration conf = new CompassConfiguration().configure().addClass(Author.class); Compass comp |
|
[Java Open Source]Apache FileUpload 上传以及 JExcelApi 解析 软件技术
lhwork 发表于 2007/1/20 10:56:55 |
最近遇到点读取 Excel 数据的问题,于是花了点时间找开源工具。 要解析 Excel,首当其冲的是上传文件,以前在项目里我们用 SmartUpload 进行上传,不过这个项目似乎已经停止开发了,于是在这里我使用 Apache Commons FileUpload,可以在 http://jakarta.apache.org/commons/fileupload 找到。目前该项目的最新版本是 1.1.1,网上有大量的范例程序,不过后来用的时候发现大部分方法在新版本中都不推荐使用了,于是好好读了一回 API 和官方范例。
先来看看如何上传文件,Servlet 很简单,在这里我限制了最大上传量为 1M,且直接读进内存中,不进行磁盘临时文件缓存。
| |
[Java Open Source]HtmlParser入门 软件技术
lhwork 发表于 2006/12/29 16:03:21 |
这两天准备做一些网站编程的工作,于是对HtmlParse小研究了一下,目的是快速入手,而不是深入研究,做了一下整理,和大家共同讨论一下。
一,数据组织分析: HtmlParser主要靠Node、AbstractNode和Tag来表达Html,因为Remark和Text相对简单,此处就将其忽略了。
Node是形成树结构表示HTML的基础,所有的数据表示都是接口Node的实现,Node定义了与页面树结构所表达的页面Page对象,定义了获取父、子、兄弟节点的方法,定义了节点到对应html文本的方法,定义了该节点对应的起止位置,定义了过滤方法,定义了Visitor访问机制。 AbstractNode是Node的一种具体的类实现,起到构成树形结构的作用,除了同具体Node相关的accetp方法,toString,toHtml,toPlainTextString方法以外,AbstractNode实现了大多基本的方法,使得它的子类,不用理会具体的树操作。 Tag是具体分析的主要内容。Tag分成compo |
|
[Java Open Source]读取JPG文件中的EXIF信息 软件技术
lhwork 发表于 2006/12/15 10:15:39 |
项目中要用到的一个功能,稍微google了一下选中一个最简单的解决方案。 使用Drew Noakes的metadata extractor library,jar的下载地址:http://www.drewnoakes.com/code/exif/metadata-extractor-2.3.1.jar
应用的方法很简单,把jar文件复制到CF安装路径下的wwwroot\WEB-INF\lib 文件夹中(例如:C:\CFusionMX7\wwwroot\WEB-INF\lib),重启CF服务,就可以在代码中使用这个java class了。
下面是读取EXIF的示 |
|
|