public void generateMethods(FhirToHapiTypeConverter converter, List<Method> methods) {
        List<HapiType> types = converter.getHapiTypes();
        System.out.println("Attribute path:" + converter.getFullAttributePath());
        if ("Immunization.doseQuantity".equals(converter.getFullAttributePath())) {
            System.out.println("Start Debugging");
        }
        if (types == null || types.isEmpty() || converter.getCardinality() == Cardinality.CONSTRAINED_OUT) {
            return;
        } else {
            if(converter.isMultiType()) {
//                Method method = Method.constructNoArgMethod(Method.buildGetterName(converter.parseAttributeName()), "org.hl7.fhir.dstu3.model.Type");
//                method.setBody(getTemplate().getAdapterGetMethodDelegationWithTryCatchBody(converter.parseAttributeName()));
//                addMethod(methods, method);
                buildGetterMethod(methods, converter.parseAttributeName(), "org.hl7.fhir.dstu3.model.Type", null, false, null);
//                method = constructSetMethodSignature(converter.parseAttributeName(), "org.hl7.fhir.dstu3.model.Type", getParentType());
//                method.setBody(getTemplate().getAdapterSetMethodDelegationBody(converter.parseAttributeName()));
//                method.addImport("org.hl7.fhir.dstu3.model.Type");
//                addMethod(methods, method);
                buildSetterMethod(methods, converter.parseAttributeName(), "org.hl7.fhir.dstu3.model.Type", getParentType());
            }
            if(converter.isReferenceMultiType() && !converter.isMultipleCardinality() && !converter.isMultiType()) {
//                Method method = Method.constructNoArgMethod(Method.buildGetterName(converter.parseAttributeName()), "org.hl7.fhir.dstu3.model.Reference");
//                method.setBody(getTemplate().getAdapterGetMethodDelegationWithTryCatchBody(converter.parseAttributeName()));
//                addMethod(methods, method);
                buildGetterMethod(methods, converter.parseAttributeName(), "org.hl7.fhir.dstu3.model.Reference", null, false, null);
//                method = Method.constructNoArgMethod(Method.buildGetterName(converter.parseAttributeName() + "Target"), "org.hl7.fhir.dstu3.model.Resource");
//                method.setBody(getTemplate().getAdapterGetMethodDelegationWithTryCatchBody(converter.parseAttributeName() + "Target"));
//                addMethod(methods, method);
                buildGetterMethod(methods, converter.parseAttributeName() + "Target", "org.hl7.fhir.dstu3.model.Resource", null, false, null);
            }
            for (HapiType type : types) {
                if (type.getDatatype() == null && type.getGeneratedType() == null) {
                    System.out.println("Investigate : " + converter.getFullAttributePath());
                    //TODO Currently not handled: text, meta, references
                    continue;
                }
                if (type.isReference()) {
                    handleReferenceTypes(converter, type, methods);
                } else if (!type.isResource() && type.getGeneratedType() != null) {
                    handleExtendedDatatypes(converter, type, methods);
                } else if (type.isBackboneElement()) {
                    handleDatatypeMethods(converter, type, methods);
                } else if (type.isEnumerationType()) {
                    handleEnumTypeMethods(converter, type, methods);
                } else {
                    FhirDatatypeEnum datatype = FhirDatatypeEnum.getEnumeratedDatatype(type.getFhirType());
                    if (datatype != null && datatype.isPrimitiveDatatype()) {
                        handlePrimitiveTypeMethods(converter, type, methods);
                        //TODO Create methods that return the equivalent java type
                    } else {
                        handleDatatypeMethods(converter, type, methods);
                    }
                }
            }
            if (converter.isMultiType()) {
                //TODO Add org.hl7.fhir.dstu3.model.Type method
            }
        }
    }
