@SuppressWarnings("unchecked")
private Map<String, String> initProperties(final LocationItem locationItem)
{
final Map<String, String> tags = locationItem.getTags();
tags.put(ITEM_IDENTIFIER_TAG, locationItem.getIdentifier() + "");
tags.put(OSM_IDENTIFIER_TAG, locationItem.getOsmIdentifier() + "");
if (locationItem instanceof Node)
{
tags.put(ITEM_TYPE_TAG, NODE_TAG);
}
else if (locationItem instanceof Point)
{
tags.put(ITEM_TYPE_TAG, POINT_TAG);
}
else
{
logger.warn("Flagged LocationItem with unknown item type {}", locationItem);
}
return tags;
}
}