All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openehr.am.template.OETParser Maven / Gradle / Ivy

The newest version!
/*
 * component:   "openEHR Java Reference Implementation"
 * description: "Class OETParser"
 * keywords:    "oet-parser"
 *
 * author:      "Rong Chen "
 * copyright:   "Copyright (c) 2009,2010 Cambio Healthcare Systems, Sweden"
 * license:     "See notice at bottom of class"
 *
 * file:        "$URL$"
 * revision:    "$LastChangedRevision$"
 * last_change: "$LastChangedDate$"
 */

package org.openehr.am.template;

import java.io.*;

import openEHR.v1.template.*;
import org.apache.xmlbeans.XmlOptions; 

/**
 * Thin wrapper around generated OET XML parser
 */

public class OETParser {
	
	public TemplateDocument parseTemplate(InputStream input) throws Exception {
		XmlOptions options = new XmlOptions();
		options.setCharacterEncoding("UTF-8");		
		return TemplateDocument.Factory.parse(input, options);
	}	
}
/*
 * ***** BEGIN LICENSE BLOCK ***** Version: MPL 1.1/GPL 2.0/LGPL 2.1
 * 
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the 'License'); you may not use this file except in compliance with the
 * License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
 * 
 * Software distributed under the License is distributed on an 'AS IS' basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 * the specific language governing rights and limitations under the License.
 * 
 * The Original Code is OETParser.java
 * 
 * The Initial Developer of the Original Code is Rong Chen. Portions created by
 * the Initial Developer are Copyright (C) 2009-2010 the Initial Developer. All
 * Rights Reserved.
 * 
 * Contributor(s):
 * 
 * Software distributed under the License is distributed on an 'AS IS' basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 * the specific language governing rights and limitations under the License.
 * 
 * ***** END LICENSE BLOCK *****
 */




© 2015 - 2024 Weber Informatics LLC | Privacy Policy