Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 26E134E87 for ; Wed, 15 Jun 2011 18:53:09 +0000 (UTC) Received: (qmail 1502 invoked by uid 500); 15 Jun 2011 18:53:08 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 1357 invoked by uid 500); 15 Jun 2011 18:53:08 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 1338 invoked by uid 99); 15 Jun 2011 18:53:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jun 2011 18:53:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jun 2011 18:53:07 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 6D5A54192AA for ; Wed, 15 Jun 2011 18:52:47 +0000 (UTC) Date: Wed, 15 Jun 2011 18:52:47 +0000 (UTC) From: "Niels Peter Strandberg (JIRA)" To: dev@camel.apache.org Message-ID: <1439945348.8090.1308163967444.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <194430551.8024.1308163247661.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (CAMEL-4108) Add more flexibility to DataField MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-4108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Niels Peter Strandberg updated CAMEL-4108: ------------------------------------------ Description: 1) Add a "toEnd" to the DateField: CSV file: {code} w,RegionH,1234,4567,5565 w,KIT,233,233 d,Rigshospitalet {code} The model: {code} @CsvRecord(separator = ",") public class Org { @DataField(pos = 1) private String type; @DataField(pos = 2) private String name; @DataField(pos = 3, toEnd = true) private List ids; } {code} The "ids" list will the contain the result for pos 3 to the end of the line. 2) Add a "endPos" to the DateField: CSV file: {code} w,RegionH,1234,4567,5565,m w,KIT,233,233,4545,m d,Rigshospitalet,343434,3434,3434,r {code} The model: {code} @CsvRecord(separator = ",") public class Org { @DataField(pos = 1) private String type; @DataField(pos = 2) private String name; @DataField(pos = 3, endPos = 5) private List ids; @DataField(pos = 6) private String action; } {code} The "ids" list will the contain the result for pos 3 to 5. I have a prototype for the unmarshalling. /Niels Peter Strandberg was: 1) Add a "toEnd" to the DateField: CSV file: {code} w,RegionH,1234,4567,5565 w,KIT,233,233 d,Rigshospitalet {code} The model: {code} @CsvRecord(separator = ",") public class Org { @DataField(pos = 1) private String type; @DataField(pos = 2) private String name; @DataField(pos = 3, toEnd = true) private List ids; } {code} The "ids" list will the contain the result for pos 3 to the end of the line. 2) Add a "endPos" to the DateField: CSV file: {code} w,RegionH,1234,4567,5565,m w,KIT,233,233,4545,m d,Rigshospitalet,343434,3434,3434,r {code} The model: {code} @CsvRecord(separator = ",") public class Org { @DataField(pos = 1) private String type; @DataField(pos = 2) private String name; @DataField(pos = 3, endPos = 5) private List ids; @DataField(pos = 6) private String action; } {code} The "ids" list will the contain the result for pos 3 to 5. I have a prototype for the unmarshalling, but not for unmarshalling. /Niels Peter Strandberg > Add more flexibility to DataField > --------------------------------- > > Key: CAMEL-4108 > URL: https://issues.apache.org/jira/browse/CAMEL-4108 > Project: Camel > Issue Type: New Feature > Components: camel-bindy > Reporter: Niels Peter Strandberg > Priority: Minor > > 1) Add a "toEnd" to the DateField: > CSV file: > {code} > w,RegionH,1234,4567,5565 > w,KIT,233,233 > d,Rigshospitalet > {code} > The model: > {code} > @CsvRecord(separator = ",") > public class Org { > @DataField(pos = 1) > private String type; > > @DataField(pos = 2) > private String name; > @DataField(pos = 3, toEnd = true) > private List ids; > } > {code} > The "ids" list will the contain the result for pos 3 to the end of the line. > 2) Add a "endPos" to the DateField: > CSV file: > {code} > w,RegionH,1234,4567,5565,m > w,KIT,233,233,4545,m > d,Rigshospitalet,343434,3434,3434,r > {code} > The model: > {code} > @CsvRecord(separator = ",") > public class Org { > @DataField(pos = 1) > private String type; > @DataField(pos = 2) > private String name; > @DataField(pos = 3, endPos = 5) > private List ids; > @DataField(pos = 6) > private String action; > } > {code} > The "ids" list will the contain the result for pos 3 to 5. > I have a prototype for the unmarshalling. > /Niels Peter Strandberg -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira