Package org.fao.geonet.domain

Examples of org.fao.geonet.domain.CswCapabilitiesInfoField


            cswCapabilitiesInfoField.setLangId(langId);
        }
    }

    private void setValue(@Nonnull final String fieldTitle, @Nonnull final String newValue) {
        CswCapabilitiesInfoField field = _fields.get(fieldTitle);

        if (field == null) {
            field = new CswCapabilitiesInfoField().setFieldName(fieldTitle).setLangId(this._langId);
            _fields.put(fieldTitle, field);
        }

        field.setValue(newValue);
    }
View Full Code Here


        field.setValue(newValue);
    }

    @Nullable
    private String getValue(@Nonnull final String key) {
        final CswCapabilitiesInfoField field = _fields.get(key);
        if (field == null) {
            return null;
        }
        return field.getValue();
    }
View Full Code Here

    @Autowired
    CswCapabilitiesInfoFieldRepository _repo;

    @Test
    public void testFindOne() {
        CswCapabilitiesInfoField info1 = newCswServerCapabilitiesInfo();
        info1 = _repo.save(info1);

        CswCapabilitiesInfoField info2 = newCswServerCapabilitiesInfo();
        info2 = _repo.save(info2);

        assertEquals(info2, _repo.findOne(info2.getId()));
        assertEquals(info1, _repo.findOne(info1.getId()));
    }
View Full Code Here

        assertEquals(info1, _repo.findOne(info1.getId()));
    }

    @Test
    public void testFindAllByField() {
        CswCapabilitiesInfoField info1 = newCswServerCapabilitiesInfo();
        info1 = _repo.save(info1);

        CswCapabilitiesInfoField info2 = newCswServerCapabilitiesInfo();
        info2 = _repo.save(info2);

        List<CswCapabilitiesInfoField> infos = _repo.findAllByFieldName(info1.getFieldName());

        assertEquals(1, infos.size());
        assertEquals(info1.getFieldName(), infos.get(0).getFieldName());

        infos = _repo.findAllByFieldName(info2.getFieldName());

        assertEquals(1, infos.size());
        assertEquals(info2.getFieldName(), infos.get(0).getFieldName());
    }
View Full Code Here

        assertEquals(info2.getFieldName(), infos.get(0).getFieldName());
    }

    @Test
    public void testFindAllByLangId() {
        CswCapabilitiesInfoField info1 = newCswServerCapabilitiesInfo();
        info1 = _repo.save(info1);

        CswCapabilitiesInfoField info2 = newCswServerCapabilitiesInfo();
        info2 = _repo.save(info2);

        List<CswCapabilitiesInfoField> infos = _repo.findAllByLangId(info1.getLangId());

        assertEquals(1, infos.size());
        assertEquals(info1.getLangId(), infos.get(0).getLangId());

        infos = _repo.findAllByLangId(info2.getLangId());

        assertEquals(1, infos.size());
        assertEquals(info2.getLangId(), infos.get(0).getLangId());
    }
View Full Code Here

    private CswCapabilitiesInfoField newCswServerCapabilitiesInfo() {
        return newCswServerCapabilitiesInfo(_inc);
    }
    public static CswCapabilitiesInfoField newCswServerCapabilitiesInfo(AtomicInteger inc) {
        int val = inc.incrementAndGet();
        CswCapabilitiesInfoField CswCapabilitiesInfoField = new CswCapabilitiesInfoField().setFieldName("field" + val).setValue("lang"
                                                                                                                                + val)
                .setLangId("l_" + val);
        return CswCapabilitiesInfoField;
    }
View Full Code Here

TOP

Related Classes of org.fao.geonet.domain.CswCapabilitiesInfoField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.