Class Bookmark

java.lang.Object
nz.org.riskscape.engine.data.Bookmark
All Implemented Interfaces:
Identified

public class Bookmark extends Object implements Identified

Bookmarks point to some resource to be used for risk modeling.

  • Constructor Details

  • Method Details

    • fromURI

      public static Bookmark fromURI(URI uri)

      Construct an anonymous bookmark from a URI. Useful for tests :)

    • fromURI

      public static Bookmark fromURI(URI uri, String id)
    • addUnparsed

      public Bookmark addUnparsed(Map<String,List<?>> toAdd)
    • getParamMap

      public Map<String,List<?>> getParamMap()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • clone

      public Bookmark clone()
      Overrides:
      clone in class Object
    • withFormat

      public Bookmark withFormat(String newFormat)
    • withLocation

      public Bookmark withLocation(URI newLocation)
    • builder

      public static Bookmark.BookmarkBuilder builder()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getId

      public String getId()
      Specified by:
      getId in interface Identified
      Returns:
      id
    • getDescription

      public String getDescription()
    • getFormat

      public String getFormat()
    • getLocation

      public URI getLocation()

      Contains a potentially modified location, set to be absolute based on the location of the bookmark itself. For a bookmark from a file, it will be relative to the directory the bookmark was in.

    • getUnparsed

      public Map<String,List<?>> getUnparsed()

      Contains extra, unparsed, keys and values from the bookmark definition that a particular resolver can make use of

    • isFromURI

      public boolean isFromURI()

      If true, this Bookmark has not been fetched from an identified collection, but instead constructed, probably from a URI. The id is probably the text the user supplied and the URI is going to be something that was set or synthezised on the user's behalf