Bridges-Java-3.0.2  3.0.2
Bridges(JavaAPI)
Public Member Functions | Static Public Member Functions | List of all members
bridges.connect.DataSource Class Reference

Public Member Functions

List< EarthquakeUSGSgetEarthquakeUSGSData (int maxElements) throws Exception
 
List< ActorMovieIMDBgetActorMovieIMDBData () throws Exception
 
List< ActorMovieIMDBgetActorMovieIMDBData (int maxElements) throws Exception
 
List< ActorMovieIMDBgetActorMovieIMDBData2 () throws Exception
 
List< GutenbergBookgetGutenbergBookMetaData () throws Exception
 
List< GamegetGameData () throws Exception
 
List< SonggetSongData () throws Exception
 
Song getSong (String songTitle) throws Exception
 
Song getSong (String songTitle, String artistName) throws Exception
 
List< ShakespearegetShakespeareData () throws Exception
 This function provides access to a collection of Shakespeare plays, poems and plays. More...
 
List< ShakespearegetShakespeareData (String works) throws Exception
 This function provides access to a collection of Shakespeare plays, poems and plays. More...
 
List< ShakespearegetShakespeareData (String works, Boolean textOnly) throws Exception
 This function provides access to a collection of Shakespeare plays, poems and plays. More...
 
ArrayList< CancerIncidencegetCancerIncidenceData () throws Exception
 
bridges.data_src_dependent.OsmData getOsmData (String location, String level) throws IOException
 
bridges.data_src_dependent.OsmData getOsmDataOld (String location, String level) throws IOException
 
String getAssignmentJSON (String user, int assignment, int subassignment) throws IOException
 
String getAssignmentJSON (String user, int assignment) throws IOException
 
bridges.base.ColorGrid getColorGridFromAssignment (String user, int assignment, int subassignment) throws IOException
 
bridges.base.ColorGrid getColorGridFromAssignment (String user, int assignment) throws IOException
 

Static Public Member Functions

static bridges.data_src_dependent.OsmData getOsmData (double minLat, double minLon, double maxLat, double maxLon, String level) throws IOException
 
static OsmData getOSMData (double minLat, double minLon, double maxLat, double maxLon) throws IOException
 
static ArrayList< ActorMovieWikidatagetWikidataActorMovie (int yearBegin, int yearEnd) throws IOException
 This function returns the Movie and Actors playing in them between two years from WikiData. More...
 

Member Function Documentation

◆ getActorMovieIMDBData() [1/2]

List<ActorMovieIMDB> bridges.connect.DataSource.getActorMovieIMDBData ( ) throws Exception

This helper function provides access to a small curated IMDB dataset. The data is retrieved, formatted into a list of ActorMovieIMDB objects (about 1800 pairs).

This curated data set has only actor and movie name pairs. refer to

     http://bridgesuncc.github.io/datasets.html

for more information and to look at the dataset.

Exceptions
Exceptionif the request fails
Returns
a list of ActorMovieIMDB objects, but only actor, movie, movie genre and movie rating are returned.

◆ getActorMovieIMDBData() [2/2]

List<ActorMovieIMDB> bridges.connect.DataSource.getActorMovieIMDBData ( int  maxElements) throws Exception

◆ getActorMovieIMDBData2()

List<ActorMovieIMDB> bridges.connect.DataSource.getActorMovieIMDBData2 ( ) throws Exception

This helper function provides access to a second curated IMDB dataset; the data is retrieved, formatted into a list of ActorMovieIMDB objects

This version of the IMDB Actor/Movie data contains for each record, actor name, movie name, movie genres, movie rating; refer to

     http://bridgesuncc.github.io/datasets.html

for more information and to look at the dataset.

Exceptions
Exceptionif the request fails
Returns
a list of ActorMovieIMDB objects

◆ getAssignmentJSON() [1/2]

String bridges.connect.DataSource.getAssignmentJSON ( String  user,
int  assignment,
int  subassignment 
) throws IOException

◆ getAssignmentJSON() [2/2]

String bridges.connect.DataSource.getAssignmentJSON ( String  user,
int  assignment 
) throws IOException

◆ getCancerIncidenceData()

ArrayList<CancerIncidence> bridges.connect.DataSource.getCancerIncidenceData ( ) throws Exception

