本文整理汇总了Java中org.hl7.v3.ObjectFactory类的典型用法代码示例。如果您正苦于以下问题:Java ObjectFactory类的具体用法?Java ObjectFactory怎么用?Java ObjectFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ObjectFactory类属于org.hl7.v3包,在下文中一共展示了ObjectFactory类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createClinicalDocumentStringFromObject
import org.hl7.v3.ObjectFactory; //导入依赖的package包/类
private String createClinicalDocumentStringFromObject(POCDMT000040ClinicalDocument doc) throws JAXBException
{
String res = "";
ObjectFactory factory = new ObjectFactory();
JAXBElement element = factory.createClinicalDocument(doc);
try {
JAXBContext context = JAXBContext.newInstance(new Class[] { POCDMT000040ClinicalDocument.class });
Marshaller marshaller = context.createMarshaller();
StringWriter sw = new StringWriter();
marshaller.setProperty("jaxb.formatted.output", Boolean.valueOf(true));
marshaller.setProperty("jaxb.schemaLocation", "http://www.w3.org/2001/XMLSchema-instance");
marshaller.marshal(element, sw);
res = sw.toString();
}
catch (Exception ex) {
ex.printStackTrace();
}
return res;
}
示例2: addLocalHeader
import org.hl7.v3.ObjectFactory; //导入依赖的package包/类
protected void addLocalHeader(POCDMT000040ClinicalDocument clinicalDocument) {
hl7finland.ObjectFactory hl7fiOF = new hl7finland.ObjectFactory();
LocalHeader localHeader = hl7fiOF.createLocalHeader();
CV contentsCode = of.createCV();
if ( fetchAttributes(Kasaaja.LM_CONTENTS, contentsCode) ) {
localHeader.setTableOfContents(hl7fiOF.createTableOfContents());
localHeader.getTableOfContents().getContentsCodes().add(contentsCode);
}
CV fileFormat = of.createCV();
if ( fetchAttributes("localHeader.fileFormat", fileFormat) ) {
localHeader.setFileFormat(fileFormat);
}
SoftwareSupport softwareSupport = new SoftwareSupport();
softwareSupport.setModerator(properties.getProperty("moderator", "Kansaneläkelaitos"));
softwareSupport.setProduct(properties.getProperty("product", "KELAIN"));
softwareSupport.setVersion(properties.getProperty("version", "0.0.1"));
softwareSupport.setValue(properties.getProperty("value", "Kelain"));
localHeader.setSoftwareSupport(softwareSupport);
CV documentType = of.createCV();
if ( fetchAttributes("localHeader.documentType", documentType) ) {
localHeader.setDocumentType(documentType);
}
CV functionCode = of.createCV();
if ( fetchAttributes("localHeader.functionCode", functionCode) ) {
localHeader.setFunctionCode(functionCode);
}
CV recordStatus = of.createCV();
if ( fetchAttributes("localHeader.recordStatus", recordStatus) ) {
localHeader.setRecordStatus(recordStatus);
}
CV retentionPeriodClass = of.createCV();
if ( fetchAttributes("localHeader.retentionPeriodClass", retentionPeriodClass) ) {
localHeader.setRetentionPeriodClass(retentionPeriodClass);
}
clinicalDocument.setLocalHeader(localHeader);
}
示例3: Kasaaja
import org.hl7.v3.ObjectFactory; //导入依赖的package包/类
public Kasaaja(Properties properties) {
this.properties = properties;
generator = OidGenerator.getInstance();
OidGenerator.setBaseOid(properties.getProperty(Kasaaja.BASE_OID_PROPERTY));
of = new ObjectFactory();
}