CPD Results
The following document contains the results of PMD's CPD 6.13.0.
Duplications
File |
Line |
fr/paris/lutece/plugins/cartography/modules/solr/service/CartographyService.java |
109 |
fr/paris/lutece/plugins/cartography/modules/solr/web/CoordinateXPage.java |
191 |
String uid = result.getId( );
for ( Entry<String, Object> entry : dynamicFields.entrySet( ) )
{
if ( !entry.getKey( ).endsWith( SolrItem.DYNAMIC_GEOJSON_FIELD_SUFFIX ) )
{
continue;
}
HashMap<String, Object> h = new HashMap<>( );
String strJson = (String) entry.getValue( );
GeolocItem geolocItem = null;
try
{
geolocItem = GeolocItem.fromJSON( strJson );
}
catch( IOException e )
{
AppLogService.error( "SolrSearchApp: error parsing geoloc JSON: " + strJson + ", exception " + e );
}
// if ( geolocItem != null && geolocItem.getTypegeometry( ).equals( GeolocItem.VALUE_GEOMETRY_TYPE ) )
if ( geolocItem != null )
{
String strType = result.getId( ).substring( result.getId( ).lastIndexOf( '_' ) + 1 );
String strIcon;
if ( iconKeysCache.containsKey( geolocItem.getIcon( ) ) )
{
strIcon = iconKeysCache.get( geolocItem.getIcon( ) );
}
else
{
strIcon = IconService.getIcon( strType, geolocItem.getIcon( ) );
iconKeysCache.put( geolocItem.getIcon( ), strIcon );
}
geolocItem.setIcon( strIcon );
h.put( MARK_POINTS_GEOJSON, geolocItem.toJSON( ) );
h.put( MARK_POINTS_ID, result.getId( ).substring( result.getId( ).indexOf( '_' ) + 1, result.getId( ).lastIndexOf( '_' ) ) );
h.put( MARK_POINTS_FIELDCODE, entry.getKey( ).substring( 0, entry.getKey( ).lastIndexOf( '_' ) ) );
h.put( MARK_POINTS_TYPE, strType ); |
File |
Line |
fr/paris/lutece/plugins/cartography/modules/solr/web/CoordinateXPage.java |
184 |
fr/paris/lutece/plugins/cartography/modules/solr/web/CoordinateXPage.java |
249 |
private static List<HashMap<String, Object>> getGeolocModel( List<SolrSearchResult> listResultsGeoloc )
{
List<HashMap<String, Object>> points = new ArrayList<>( listResultsGeoloc.size( ) );
Map<String, String> iconKeysCache = new HashMap<>( );
for ( SolrSearchResult result : listResultsGeoloc )
{
Map<String, Object> dynamicFields = result.getDynamicFields( );
for ( Entry<String, Object> entry : dynamicFields.entrySet( ) )
{
if ( !entry.getKey( ).endsWith( SolrItem.DYNAMIC_GEOJSON_FIELD_SUFFIX ) )
{
continue;
}
HashMap<String, Object> h = new HashMap<>( );
String strJson = (String) entry.getValue( ); |