@SuppressWarnings("unchecked") @Test public void setAttributes() throws Exception { Map<String, Attribute> map = new HashMap<String, Attribute>(); map.put(ATTRIBUTE_NAME, new StringAttribute("Heikant")); map.put(ATTRIBUTE_POPULATION, new DoubleAttribute(100.0)); featureModel.setAttributes(feature, map); Assert.assertEquals("Heikant", featureModel.getAttribute(feature, ATTRIBUTE_NAME).getValue()); }
@Override public Attribute getAttribute(Object feature, String name) throws LayerException { AbstractAttributeInfo attributeInfo = getAttributeInfoMap().get(name); if (null == attributeInfo) { throw new LayerException(ExceptionCode.ATTRIBUTE_UNKNOWN, name, getAttributeInfoMap().keySet()); } try { return converterService.toDto(asFeature(feature).getAttribute(name), attributeInfo); } catch (GeomajasException e) { throw new LayerException(e); } }
ShapeInMemFeatureModel extends FeatureSourceRetriever implements FeatureModel { @Override public Attribute getAttribute(Object feature, String name) throws LayerException { AbstractAttributeInfo attributeInfo = getAttributeInfoMap().get(name); if (null == attributeInfo) { throw new LayerException(ExceptionCode.ATTRIBUTE_UNKNOWN, name, getAttributeInfoMap().keySet()); } try { return converterService.toDto(asFeature(feature).getAttribute(name), attributeInfo); } catch (GeomajasException e) { throw new LayerException(e); } } }
ShapeInMemFeatureModel extends FeatureSourceRetriever implements FeatureModel { @Override public Attribute getAttribute(Object feature, String name) throws LayerException { AbstractAttributeInfo attributeInfo = getAttributeInfoMap().get(name); if (null == attributeInfo) { throw new LayerException(ExceptionCode.ATTRIBUTE_UNKNOWN, name, getAttributeInfoMap().keySet()); } try { return converterService.toDto(asFeature(feature).getAttribute(name), attributeInfo); } catch (GeomajasException e) { throw new LayerException(e); } } ShapeInMemFeatureModel(DataStore dataStore, String featureSourceName, int srid,
			DtoConverterService converterService); }
ShapeInMemFeatureModel extends FeatureSourceRetriever implements FeatureModel { @Override public Attribute getAttribute(Object feature, String name) throws LayerException { AbstractAttributeInfo attributeInfo = getAttributeInfoMap().get(name); if (null == attributeInfo) { throw new LayerException(ExceptionCode.ATTRIBUTE_UNKNOWN, name, getAttributeInfoMap().keySet()); } try { return converterService.toDto(asFeature(feature).getAttribute(name), attributeInfo); } catch (GeomajasException e) { throw new LayerException(e); } } ShapeInMemFeatureModel(DataStore dataStore, String featureSourceName, int srid,
			DtoConverterService converterService); @Override void setLayerInfo(VectorLayerInfo vectorLayerInfo); @Override Attribute getAttribute(Object feature, String name); @Override Map<String, Attribute> getAttributes(Object feature); @Override int getSrid(); @Override Geometry getGeometry(Object feature); @Override String getId(Object feature); @Override Object newInstance(); @Override Object newInstance(String id); @Override void setGeometry(Object feature, Geometry geometry); @Override boolean canHandle(Object feature); }
ShapeInMemFeatureModel extends FeatureSourceRetriever implements FeatureModel { @Override public Attribute getAttribute(Object feature, String name) throws LayerException { AbstractAttributeInfo attributeInfo = getAttributeInfoMap().get(name); if (null == attributeInfo) { throw new LayerException(ExceptionCode.ATTRIBUTE_UNKNOWN, name, getAttributeInfoMap().keySet()); } try { return converterService.toDto(asFeature(feature).getAttribute(name), attributeInfo); } catch (GeomajasException e) { throw new LayerException(e); } } ShapeInMemFeatureModel(DataStore dataStore, String featureSourceName, int srid,
			DtoConverterService converterService); @Override void setLayerInfo(VectorLayerInfo vectorLayerInfo); @Override Attribute getAttribute(Object feature, String name); @Override Map<String, Attribute> getAttributes(Object feature); @Override int getSrid(); @Override Geometry getGeometry(Object feature); @Override String getId(Object feature); @Override Object newInstance(); @Override Object newInstance(String id); @Override void setGeometry(Object feature, Geometry geometry); @Override boolean canHandle(Object feature);  }