Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 69900 invoked from network); 24 Mar 2011 15:46:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Mar 2011 15:46:24 -0000 Received: (qmail 34418 invoked by uid 500); 24 Mar 2011 15:46:24 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 34307 invoked by uid 500); 24 Mar 2011 15:46:24 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 34300 invoked by uid 99); 24 Mar 2011 15:46:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Mar 2011 15:46:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Mar 2011 15:46:21 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C6E1423889D5; Thu, 24 Mar 2011 15:45:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1085008 - /commons/sandbox/flatfile/trunk/src/site/xdoc/userguide.xml Date: Thu, 24 Mar 2011 15:45:59 -0000 To: commits@commons.apache.org From: mbenson@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110324154559.C6E1423889D5@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mbenson Date: Thu Mar 24 15:45:59 2011 New Revision: 1085008 URL: http://svn.apache.org/viewvc?rev=1085008&view=rev Log: added fill character examples to userguide Modified: commons/sandbox/flatfile/trunk/src/site/xdoc/userguide.xml Modified: commons/sandbox/flatfile/trunk/src/site/xdoc/userguide.xml URL: http://svn.apache.org/viewvc/commons/sandbox/flatfile/trunk/src/site/xdoc/userguide.xml?rev=1085008&r1=1085007&r2=1085008&view=diff ============================================================================== --- commons/sandbox/flatfile/trunk/src/site/xdoc/userguide.xml (original) +++ commons/sandbox/flatfile/trunk/src/site/xdoc/userguide.xml Thu Mar 24 15:45:59 2011 @@ -94,12 +94,23 @@ // type foo, length 1: foo (1), //the comma is optional
-// type bar, length 3, default value "bar": +/* type bar, length 3 with default value "bar". + Note that string literals, including unicode chars, are as in Java: + */ bar (3) "bar" +/* type optionalField, length 10, default value of all underscores + specified using the 'c'* "fill-character" syntax. + Again note that character literals, including unicode representation, are as in Java: + */ +optionalField (10) '_'* + // type baz, default value "baz", length (3) implicit: baz "baz" +// type delimiter immutable field of length 3 filled with asterisks: +delimiter (3) '*'*! + // type blah, immutable value "blah", length (4) implicit: blah "blah"! @@ -126,6 +137,14 @@ complexArray { b (2) c (3) } [3] + +// previous example, initialized to all spaces: +complexArray { + a (1) + b (2) + c (3) +} [3] ' '* +

@@ -299,7 +318,8 @@ truncateMe (20) overflow=IGNORE

A final feature of the DSL-based EntityFactory is the idea that it may run a number of checks against entities as they are read from the definition file. - The only check implemented as of now is the length check. + The only check implemented at this time is the length check, which is + specified by appending a colon and expected length after any entity definition, as shown:

   myRecord {
     a (10)