來֤Ǥ Υڡ򥢥ƥʤɲ RSSե

2007-02-19

[]ޤޤ³4 part4 01:59 ޤޤ³4 part4 -  來֤Ǥ ޤ֥åޡ ޤޤ³4 part4 -  來֤Ǥ Υ֥åޡ

ȲǽʻΡˤĤƤNamespaceΤˤĤƤΤá

4.4 Orderable Child NodesʤĤŤ

ΡȲǽξǡNode.orderBefore()ȤȤ

4.4.1 Orderable Same Name Siblings

Ʊ̾Ρ¸ߤǤʤϲǽ

[A, B, C, A, D]äƤΡ¸ߤƤơΡǥȲǽ꤬ƤNode#orderBefore("A[2]","A[1]")Ƥ֤[A, A, B, C, D]äƼǤ롣APIŪˤϡorderBefore(String ưΡ,String ư)ȤʤäơפϺǽǤȤ4ܤAΡ1ܤA˰ưȤ̿ᡣ⡢ΤϤ̿ϼºݤsave˽ؤä¸롣ʤΤǤθA[1]Τ̿A[2]ˤʤȤ

4.4.2 Non-orderable Child Nodes

Node.getNodes()Ǽ֤ݾڤʤΤ(ˤäưۤʤäƤˡ֤˰¸ץꥱˤʤäơ

4.4.3 Orderable Child Node Support is Optional

Τޤޡ

4.4.4 Properties are Never Orderable

⤽Τޤޡ

äƤΤͤƤ롣פäƤOrderableɤȤְäorz

4.4.1äƻͤ٤Ȥʤ

4.5 Namespaces

Ρץѥƥˤϥץեå򥳥Ƕڤäɽ롢줬NameSpace̾ͤβޤΤŪJCRݥȥϰʲȤ߹namespaceɬס

jcr Ȥ߹Ρ

nt Ȥ߹߼Ρ̾

mix Ȥ߹mixinΡ̾

xml XMlߴ

ɡ ǥեnamespace.

level1ǤnamespacesessionŪ˥С饤ɤǤ롣

level2ǤnamespaceɲáǤ롣

level1ξΤäƤ뤳ȤϤ褯狼6.3ϤǾܺ٤Ϥ狼餷

ǤϾ嵭٥ǧǤ褵

4.6 Path Syntax

ѥεҤ󥿥åɽƤ롣ɬ׻ǧФ褯ƤǤϽ񤫤ʤ

4.6.1 Names vs. Paths

specɽȤmyapp:paragraphnameɽmyapp:paragraph[3]ȥ֥󥱥åĤĤȥѥɽƤ褦

2007-02-09

[]4part3 01:53 4part3 -  來֤Ǥ ޤ֥åޡ 4part3 -  來֤Ǥ Υ֥åޡ

4.3 Same–Name Siblings

ΡƱ̾¸ߤ뤳ȤǤ롣Ǥʤ뤳Ȥġ

ξäݤ魯ȤǤ롣㤨ƱΥѥ(/Z/Y)[A,B,C,A,B]ΣĤΡϿƤǽAꤹȤ/Z/Y/A[1]ȤǤϤʤ

ʤΤǥѥɽ/a/b/c/a[1]/b[1]/c[1]Ʊ졣

դ٤ȤȤΡorderable¤ؤˤλ꤬ƤȤƤ⤳ν֤DZ³롢Ȥȡ

4.3.2 Support for Same Name Siblings is Optional

Ʊ̾ΡβݤΡפǷ롣

4.3.3 Properties Cannot Have Same Name Siblings

ץѥƥƱ̾¸ߤϵƤʤץѥƥʣͤĤȤϤǤ롪

4.4 Orderable Child Nodes

ҤΤȤΡפǻꤵƤ硢Ȳǽʾ֤ɡǤ⥽ȤƤʤ֤Node.orderBeforeȤʤߤ˿ΡɲäȥꥹȤκǸɲä롣

satosato 2007/02/09 23:10 wkzk󡢤ɤ⤢꤬Ȥޤ
JavaPress vol.46Velocityϡɥ꡼ǥ󥰤ϢܤȤ̤ñȯǤҤVelocityϽ񤭲ǡȥɥ꡼ǥ󥰤Ƥޤ衣
û֤ǤҤҤꤤޤ

2007-02-07

[]4 00:36 4 -  來֤Ǥ ޤ֥åޡ 4 -  來֤Ǥ Υ֥åޡ

3 Use Cases

3.1 Swappability

ݥȥ򴹲ǽǤ

3.2 Resource Crunch (Personalization)

JCR APIͳǤAPIռ/ʤƤॱǤƤޤ

ȷڤξҲ

4 The Repository Model

ξϤϥʤΤǡġĹΤǤäơϤ뤳ȤϤˤä񤤤Ƥʤȡ

ǤäơݥȥǥλͤϰʲΤȤꡣʸϤĹΤDzվ񤭤

  1. ƥݥȥ1İʾڡġ
  2. ƥݥȥitemtree¤ǻġ
  3. itemȤϡΡץѥƥΤɤ餫ˤʤ롣
  4. ΡˤϡʾλΡȥʾλץѥƥƤ롣
  5. 1ڡ1ĤΥ롼ȤΡޤ
  6. ΡϡΡʤ
  7. ¾Τ٤ƤΡˤϡ1ĤοΡ
  8. ץѥƥϡ1ĤοΡäƤ롣
  9. ץѥƥϡҡΡץѥƥˤϻƤʤ
  10. leafȸƤФ롣
  11. ݥȥμºݤƤΤ٤Ƥץѥƥͤ˳Ǽ롣

ؤitemХѥХѥǤ롣

  1. Хѥξ硢/ɤϥ롼Ȥ򤵤ƤꡢХѥɬ/ɤǤϤ뤳
  2. Хѥξ硢/ɤǻϤޤäƤʤȤХѥȽǤ롣unixǽǡ.ɡ..ɤǤλǽ

4.1 API Basics

ݥȥRepository֥Ǥ蘆ƸƤӽФ¦Repository.loginݥȥ³롣

Ǥդڡ̾crudentialǤ롣

塢ƤӽФ¦ϻꤵ줿ڡˤҤŤSession뤳Ȥǽˤʤ롣

ϰʲΤȤꡣ

// Get the Repository object
InitialContext ctx = ...
Repository repository = (Repository)ctx.lookup("myrepo");
// Get a Credentials object
Credentials credentials = new SimpleCredentials("MyName", "MyPassword".toCharArray());
// Get a Session
Session mySession = repository.login(credentials, "MyWorkspace");

Session֥APIͳΡץѥƥФƤ

  1. TreeŪˡ
  2. ꥢƥľܤ

Τ줫Τǥǽˤʤ롣

4.1.1 Traversal Access

Ū

ޤ

Node Session.getRootNode().

Ϥ롣ʸ̤롼ΡȤ롣ǡ

Node Node.getNode(String relPath)
Property Node.getProperty(String relPath)

ǥǤ롣ХѥλǤ

ǡľܼ

String Property.getString()

ǼǤ뤷˥塼ȥˤΤǤValue֥Ѥ

Value Property.getValue()

ǼOK.ºݤΥǡμ

String Value.getString().

Ԥ롣

4.1.2 Direct Access

ľܥ

Item Session.getItem(String abspath).

ǼǽǡʤȤХѥǻꤹȤȤʤꡪ

¾ˤ

Node Session.getNodeByUUID(String uuid).

ǼǤ롣

2007-02-06

[]JCRޤȤƤȤˤ 01:19 JCRޤȤƤȤˤ -  來֤Ǥ ޤ֥åޡ JCRޤȤƤȤˤ -  來֤Ǥ Υ֥åޡ

JCR(Content Repository for Java)JSR170ǤޤȤ줿ͤǤޤȤƤApache jackrabbitޤS2JCRμʤƤơޤ԰¤ˤʤΤSpec⤷äɤǤꤷޤǤŻ˻ʤäƴ֤˺ƤޤΤǤä񤤤ƤȻפޤǤ

ꤷơ֥ѡˤJCR絭(jsr170)ޤȤפδ

ĤޤJCRγפΤꤿȤϤ

http://journal.mycom.co.jp/news/2005/06/20/008.html

http://journal.mycom.co.jp/news/2006/09/12/353.html

äȡ

Content Repository API for Java Technology Specification

1 -preface SpecˤϰʲΤΤޤǤ衼

1.jsr170-1.0.pdf

2./jar (javax.jcr)

2 - Introduction

2.1 Motivation(ư)

ƥݥȥ󶡤٥Ƥ桢ߤȼλͤǻȤߤ󶡤ƤɡäѶ̤󥿡եͤäɬפ͡äƤȤǻϤޤޤ

ʤΤJCRѤ뤳Ȥǡ줷Ȥ

  1. ȯԤϳ٥ȤΥƥĴˡ(APIȤ)ٶʤƤ
  2. ȯԤݥȥƥƥĤ¸ʪŪʾȤռˡʤȤΩơ˳ȯǤJCRɸAPIǥˤʤ롣)
  3. ץꥱϤΤޤޤǡƥݥȥ֤ǽ
