public class URIHelper
extends java.lang.Object
Constructor and Description |
---|
URIHelper() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getContent(java.lang.String uri)
Get the content/path of the URI string (everything after the scheme://)
|
static java.lang.String |
getContent(java.lang.String scheme,
java.lang.String uri)
Get the "content" of the URI string (everything after the scheme://)
|
static java.io.File |
getFile(java.lang.String fileURI)
Convert a file URI (file://[path]) to a file
|
static MissionPackageManifest |
getManifest(java.lang.String uri)
Convert a MP manifest URI (mpm://[path]/[XML base64]) to a manifest
|
static MapItem |
getMapItem(MapView mapView,
java.lang.String mapItemURI)
Find a map item given a URI (map-item://[UID])
|
static java.lang.String |
getURI(ConnectionEntry entry)
Convert a video alias to a URI string (video://[UID])
|
static java.lang.String |
getURI(java.io.File file)
Convert a file path to a file URI
|
static java.lang.String |
getURI(MapItem item)
Convert a map item to a URI string (map-item://[UID])
|
static java.lang.String |
getURI(MissionPackageManifest manifest)
Convert a Mission Package manifest to a URI
mpm://[path]/[XML base 64]
The URI will only contain base64 if the manifest does not exist locally
|
static java.lang.String |
getURI(MissionPackageManifest manifest,
boolean serializeXML)
Convert a Mission Package manifest to a URI
mpm://[path]/[optional XML base 64]
|
static ConnectionEntry |
getVideoAlias(java.lang.String videoURI)
Find a video alias given a URI (video://[UID])
|
public static java.lang.String getContent(java.lang.String scheme, java.lang.String uri)
scheme
- Expected URI schemeuri
- URI stringpublic static java.lang.String getContent(java.lang.String uri)
uri
- URI stringpublic static java.io.File getFile(java.lang.String fileURI)
fileURI
- File URI stringpublic static java.lang.String getURI(java.io.File file)
file
- File objectpublic static MapItem getMapItem(MapView mapView, java.lang.String mapItemURI)
mapView
- Map view instancemapItemURI
- Map item URIpublic static java.lang.String getURI(MapItem item)
item
- Map itempublic static ConnectionEntry getVideoAlias(java.lang.String videoURI)
videoURI
- Video alias URIpublic static java.lang.String getURI(ConnectionEntry entry)
entry
- Connection entrypublic static MissionPackageManifest getManifest(java.lang.String uri)
uri
- Mission Package manifest URIpublic static java.lang.String getURI(MissionPackageManifest manifest, boolean serializeXML)
manifest
- The Mission Package manifestserializeXML
- True to serialize the manifest XML to base64
within the URI. Useful for temporary manifests
(only exists in memory; not on the filesystem).public static java.lang.String getURI(MissionPackageManifest manifest)
manifest
- Mission Package manifest