public static void putDataPrefixToLayerList(Layer layer,Properties props,String layerListProperty){
  String dataPrefix=(String)layer.getAttribute(Layer.DataPathPrefixProperty);
  if (dataPrefix != null && dataPrefix.length() > 0) {
    putDataPrefixToLayerList(dataPrefix,props,layerListProperty);
  }
}

public static void putDataPrefixToLayerList ( Layer layer , Properties props , String layerListProperty ) { String dataPrefix = ( String ) layer . getAttribute ( Layer . DataPathPrefixProperty ) ; if ( dataPrefix != null && dataPrefix . length ( ) > 0 ) { putDataPrefixToLayerList ( dataPrefix , props , layerListProperty ) ; } }
if the layer has a datapathprefix attribute set , that attribute value can be used as a common path to prepend to any layer ' s data path . this allows you to set a relative path to files in the layer ' s properties , and then prepend the absolute path later at runtime . < p > the datapathprefix can be set in the properties for a layer , where it is pushed to the layer ' s attributes in layer . setproperties ( ) . this method is intended for layers that have sub - layers , so the parent layer can set that datapathprefix property on it ' s children automatically .
