|
Esri Geoportal Server 1.0
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.gpt.catalog.search.ResourceLinkBuilder
public class ResourceLinkBuilder
Builds the collection of bind-able links associated with a document or resource.
Nested Class Summary | |
---|---|
static class |
ResourceLinkBuilder.ServiceType
Service types. |
Field Summary | |
---|---|
static String |
RESOURCE_TYPE
|
Constructor Summary | |
---|---|
ResourceLinkBuilder()
Default constructor. |
Method Summary | |
---|---|
void |
build(SearchXslRecord xRecord,
SearchResultRecord record)
Builds the bind-able resource links associated with a resultant search record. |
protected void |
buildAddToMapLink(SearchXslRecord xRecord,
SearchResultRecord record)
Builds the link associated with adding a service to the map viewer. |
protected void |
buildAGSLinks(SearchXslRecord xRecord,
SearchResultRecord record)
Builds a set of links associated with a rest based ArcGIS service map service. |
protected void |
buildContentTypeLink(SearchXslRecord xRecord,
SearchResultRecord record)
Builds the link associated with the content type icon. |
protected void |
buildCustomLinks(SearchXslRecord xRecord,
SearchResultRecord record)
Builds the custom links. |
protected void |
buildDetailsLink(SearchXslRecord xRecord,
SearchResultRecord record)
Builds the link associated with the metadata details page. |
protected void |
buildMetadataLink(SearchXslRecord xRecord,
SearchResultRecord record)
Builds the link associated with full metadata retrieval. |
protected void |
buildOpenLink(SearchXslRecord xRecord,
SearchResultRecord record)
Builds a generic Open link for the resource URL associated with the record. |
protected void |
buildPreviewLink(SearchXslRecord xRecord,
SearchResultRecord record)
Builds the link associated with the resource preview page. |
protected void |
buildThumbnailLink(SearchXslRecord xRecord,
SearchResultRecord record)
Builds the link associated with the thumbnail. |
protected void |
buildWebsiteLink(SearchXslRecord xRecord,
SearchResultRecord record)
Builds the link associated with an organizational website. |
protected void |
determineResourceUrl(SearchXslRecord xRecord,
SearchResultRecord record)
Determines the primary resource URL associated with the resultant record. |
protected String |
encodeUrlParam(String value)
Encodes a URL parameter value. |
protected String |
getBaseContextPath()
Gets the base context path associated with the HTTP servlet request. |
protected String |
getMapViewerUrl()
Gets the map viewer url. |
protected MessageBroker |
getMessageBroker()
Gets the resource bundle message broker. |
protected RequestContext |
getRequestContext()
Gets the associated request context. |
protected ResourceIdentifier |
getResourceIdentifier()
Gets the resource identifier associated with the request. |
void |
initialize(HttpServletRequest request,
RequestContext context,
MessageBroker messageBroker)
Initializes the resource link builder. |
protected String |
makeLabel(String resourceKey)
Makes the label associated with a resource bundle key. |
protected ResourceLink |
makeLink(String url,
String tag,
String resourceKey)
Makes a link. |
static ResourceLinkBuilder |
newBuilder(RequestContext context,
HttpServletRequest servletRequest,
MessageBroker messageBroker)
Instantiates a new resource link builder. |
protected void |
setBaseContextPath(String path)
Sets the base context path associated with the HTTP servlet request. |
protected void |
setMessageBroker(MessageBroker messageBroker)
Sets the resource bundle message broker. |
protected void |
setResourceIdentifier(ResourceIdentifier resourceIdentifier)
Sets the resource identifier associated with the request. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String RESOURCE_TYPE
Constructor Detail |
---|
public ResourceLinkBuilder()
Method Detail |
---|
protected String getBaseContextPath()
protected void setBaseContextPath(String path)
path
- the base context pathprotected String getMapViewerUrl()
protected MessageBroker getMessageBroker()
protected void setMessageBroker(MessageBroker messageBroker)
messageBroker
- the message brokerprotected RequestContext getRequestContext()
protected ResourceIdentifier getResourceIdentifier()
protected void setResourceIdentifier(ResourceIdentifier resourceIdentifier)
resourceIdentifier
- the resource identifierpublic void build(SearchXslRecord xRecord, SearchResultRecord record)
xRecord
- the underlying CSW recordrecord
- the search result recordprotected void buildAddToMapLink(SearchXslRecord xRecord, SearchResultRecord record)
xRecord
- the underlying CSW recordrecord
- the search result recordprotected void buildAGSLinks(SearchXslRecord xRecord, SearchResultRecord record)
xRecord
- the underlying CSW recordrecord
- the search result recordprotected void buildContentTypeLink(SearchXslRecord xRecord, SearchResultRecord record)
xRecord
- the underlying CSW recordrecord
- the search result recordprotected void buildDetailsLink(SearchXslRecord xRecord, SearchResultRecord record)
xRecord
- the underlying CSW recordrecord
- the search result recordprotected void buildMetadataLink(SearchXslRecord xRecord, SearchResultRecord record)
xRecord
- the underlying CSW recordrecord
- the search result recordprotected void buildOpenLink(SearchXslRecord xRecord, SearchResultRecord record)
xRecord
- the underlying CSW recordrecord
- the search result recordprotected void buildPreviewLink(SearchXslRecord xRecord, SearchResultRecord record)
xRecord
- the underlying CSW recordrecord
- the search result recordprotected void buildThumbnailLink(SearchXslRecord xRecord, SearchResultRecord record)
xRecord
- the underlying CSW recordrecord
- the search result recordprotected void buildWebsiteLink(SearchXslRecord xRecord, SearchResultRecord record)
xRecord
- the underlying CSW recordrecord
- the search result recordprotected void buildCustomLinks(SearchXslRecord xRecord, SearchResultRecord record)
xRecord
- the x recordrecord
- the recordprotected void determineResourceUrl(SearchXslRecord xRecord, SearchResultRecord record)
xRecord
- the underlying CSW recordrecord
- the search result recordprotected String encodeUrlParam(String value)
value
- the URL parameter value to encode
public void initialize(HttpServletRequest request, RequestContext context, MessageBroker messageBroker)
context
- the active request contextrequest
- the active HTTP servlet request (can be null)messageBroker
- the active message brokerprotected String makeLabel(String resourceKey)
resourceKey
- the resource bundle key
protected ResourceLink makeLink(String url, String tag, String resourceKey)
url
- the URL associated with the resourcetag
- the tag idenitfying a type of linkresourceKey
- the resource bundle key associated with the labelpublic static ResourceLinkBuilder newBuilder(RequestContext context, HttpServletRequest servletRequest, MessageBroker messageBroker)
context
- the active request contextservletRequest
- the active HTTP servlet requestmessageBroker
- the message broker
|
Esri Geoportal Server 1.0
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |