opendatatrentino / disi-open-data-client

0 stars 0 forks source link

EntityService.createNameAttributeODR has hardcoded IDs #5

Closed DavidLeoni closed 10 years ago

DavidLeoni commented 10 years ago

This is giving trouble as there are other Name structures like "Place Name" with ID 23

    public AttributeODR createNameAttributeODR(IAttributeDef attrDef, Object name) {

        String nameInput=null;

        Attribute entityNameAttribute = new Attribute();
        entityNameAttribute.setDefinitionId(attrDef.getGUID());

        Name nameStructure = new Name();
        nameStructure.setEntityBaseId(1L); //NOTE HARCODED TODO change
        nameStructure.setTypeId(10L); //NOTE HARCODED TODO change

        List<Attribute> nameAttributes = new ArrayList<Attribute>();

        Attribute nameAttribute = new Attribute();
        nameAttribute.setDefinitionId(55L); //NOTE HARCODED TODO change
        nameAttribute.setConceptId(2L); //NOTE HARCODED TODO change
ITankoyeu commented 10 years ago

fixed