Esri Geoportal Server
1.0

com.esri.gpt.catalog.search
Class ResourceIdentifier

java.lang.Object
  extended by com.esri.gpt.catalog.search.ResourceIdentifier
Direct Known Subclasses:
XsltResourceIdentifier

public class ResourceIdentifier
extends Object

Identifies resource and content types.


Constructor Summary
ResourceIdentifier()
          Default constructor.
 
Method Summary
 String guessAgsMapServerSoapUrl(String serviceUrl)
          Guesses the ArcGIS Server SOAP endpoint for a MapServer server.
 String guessAgsServiceRestUrl(String serviceUrl)
          Guesses the ArcGIS Server rest endpoint for a service.
 String guessArcIMSContentTypeFromResourceType(String resourceType)
          Guesses the ArcIMS content type based upon a supplied resource type.
 String guessArcIMSContentTypeFromResult(CswRecord cswRecord)
          Guesses the ArcIMS content type based upon a resultant CSW record.
 String guessArcIMSContentTypeFromUrl(String url)
          Guesses the ArcIMS content type based upon a given url.
 String guessServiceTypeFromUrl(String url)
          Guesses a service type from a URL.
static ResourceIdentifier newIdentifier(RequestContext context)
          Instantiates a new resource identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceIdentifier

public ResourceIdentifier()
Default constructor.

Method Detail

guessAgsMapServerSoapUrl

public String guessAgsMapServerSoapUrl(String serviceUrl)
Guesses the ArcGIS Server SOAP endpoint for a MapServer server.
Only MapServer services are considered.

Parameters:
serviceUrl - the service URL
Returns:
the ArcGIS MapServer SOAP endpoint (without "?wsdl", null if unknown)

guessAgsServiceRestUrl

public String guessAgsServiceRestUrl(String serviceUrl)
Guesses the ArcGIS Server rest endpoint for a service.

Parameters:
serviceUrl - the service URL
Returns:
the service's ArcGIS Server rest endpoint (null if unknown)

guessArcIMSContentTypeFromResourceType

public String guessArcIMSContentTypeFromResourceType(String resourceType)
Guesses the ArcIMS content type based upon a supplied resource type.

Parameters:
resourceType - the resource type
Returns:
the ArcIMS content type (empty String if none)

guessArcIMSContentTypeFromResult

public String guessArcIMSContentTypeFromResult(CswRecord cswRecord)
Guesses the ArcIMS content type based upon a resultant CSW record.

Parameters:
cswRecord - the CSW record resulting from a search
Returns:
the ArcIMS content type ("unknown" is returned if the content type cannot be determined

guessArcIMSContentTypeFromUrl

public String guessArcIMSContentTypeFromUrl(String url)
Guesses the ArcIMS content type based upon a given url.

Parameters:
url - the resource url
Returns:
the ArcIMS content type (empty String if none)

guessServiceTypeFromUrl

public String guessServiceTypeFromUrl(String url)
Guesses a service type from a URL.

Parameters:
url - the url
Returns:
the service type

newIdentifier

public static ResourceIdentifier newIdentifier(RequestContext context)
Instantiates a new resource identifier.

By default, a new instance of com.esri.gpt.catalog.search.ResourceIdentifier is returned.

This can be overridden by the configuration parameter: /gptConfig/catalog/parameter@key="resourceLinkIdentifier"

Parameters:
context - the active request context
Returns:
the resource identifier

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.