project35.io
Class Project35DataFileWriter
java.lang.Object
project35.io.Project35DataFileWriter
public class Project35DataFileWriter
- extends Object
Write out a data file in an XML format that will validate against the original
schema. Note that the output is an Unicode XML text file.
Copyright (c) 2008 Kevin Garwood for Project35. The original code was
developed by Kevin Garwood for the University of Manchester. Revisions
have been made for Project35, a project that is independent of that
institution. This code is licensed under the Academic Free License
version 3.0. The code attribution for the original code is included here:
Copyright (c) Kevin Garwood and University of Manchester 2007.
All rights reserved. Licensed under the Academic Free License
version 3.0. For more information on the terms and conditions,
please see the file "LICENSE" that is included in this distribution.
- Version:
- 1.0
- Author:
- Kevin Garwood (kgarwood@users.sourceforge.net)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Project35DataFileWriter
public Project35DataFileWriter(Project35FormContext project35FormContext,
boolean writeTemplate,
boolean writeChildRecords)
escapeXml
public static String escapeXml(String str)
- Convenience method for escaping XML characters in a given String.
It translates:
- & - > &
- < -> <
- > -> >
- " -> "
- ' -> '
The method does not throw a NullPointerException if the given String
is null. Instead, it returns a null.
- Parameters:
str -
- Returns:
- the converted result of escaping the str input string.
setDocumentHeaderComment
public void setDocumentHeaderComment(String documentHeaderComment)
- Set the value of documentHeaderComment.
- Parameters:
documentHeaderComment - Value to assign to documentHeaderComment.
write
public void write(OutputStream outputStream,
RecordModel recordModel)
throws IOException
- Throws:
IOException
visitRecordModel
protected void visitRecordModel(int indentationLevel,
RecordModel recordModel,
OutputStreamWriter out)
throws IOException
- Throws:
IOException
omitModelStamp
public void omitModelStamp()
initialiseCommentFacility
public void initialiseCommentFacility(ModelObjectCommentRegistry modelObjectCommentRegistry,
Object userObject)