/** * Transforms a {@link Code} instance to a {@link EbXMLClassification}. * * @param code the code instance to transform. Can be <code>null</code>. * @param objectLibrary the object library. * @return the {@link EbXMLClassification}. <code>null</code> if the input was <code>null</code>. */ public EbXMLClassification toEbXML(Code code, EbXMLObjectLibrary objectLibrary) { if (code == null) { return null; } EbXMLClassification classification = factory.createClassification(objectLibrary); classification.setNodeRepresentation(code.getCode()); classification.setName(code.getDisplayName()); if (code.getSchemeName() != null) { classification.addSlot(SLOT_NAME_CODING_SCHEME, code.getSchemeName()); } return classification; }
private EbXMLAdhocQueryRequest createAdhocQueryRequest(Query query) { EbXMLFactory factory = query.getType() == QueryType.SQL ? factory21 : factory30; return factory.createAdhocQueryRequest(); }