Class KmlEndpoint
java.lang.Object
org.codice.ddf.spatial.kml.endpoint.KmlEndpoint
Endpoint used to create KML
NetworkLinks. The KML Network Link will link Google Earth to
the Catalog through the OpenSearch Endpoint.- Author:
- Keith C Wire
-
Constructor Summary
ConstructorsConstructorDescriptionKmlEndpoint(org.codice.ddf.branding.BrandingRegistry brandingPlugin, ddf.catalog.CatalogFramework catalogFramework) -
Method Summary
Modifier and TypeMethodDescriptionde.micromata.opengis.kml.v_2_2_0.KmlgetAvailableSources(javax.ws.rs.core.UriInfo uriInfo) Creates a list ofNetworkLinks, one for eachSourceincluding the local catalog.byte[]Retrieves an icon from the hosted directory based on the id provided.de.micromata.opengis.kml.v_2_2_0.KmlgetKmlNetworkLink(javax.ws.rs.core.UriInfo uriInfo) Creates aNetworkLinkto provide a layer to KML Clients.de.micromata.opengis.kml.v_2_2_0.KmlgetKmlStyles(javax.ws.rs.core.UriInfo uriInfo) Kml REST Get.getLogo()voidsetDescription(String description) Sets the Description that will be used as the description of the RootNetworkLink.voidsetIconLoc(String iconLoc) Sets the root directory of icons to be provided via this endpoint.voidSets the URL of the Logo that will be used in the description of the RootNetworkLink.voidsetMaxResults(Integer maxResults) Sets the Maximum Number of results eachNetworkLinkwill return.voidsetStyleUrl(String url) Attempts to load a KMLStylefrom a file provided via a file system path.voidsetVisibleByDefault(Boolean visibleByDefault) Sets if the ddf.catalog.source.SourceNetworkLinks should be Visible by Default.voidsetWebSite(String webSite) Sets the Web Site URL that will be used in the description of the RootNetworkLink.
-
Constructor Details
-
KmlEndpoint
public KmlEndpoint(org.codice.ddf.branding.BrandingRegistry brandingPlugin, ddf.catalog.CatalogFramework catalogFramework)
-
-
Method Details
-
setStyleUrl
Attempts to load a KMLStylefrom a file provided via a file system path.- Parameters:
url- - the path to the file.
-
setIconLoc
Sets the root directory of icons to be provided via this endpoint.- Parameters:
iconLoc- - the path to the directory of icons
-
getDescription
-
setDescription
Sets the Description that will be used as the description of the RootNetworkLink.- Parameters:
description- - the Description of the RootNetworkLink
-
setVisibleByDefault
Sets if the ddf.catalog.source.SourceNetworkLinks should be Visible by Default.- Parameters:
visibleByDefault- - true to enable
-
setMaxResults
Sets the Maximum Number of results eachNetworkLinkwill return.- Parameters:
maxResults- - maximum number of results to return
-
getWebSite
-
setWebSite
Sets the Web Site URL that will be used in the description of the RootNetworkLink.- Parameters:
webSite- - the URL of the web site
-
getLogo
-
setLogo
Sets the URL of the Logo that will be used in the description of the RootNetworkLink.- Parameters:
logo- - the URL to the logo
-
getProductName
-
getContact
-
getBaseUrl
-
getKmlNetworkLink
@GET @Path("/") @Produces("application/vnd.google-earth.kml+xml") public de.micromata.opengis.kml.v_2_2_0.Kml getKmlNetworkLink(@Context javax.ws.rs.core.UriInfo uriInfo) Creates aNetworkLinkto provide a layer to KML Clients.- Parameters:
uriInfo- - injected resource providing the URI.- Returns:
- - KML NetworkLink
-
getAvailableSources
@GET @Path("/sources") @Produces("application/vnd.google-earth.kml+xml") public de.micromata.opengis.kml.v_2_2_0.Kml getAvailableSources(@Context javax.ws.rs.core.UriInfo uriInfo) Creates a list ofNetworkLinks, one for eachSourceincluding the local catalog.- Parameters:
uriInfo- - injected resource provding the URI.- Returns:
- -
Kmlcontaining a folder ofNetworkLinks.
-
getKmlStyles
@GET @Path("/styles") @Produces("application/vnd.google-earth.kml+xml") public de.micromata.opengis.kml.v_2_2_0.Kml getKmlStyles(@Context javax.ws.rs.core.UriInfo uriInfo) Kml REST Get. Returns the style Document.- Parameters:
uriInfo-- Returns:
- stylesDoc
- Throws:
javax.ws.rs.WebApplicationException
-
getIcon
@GET @Path("/icons/{id:.+}") @Produces({"image/png","image/jpeg","image/tiff","image/gif"}) public byte[] getIcon(@Context javax.ws.rs.core.UriInfo uriInfo, @PathParam("id") String id) Retrieves an icon from the hosted directory based on the id provided.- Parameters:
uriInfo- - injected resource providing the URIid- - the id (filename) of the icon- Returns:
- iconBytes - the icon as a byte[]
-