This helper function provides access to a cancer dataset from CDC https://www.cdc.gov/cancer/npcr/uscs/download_data.htm and curated by Austin (Cory) Bart as part of the Corgis data collection https://think.cs.vt.edu/corgis/

Each record in this collection has a number of fields detailed in the CancerIncidence class.

For more information and to look at the data, refer to

     http://bridgesuncc.github.io/datasets.html

Exceptions
Exceptionif the request fails
Returns
a list of Cancer incidence objects.

◆ getColorGridFromAssignment() [1/2]

bridges.base.ColorGrid bridges.connect.DataSource.getColorGridFromAssignment ( String  user,
int  assignment,
int  subassignment 
) throws IOException

Reconstruct a ColorGrid from an existing ColorGrid on the Bridges server

Returns
the ColorGrid stored in the bridges server
Parameters
userthe name of the user who uploaded the assignment
assignmentthe ID of the assignment to get
subassignmentthe ID of the subassignment to get

◆ getColorGridFromAssignment() [2/2]

bridges.base.ColorGrid bridges.connect.DataSource.getColorGridFromAssignment ( String  user,
int  assignment 
) throws IOException

Reconstruct a ColorGrid from an existing ColorGrid on the Bridges server

Returns
the ColorGrid stored in the bridges server
Parameters
userthe name of the user who uploaded the assignment
assignmentthe ID of the assignment to get

◆ getEarthquakeUSGSData()

List<EarthquakeUSGS> bridges.connect.DataSource.getEarthquakeUSGSData ( int  maxElements) throws Exception

