本文整理汇总了Java中org.marc.everest.formatters.xml.its1.XmlIts1Formatter类的典型用法代码示例。如果您正苦于以下问题:Java XmlIts1Formatter类的具体用法?Java XmlIts1Formatter怎么用?Java XmlIts1Formatter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
XmlIts1Formatter类属于org.marc.everest.formatters.xml.its1包,在下文中一共展示了XmlIts1Formatter类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getFormatter
import org.marc.everest.formatters.xml.its1.XmlIts1Formatter; //导入依赖的package包/类
public static XmlIts1Formatter getFormatter(Boolean validation) {
XmlIts1Formatter fmtr = new XmlIts1Formatter();
fmtr.setValidateConformance(validation);
fmtr.getGraphAides().add(new DatatypeFormatter(R1FormatterCompatibilityMode.ClinicalDocumentArchitecture));
fmtr.addCachedClass(ClinicalDocument.class);
fmtr.registerXSITypeName("POCD_MT000040UV.Observation", ObservationWithConfidentialityCode.class);
return fmtr;
}
示例2: setOutputandDetails
import org.marc.everest.formatters.xml.its1.XmlIts1Formatter; //导入依赖的package包/类
public static ProcessingResult setOutputandDetails(ClinicalDocument clinicalDocument, Boolean validation)
{
try {
StringWriter sw = new StringWriter();
XMLStateStreamWriter xssw = getXMLStateStreamWriter(sw);
XmlIts1Formatter fmtr = getFormatter(validation);
IFormatterGraphResult details = fmtr.graph(xssw, clinicalDocument);
xssw.writeEndElement();
xssw.writeEndDocument();
xssw.close();
String output = prettyFormatXML(sw.toString(), Constants.XML.INDENT);
ProcessingResult processingResult = new ProcessingResult();
processingResult.output = output;
processingResult.details = details;
return processingResult;
} catch (XMLStreamException e) {
logger.error(e.toString());
}
return null;
}
示例3: isValidCDATest
import org.marc.everest.formatters.xml.its1.XmlIts1Formatter; //导入依赖的package包/类
@Test
public void isValidCDATest() {
XmlIts1Formatter fmtr = new XmlIts1Formatter();
fmtr.setValidateConformance(true);
fmtr.getGraphAides().add(new DatatypeFormatter());
IFormatterGraphResult details = fmtr.graph(new NullOutputStream(), new ClinicalDocument());
assertFalse(E2EEverestValidator.isValidCDA(details));
}