ӥƥǤޤǤǤCMSΥƥĤȤɥƥĤäƤΤϥեǡʤɤΤ٤ƤΤƤäƤ롣jBPM¸ŪˤȤϤJackRabbitݡȤ򤷤ƤΤӥͥץʸ(ExcelȤ)ǤƤꤹ櫓ǡΤݴɤꤹΤѤ뤳ȤꤷƤꤹ롣

;̤ɡǶǤMSsharepointECMʤƤϤ꤭äƤޤ
http://www.microsoft.com/japan/solutions/ecm/overview.mspx

SOX//BPMʤäƤΤǤʤ饳ƥݥȥܤĤĤޤ롣((^^;)

2.2 Goal

߷ץݥꥷäƤޤ

1.ƥǡץȥ˰¸٤餺ޤΤȤǤŪʰ֤μȤߤɤϳءؤݥȥǥ뤬APIȤΤȡ

hierarchicalpath-based addressing of content items

directUUID-based addressing

Ǽ¸Ƥ餷ܺ٤Ϥо줹뤳ȤǤ礦

2.ץǻȤ䤹ȡ

3.¸ݥȥ٥JCRˤΤä䤹褦ˤ

4.Ĥʣʵǽɸಽ٤

ͤȤƤץǽ2ĤΥ٥ʬƤ롣Level1ϴ¸٥Ǥñ˼䤹ΤˤʤäƤ롣(read-only ݥȥƥĥפnamespaceʤɡLevel2ϥƥĽ񤭹ߥ᥽åɤɲáƥĤؤΥפγդʤɡץǽȤƤȥ󥶥С˥󥰡桢ƻʤ.

ǽϲΤΥ٥ʤΤʡȻפäƤɤäȳ٥δ¸ݥȥθΤǤϤȻפƤΤξܺ٤Ϥ

3Ϥ顣