This helper function provides a simple API to retrieve current USGS earthquake Tweet data from the USGS website (https://earthquake.usgs.gov/earthquakes/map/); The data is retrieved and formatted into a list of EarthquakeUSGS objects.

More information on the dataset can be found at http://bridgesuncc.github.io/datasets.html

Parameters
maxElementsthe number of earthquake records retrieved, limited to 5000
Exceptions
Exceptionif the request fails
Returns
a list of earthquake records

◆ getGameData()

List<Game> bridges.connect.DataSource.getGameData ( ) throws Exception

This helper function provides access to the meta-data of the video game collection.

Each record in this collection has information on game title, platform, rating, and genre. For more information and to look at the data, refer to

     http://bridgesuncc.github.io/datasets.html

Exceptions
Exceptionif the request fails
Returns
a list of Game objects.

◆ getGutenbergBookMetaData()

List<GutenbergBook> bridges.connect.DataSource.getGutenbergBookMetaData ( ) throws Exception

This helper function provides access to the meta-data of the Gutenberg book collection (about 1000 books); the data is retrieved, formatted into a list of GutenbergBook objects.

Each book in this collection has for each record, information on author (name, birth, death), title, languages, genres, subjects, metrics(number of chars, words, sentences, difficult words), url downloads. More information and commands to access the data can be found at

     http://bridgesuncc.github.io/datasets.html
for more information and to look at the dataset.

Exceptions
Exceptionif the request fails
Returns
a list of GutenbergBook objects

◆ getOsmData() [1/2]

bridges.data_src_dependent.OsmData bridges.connect.DataSource.getOsmData ( String  location,
String  level 
) throws IOException

Generates Open Street Map URL request for a given location and returns the map data

Parameters
locationname of city or area that the server supports
levellevel of road detail on requested map
Returns
OsmData vertices and edges of Open Street Map data
Exceptions
IOExceptionIf there is an error parsing response from server or is an invalid location name

◆ getOsmData() [2/2]

static bridges.data_src_dependent.OsmData bridges.connect.DataSource.getOsmData ( double  minLat,
double  minLon,
double  maxLat,
double  maxLon,
String  level 
) throws IOException
static

Generates Open Street Map URL request for a given set of coordinates and returns the map data

Parameters
minLatminimum latitude value for the area requested
minLonminimum longitude value for the area requested
maxLatmaximum latitude value for the area requested
maxLonmaximum longitude value for the area requested
levellevel of road detail on requested map
Returns
OsmData vertices and edges of Open Street Map data
Exceptions
IOExceptionIf there is an error parsing response from server or is an invalid location name

◆ getOSMData()

static OsmData bridges.connect.DataSource.getOSMData ( double  minLat,
double  minLon,
double  maxLat,
double  maxLon 
) throws IOException
static

Generates Open Street Map URL request for a given set of coordinates with default level and returns the map data

Parameters
minLatminimum latitude value for the area requested
minLonminimum longitude value for the area requested
maxLatmaximum latitude value for the area requested
maxLonmaximum longitude value for the area requested
Returns
OsmData vertices and edges of Open Street Map data
Exceptions
IOExceptionIf there is an error parsing response from server or is an invalid location name

◆ getOsmDataOld()

bridges.data_src_dependent.OsmData bridges.connect.DataSource.getOsmDataOld ( String  location,
String  level 
) throws IOException

Generates Open Street Map URL request for a given location and returns the map data

This is a legacy function that only supports few cities: "uncc_campus", "charlotte", "washington_dc", "saint_paul", "new_york", "los_angeles", "san_francisco", "miami", "minneapolis", "dallas"

Parameters
locationname of city or area that the server supports
levellevel of road detail on requested map
Returns
OsmData vertices and edges of Open Street Map data
Exceptions
IOExceptionIf there is an error parsing response from server or is an invalid location name

◆ getShakespeareData() [1/3]

List<Shakespeare> bridges.connect.DataSource.getShakespeareData ( ) throws Exception

This function provides access to a collection of Shakespeare plays, poems and plays.

This function return all the works of Shakespeare in the collection.

Each record in this collection has information on title, type (poem, Sonnet, play) and text.

For more information and to look at the data, refer to http://bridgesuncc.github.io/datasets.html

Exceptions
Exceptionif the request fails
Returns
a list of Shakespeare objects.

◆ getShakespeareData() [2/3]

List<Shakespeare> bridges.connect.DataSource.getShakespeareData ( String  works) throws Exception

This function provides access to a collection of Shakespeare plays, poems and plays.

Each record in this collection has information on title, type (poem, Sonnet, play) and text.

For more information and to look at the data, refer to http://bridgesuncc.github.io/datasets.html

This function returns only some of the works, either the plays, or the poems, depending on the parameters.

Exceptions
Exceptionif the request fails
Parameters
worksreturn only some of the works. "Plays" for only the plays, "Poems", or "" for all.
Returns
a list of Shakespeare objects.

◆ getShakespeareData() [3/3]

List<Shakespeare> bridges.connect.DataSource.getShakespeareData ( String  works,
Boolean  textOnly 
) throws Exception

This function provides access to a collection of Shakespeare plays, poems and plays.

Each record in this collection has information on title, type (poem, Sonnet, play) and text.

For more information and to look at the data, refer to http://bridgesuncc.github.io/datasets.html

Exceptions
Exceptionif the request fails
Parameters
worksreturn only some of the works. "Plays" for only the plays, "Poems", or "" for all.
textOnlytrue to returns only words, no punctuation.
Returns
a list of Shakespeare objects.

◆ getSong() [1/2]

Song bridges.connect.DataSource.getSong ( String  songTitle) throws Exception

These helper functions provides access to a particular song.

The record has information such as song title, artist, album, year, lyrics, and genre. For more information and to look at the data, refer to

     https://bridgesdata.herokuapp.com/api/datasets/songs

Exceptions
Exceptionif the request fails
Returns
a Song object.

◆ getSong() [2/2]

Song bridges.connect.DataSource.getSong ( String  songTitle,
String  artistName 
) throws Exception

◆ getSongData()

List<Song> bridges.connect.DataSource.getSongData ( ) throws Exception

This helper function provides access to the meta-data of the lyrics collection.

Each record in this collection has information on song title, artist, album, year, lyrics, and genre. For more information and to look at the data, refer to

     https://bridgesdata.herokuapp.com/api/datasets/songs

Exceptions
Exceptionif the request fails
Returns
a list of Song objects.

◆ getWikidataActorMovie()

static ArrayList<ActorMovieWikidata> bridges.connect.DataSource.getWikidataActorMovie ( int  yearBegin,
int  yearEnd 
) throws IOException
static

This function returns the Movie and Actors playing in them between two years from WikiData.

Parameters
yearBegininclusive start year
yearEndinclusive end year
Returns
ArrayList of all ActorMovie pairs in Wikidata between the years provided
Exceptions
IOExceptionIf the response from WikiData is malformed or an issue occurs making the request

The documentation for this class was generated from the following file: