当前位置: 首页>>代码示例>>Java>>正文


Java ObjectFactory类代码示例

本文整理汇总了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;
}
 
开发者ID:tlin-fei,项目名称:ds4p,代码行数:22,代码来源:ClinicalDocumentProvider.java

示例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);
}
 
开发者ID:TheFinnishSocialInsuranceInstitution,项目名称:KantaCDA-API,代码行数:39,代码来源:Kasaaja.java

示例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();
}
 
开发者ID:TheFinnishSocialInsuranceInstitution,项目名称:KantaCDA-API,代码行数:7,代码来源:Kasaaja.java


注:本文中的org.hl7.v3.ObjectFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。