Package nz.org.riskscape.engine.data
Class Bookmark
java.lang.Object
nz.org.riskscape.engine.data.Bookmark
- All Implemented Interfaces:
Identified
Bookmarks point to some resource to be used for risk modeling.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddUnparsed(Map<String, List<?>> toAdd) static Bookmark.BookmarkBuilderbuilder()protected booleanclone()booleanstatic BookmarkConstruct an anonymous bookmark from a URI.static BookmarkgetId()Contains a potentially modified location, set to be absolute based on the location of the bookmark itself.Contains extra, unparsed, keys and values from the bookmark definition that a particular resolver can make use ofinthashCode()booleanIf true, this Bookmark has not been fetched from an identified collection, but instead constructed, probably from a URI.toString()withFormat(String newFormat) withLocation(URI newLocation) Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface nz.org.riskscape.engine.Identified
getIdentifiedClass
-
Constructor Details
-
Bookmark
-
Bookmark
Creates a new
Bookmarkinstance.- Parameters:
id-description-format-location- 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.fromURI- 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
-
-
Method Details
-
fromURI
Construct an anonymous bookmark from a URI. Useful for tests :)
-
fromURI
-
addUnparsed
-
getParamMap
- Returns:
- a copy of the parameter map in this bookmark.
-
toString
-
clone
-
withFormat
-
withLocation
-
builder
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
- Specified by:
getIdin interfaceIdentified- Returns:
- id
-
getDescription
-
getFormat
-
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
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
-