public void generateMethods(FhirToHapiTypeConverter converter, List<Method> methods) {
        List<HapiType> types = converter.getHapiTypes();
        System.out.println("Attribute path:" + converter.getFullAttributePath());
        if ("Immunization.doseQuantity".equals(converter.getFullAttributePath())) {
            System.out.println("Start Debugging");
        }
        if (types == null || types.isEmpty() || converter.getCardinality() == Cardinality.CONSTRAINED_OUT) {
            return;
        } else {
            if(converter.isMultiType()) {
                buildGetterMethod(methods, converter.parseAttributeName(), "org.hl7.fhir.dstu3.model.Type", null, false, null);
                buildSetterMethod(methods, converter.parseAttributeName(), "org.hl7.fhir.dstu3.model.Type", getParentType());
            }
            if(converter.isReferenceMultiType() && !converter.isMultipleCardinality() && !converter.isMultiType()) {
                buildGetterMethod(methods, converter.parseAttributeName(), "org.hl7.fhir.dstu3.model.Reference", null, false, null);
                buildGetterMethod(methods, converter.parseAttributeName() + "Target", "org.hl7.fhir.dstu3.model.Resource", null, false, null);
            }
            for (HapiType type : types) {
                if (type.getDatatype() == null && type.getGeneratedType() == null) {
                    System.out.println("Investigate : " + converter.getFullAttributePath());
                   
                    continue;
                }
                if (type.isReference()) {
                    handleReferenceTypes(converter, type, methods);
                } else if (!type.isResource() && type.getGeneratedType() != null) {
                    handleExtendedDatatypes(converter, type, methods);
                } else if (type.isBackboneElement()) {
                    handleDatatypeMethods(converter, type, methods);
                } else if (type.isEnumerationType()) {
                    handleEnumTypeMethods(converter, type, methods);
                } else {
                    FhirDatatypeEnum datatype = FhirDatatypeEnum.getEnumeratedDatatype(type.getFhirType());
                    if (datatype != null && datatype.isPrimitiveDatatype()) {
                        handlePrimitiveTypeMethods(converter, type, methods);
                       
                    } else {
                        handleDatatypeMethods(converter, type, methods);
                    }
                }
            }
            if (converter.isMultiType()) {
               
            }
        }
    }
public void generatemethods(fhirtohapitypeconverter converter, list<method> methods) { list<hapitype> types = converter.gethapitypes(); system.out.println("attribute path:" + converter.getfullattributepath()); if ("immunization.dosequantity".equals(converter.getfullattributepath())) { system.out.println("start debugging"); } if (types == null || types.isempty() || converter.getcardinality() == cardinality.constrained_out) { return; } else { if(converter.ismultitype()) { buildgettermethod(methods, converter.parseattributename(), "org.hl7.fhir.dstu3.model.type", null, false, null); buildsettermethod(methods, converter.parseattributename(), "org.hl7.fhir.dstu3.model.type", getparenttype()); } if(converter.isreferencemultitype() && !converter.ismultiplecardinality() && !converter.ismultitype()) { buildgettermethod(methods, converter.parseattributename(), "org.hl7.fhir.dstu3.model.reference", null, false, null); buildgettermethod(methods, converter.parseattributename() + "target", "org.hl7.fhir.dstu3.model.resource", null, false, null); } for (hapitype type : types) { if (type.getdatatype() == null && type.getgeneratedtype() == null) { system.out.println("investigate : " + converter.getfullattributepath()); continue; } if (type.isreference()) { handlereferencetypes(converter, type, methods); } else if (!type.isresource() && type.getgeneratedtype() != null) { handleextendeddatatypes(converter, type, methods); } else if (type.isbackboneelement()) { handledatatypemethods(converter, type, methods); } else if (type.isenumerationtype()) { handleenumtypemethods(converter, type, methods); } else { fhirdatatypeenum datatype = fhirdatatypeenum.getenumerateddatatype(type.getfhirtype()); if (datatype != null && datatype.isprimitivedatatype()) { handleprimitivetypemethods(converter, type, methods); } else { handledatatypemethods(converter, type, methods); } } } if (converter.ismultitype()) { } } }