本文整理匯總了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));
}