Package com.castlabs.sdk.viisights

# Class ViisightData

java.lang.Object
com.castlabs.sdk.viisights.ViisightData

All Implemented Interfaces:
  `Parcelable`

public class ViisightData extends Object implements Parcelable
ViisightData class represents the data structure for Viisight tracks, scenes, and hotspots. It implements Parcelable to allow passing instances between Android components.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface android.os.Parcelable

  `Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final Parcelable.Creator<ViisightData>`
  `CREATOR`
  Parcelable creator for ViisightData.
  `String`
  `hotspotsUrl`
  URL for the Viisight hotspots.
  `String`
  `scenesThumbsUrl`
  URL for the thumbnails of the Viisight scenes.
  `String`
  `scenesUrl`
  URL for the Viisight scenes.
  `String`
  `url`
  URL for the Viisight tracks.

  ### Fields inherited from interface android.os.Parcelable

  `CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ViisightData`
  `create(String json)`
  Creates a ViisightData instance from a JSON string.
  `int`
  `describeContents()`
  `Uri`
  `getAbsoluteHotspotsUri(String manifest)`
  Returns the absolute URI for hotspots based on the manifest URL.
  `String`
  `getAbsoluteScenesThumbsUrl(String manifest)`
  Returns the absolute URL for scene thumbnails based on the manifest URL.
  `Uri`
  `getAbsoluteScenesUri(String manifest)`
  Returns the absolute URI for scenes based on the manifest URL.
  `Uri`
  `getAbsoluteUri(String manifest)`
  Returns a string representation of the ViisightData object.
  `void`
  `writeToParcel(Parcel dest, int flags)`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### CREATOR

    public static final Parcelable.Creator<ViisightData> CREATOR
    Parcelable creator for ViisightData.

  - ### url

    public String url
    URL for the Viisight tracks.

  - ### hotspotsUrl

    public String hotspotsUrl
    URL for the Viisight hotspots.

  - ### scenesUrl

    public String scenesUrl
    URL for the Viisight scenes.

  - ### scenesThumbsUrl

    public String scenesThumbsUrl
    URL for the thumbnails of the Viisight scenes.

- ## Method Details

  - ### create

    public static ViisightData create(@NonNull String json)
    Creates a ViisightData instance from a JSON string.
    Parameters:
      `json` - The JSON string containing the Viisight data.
    Returns:
      A ViisightData instance or null if parsing fails.

  - ### describeContents

    public int describeContents()
    Specified by:
      `describeContents` in interface `Parcelable`

  - ### writeToParcel

    public void writeToParcel(Parcel dest, int flags)
    Specified by:
      `writeToParcel` in interface `Parcelable`

  - ### getAbsoluteUri

    public Uri getAbsoluteUri(String manifest)
    Returns a string representation of the ViisightData object.
    Parameters:
      `manifest` - The manifest URL to resolve relative paths.
    Returns:
      A string containing the URLs for tracks, hotspots, and scenes.

  - ### getAbsoluteHotspotsUri

    public Uri getAbsoluteHotspotsUri(String manifest)
    Returns the absolute URI for hotspots based on the manifest URL.
    Parameters:
      `manifest` - The manifest URL to resolve relative paths.
    Returns:
      An absolute URI for hotspots or null if hotspotsUrl is not set.

  - ### getAbsoluteScenesUri

    public Uri getAbsoluteScenesUri(String manifest)
    Returns the absolute URI for scenes based on the manifest URL.
    Parameters:
      `manifest` - The manifest URL to resolve relative paths.
    Returns:
      An absolute URI for scenes or null if scenesUrl is not set.

  - ### getAbsoluteScenesThumbsUrl

    public String getAbsoluteScenesThumbsUrl(String manifest)
    Returns the absolute URL for scene thumbnails based on the manifest URL.
    Parameters:
      `manifest` - The manifest URL to resolve relative paths.
    Returns:
      An absolute URL for scene thumbnails or null if scenesThumbsUrl is not set.