git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/EcologicalEngineGeoSpatialExtension@75002 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c5b12ad5bf
commit
c881102f11
|
@ -18,8 +18,8 @@ import org.opengis.metadata.distribution.DigitalTransferOptions;
|
|||
import org.opengis.metadata.identification.Identification;
|
||||
|
||||
public class FeaturesManager {
|
||||
// private String geonetworkUrl = "http://geoserver-dev2.d4science-ii.research-infrastructures.eu/geonetwork/";
|
||||
private String geonetworkUrl = "http://geoserver.d4science-ii.research-infrastructures.eu/geonetwork/";
|
||||
private String geonetworkUrl = "http://geoserver-dev2.d4science-ii.research-infrastructures.eu/geonetwork/";
|
||||
// private String geonetworkUrl = "http://geoserver.d4science-ii.research-infrastructures.eu/geonetwork/";
|
||||
private String geonetworkUser = "admin";
|
||||
private String geonetworkPwd = "admin";
|
||||
private String scope = "/gcube/devsec";
|
||||
|
@ -32,6 +32,40 @@ public class FeaturesManager {
|
|||
this.scope = scope;
|
||||
}
|
||||
|
||||
public String getGeoserverLink(Metadata meta) {
|
||||
String link = null;
|
||||
String geoserverString = "/geoserver/";
|
||||
String wmslink = getWMSLink(meta);
|
||||
if (wmslink!=null){
|
||||
int idx = wmslink.indexOf(geoserverString);
|
||||
if (idx>0){
|
||||
link = wmslink.substring(0,idx+geoserverString.length()-1);
|
||||
return link;
|
||||
}
|
||||
}
|
||||
String wfslink = getWFSLink(meta);
|
||||
if (wfslink!=null){
|
||||
int idx = wfslink.indexOf(geoserverString);
|
||||
if (idx>0){
|
||||
link = wfslink.substring(0,idx+geoserverString.length()-1);
|
||||
return link;
|
||||
}
|
||||
}
|
||||
String wcslink = getWCSLink(meta);
|
||||
if (wcslink!=null){
|
||||
int idx = wcslink.indexOf(geoserverString);
|
||||
if (idx>0){
|
||||
link = wcslink.substring(0,idx+geoserverString.length()-1);
|
||||
return link;
|
||||
}
|
||||
}
|
||||
|
||||
if (link == null)
|
||||
System.out.println("NO GEOSERVER LINK WAS FOUND ACCORDING TO THE CRITERION");
|
||||
|
||||
return link;
|
||||
}
|
||||
|
||||
private String searchInUrl(Metadata meta, String criterion) {
|
||||
String link = null;
|
||||
for (DigitalTransferOptions option : meta.getDistributionInfo().getTransferOptions()) {
|
||||
|
|
Loading…
Reference in New Issue