什么是JAVA内容仓库(Java Content Repository)

内容仓库模型
JSR-170 是这样定义内容仓库的,内容仓库由一组 workspace(工作空间)组成,这些workspace通常应该包含相似的内容。一个内容仓库有一个到多个 workspace。每个workspace都是一个树状结构,都有一个唯一的树根节点(root node)。树上的item(元素)或者是个node(节点)或者是个property(属性)。每个node都可以有零个到多个子节点和零个到多个子属性。只有根节点没有父节点,其余所有的节点都有一个父节点。property 也必须有一个父节点,但它没有子节点或是子属性,property 是叶子元素。property是真正存储数据的元素。

下图描述了一个blog应用程序的内容仓库模型。每个root node(根节点)的子节点都代表了一个blog实体。与这个blog实体有关的数据都存储在 bolgEntry 节点的属性里,其中一个 blogAttachment property 存储了一个二进制图片文件。
repositorymodel3.gif
根据内容仓库实现的功能,JSR-170定义了三种级别:
Level 1:定义了一个只读的内容仓库。功能包括读取内容,将内容导出为XML和查找内容。
Level 2:定义了可写的内容仓库。Level 2是Level 1的扩展,新增的功能包括往内容仓库里写入内容,和从XML导入数据到仓库。
Advanced options:定义实现五种附加功能,版本控制、JTA、SQL查询、清晰的内容锁定和监视。

什么是Apache JackRabbit?
Apache JackRabbit是一个开放源码的JSR-170 实现,实现了Level 2,但它还有许多扩展的功能。详细可以去它的官方网站。

下面我们决定用Apache JackRabbit来作为我们示例程序的内容仓库。

如何配置Apache JackRabbit
JackRabbit需要两个参数来配置一个内容仓库实例。
1.内容仓库主目录:这个文件目录下通常包含了所有的内容,搜索索引,内部配置文件和其他持久化信息。它的结构看起来会像下面这个样子:
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Day Management AG, Switzerland 11-May-2005 Release note Product: Specification for Content Repository for Java(tm) Technology API 1.0 Version: 1.0 Type: Full Release ====================================================================== 0. Index ---------------------------------------------------------------------- 1. Introduction 2. Release Contents 3. Copyright Notice 1. Introduction ---------------------------------------------------------------------- This Package contains the Specification for the Content Repository for Java(tm) Technology API. For questions or comments feel free to use jsr-170-comments@jcp.org Further information about JSR 170 can be found at http://www.jcp.org/en/jsr/detail?id=170 The Reference Implementation (RI) and the Technology Compatibility Kit (TCK) and the Specification Changelog may be downloaded from http://www.day.com/content/en/product/jsr_170.html 2. Release Contents ---------------------------------------------------------------------- All paths listed are relative to the installation directory of the ZIP file. This package consists of the following components: /docs generated Javadoc /lib pre-built API .jar-file /license Applicable License /spec Specification documents /src API Source code 3. Copyright notice ---------------------------------------------------------------------- Copyright ? 1993-2005 Day Management AG, Switzerland. All rights reserved. DAY, the DAY logo, Communiqu? ContentBus and CRX Content Repository Extreme are registered trademarks and service marks, or are trademarks and service marks, of Day Management AG, in various countries around the world. All other product names and company logos mentioned in the information, documents or other items provided or available herein may be the trademarks of their respective owners.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值