From users-return-17861-apmail-jackrabbit-users-archive=jackrabbit.apache.org@jackrabbit.apache.org Wed Aug 10 13:26:18 2011 Return-Path: X-Original-To: apmail-jackrabbit-users-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8FC1A8A44 for ; Wed, 10 Aug 2011 13:26:18 +0000 (UTC) Received: (qmail 91138 invoked by uid 500); 10 Aug 2011 13:26:18 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 91043 invoked by uid 500); 10 Aug 2011 13:26:16 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 91035 invoked by uid 99); 10 Aug 2011 13:26:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Aug 2011 13:26:16 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sascha.rodekamp.lynx.de@googlemail.com designates 209.85.214.42 as permitted sender) Received: from [209.85.214.42] (HELO mail-bw0-f42.google.com) (209.85.214.42) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Aug 2011 13:26:09 +0000 Received: by bkd19 with SMTP id 19so864376bkd.1 for ; Wed, 10 Aug 2011 06:25:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=aE4eQcSbCQGMfHCGPAUCJ/uA82TDp4beu+k+cKMqfC0=; b=MntMvlhluBPxLhNB4Y0qiOQPrRimj5ycXB+BlOEdUUZGmj2TK9TKv0EXiGXaLN19uc 1wzRFUyfx0qwebRVcx+7+/VHbQWf9i4dlPR8UGV7UTB904tfGsJx7B3tJK26cjF2kiRY /2kAnjjW1AwOkPJhbQm0JahFvSxogFVGVlDUo= MIME-Version: 1.0 Received: by 10.204.143.152 with SMTP id v24mr2444568bku.251.1312982749532; Wed, 10 Aug 2011 06:25:49 -0700 (PDT) Received: by 10.204.130.215 with HTTP; Wed, 10 Aug 2011 06:25:49 -0700 (PDT) Date: Wed, 10 Aug 2011 15:25:49 +0200 Message-ID: Subject: OCM nt:file element name - "collection-element" From: Sascha Rodekamp To: users@jackrabbit.apache.org Content-Type: multipart/alternative; boundary=0015175d078861d39204aa269e97 X-Virus-Checked: Checked by ClamAV on apache.org --0015175d078861d39204aa269e97 Content-Type: text/plain; charset=ISO-8859-1 Hi, i play around with Jackrabbit 2.2.7 and the OCM package. Putting content in and reading form the repository works like a charm. But when i upload a file (in a HierarchyStructure) the file node is always stored with an element name "collection-element" in the Repository. I.E. File.jpg should be stored under /home/data/File.jpg but the OCM store it under /home/data/collection-element in the repository. (The path is correctly set to /home/data/File.jpg) I found this piece of code in the NtCollectionConverterImpl: // If the element object has a unique id => the element jcr node name = the id value if (elementClassDescriptor.hasIdField()) { String idFieldName = elementClassDescriptor.getIdFieldDescriptor().getFieldName(); elementJcrName = ReflectionUtils.getNestedProperty(item, idFieldName).toString(); } else { elementJcrName = collectionDescriptor.getJcrElementName(); if (elementJcrName == null) { // use PathFormat.checkFormat() here? elementJcrName = COLLECTION_ELEMENT_NAME; } } I tried to set an id field in my File bean @Field(id = true) private String idField = null; But, as expected, idField is not a valid property for nt:file nodes. Has anyone an idea how i can change the element name for nt:file types using OCM? Many thanks regards Sascha -- Sascha Rodekamp Lynx-Consulting GmbH Johanniskirchplatz 6 D-33615 Bielefeld http://www.lynx.de --0015175d078861d39204aa269e97--