diff --git a/Data Collection/getRawDataMainnet.rmd b/Data Collection/getRawDataMainnet.rmd deleted file mode 100644 index 2d2feb0d..00000000 --- a/Data Collection/getRawDataMainnet.rmd +++ /dev/null @@ -1,518 +0,0 @@ -```{r} -library(ghql) -library(jsonlite) -library(stringr) -library(dplyr) -library(readr) -library(urltools) -``` - - -```{r} -apiURL = 'https://api.thegraph.com/subgraphs/name/aave/protocol-v2' - -con <- GraphqlClient$new(url = apiURL) - -dataPath = "./Data/raw/mainnet/" - -getOldData <- function(fileName){ - tryCatch({ - read.csv(paste(dataPath, fileName, sep="")) - }, - error = function(cond) { - message("Previous data not found.") - }) -} -``` - -# Get (or update) borrows from AAVEv2 Mainnet: -```{r} -## First, let's check for the existence of borrowsAave.csv and see if we need to get all borrows or just the more recent borrows: -borrowsFile <- "rawBorrowsAave.csv" -borrows <- getOldData(borrowsFile) - -lastTimestamp = 0 - -if(!is.null(borrows)){ - lastTimestamp = max(borrows$timestamp) -} - - -repeat{ - qry <- Query$new() - query = str_squish(str_c('query { borrows(first:1000 orderBy: timestamp where: {timestamp_gt:',lastTimestamp,'}){ - id, - timestamp, - amount, - borrowRate, - borrowRateMode, - user{id}, - caller{id}, - reserve{id}, - pool{id} - }}',sep = '')) - - qry$query("borrows", query) - - response <- con$exec(qry$queries$borrows) %>% fromJSON() - - responseData <- response$data$borrows %>% - mutate(userID = response$data$borrows$user$id, - callerID = response$data$borrows$caller$id, - reserveID = response$data$borrows$reserve$id, - poolID = response$data$borrows$pool$id) %>% - select(-user, -caller, -reserve, -pool) %>% - mutate(amount = as.double(amount), - userID = as.double(userID), - callerID = as.double(callerID), - poolID = as.double(poolID), - borrowRate = as.double(borrowRate)) - borrows <- borrows %>% - bind_rows(responseData) - - lastTimestamp = max(response$data$borrows$timestamp) - - if(length(response$data$borrows$id) < 1000){ - break - } -} -borrows <- borrows %>% - distinct() -write_csv(borrows, file = str_c(dataPath, borrowsFile, sep='')) -``` - -# Get (or update) deposits from AAVEv2 Mainnet: -```{r} -depositsFile <- "rawDepositsAave.csv" -deposits <- getOldData(depositsFile) - -lastTimestamp = 0 - -if(!is.null(deposits)){ - lastTimestamp = max(deposits$timestamp) -} - - -repeat{ - qry <- Query$new() - query = str_squish(str_c('query { deposits(first:1000 orderBy: timestamp where: {timestamp_gt:',lastTimestamp,'}){ - id, timestamp, amount, - user{id}, - caller{id}, - reserve{id}, - pool{id} - }}',sep = '')) - - qry$query("deposits", query) - - response <- con$exec(qry$queries$deposits) %>% fromJSON() - - responseData <- response$data$deposits %>% - mutate(userID = response$data$deposits$user$id, - callerID = response$data$deposits$caller$id, - reserveID = response$data$deposits$reserve$id, - poolID = response$data$deposits$pool$id) %>% - select(-user, -caller, -reserve, -pool) %>% - mutate(amount = as.double(amount), - userID = as.double(userID), - callerID = as.double(callerID), - poolID = as.double(poolID)) - - deposits <- deposits %>% - bind_rows(responseData) - - lastTimestamp = max(responseData$timestamp) - - if(length(responseData$id) < 1000){ - break - } - as_datetime(max(responseData$timestamp)) -} - -deposits <- deposits %>% - distinct() - -write_csv(deposits, file = str_c(dataPath, depositsFile, sep='')) -``` - -# Get (or update) collaterals from AAVEv2 Mainnet: -```{r} -collateralsFile <- "rawCollateralsAave.csv" -collaterals <- getOldData(collateralsFile) - -lastTimestamp = 0 - -if(!is.null(collaterals)){ - lastTimestamp = max(collaterals$timestamp) -} - - -repeat{ - qry <- Query$new() - query = str_squish(str_c('query { usageAsCollaterals(first:1000 orderBy: timestamp where: {timestamp_gt:',lastTimestamp,'}){ - id, timestamp, fromState, toState, - user{id}, - reserve{id}, - pool{id} - }}',sep = '')) - - qry$query("collaterals", query) - - response <- con$exec(qry$queries$collaterals) %>% fromJSON() - - responseData <- response$data$usageAsCollaterals %>% - mutate(userID = response$data$usageAsCollaterals$user$id, - reserveID = response$data$usageAsCollaterals$reserve$id, - poolID = response$data$usageAsCollaterals$pool$id) %>% - select(-user, -reserve, -pool) %>% - mutate(userID = as.double(userID), - poolID = as.double(poolID)) - collaterals <- collaterals %>% - bind_rows(responseData) - - lastTimestamp = max(response$data$usageAsCollaterals$timestamp) - as_datetime(lastTimestamp) - - if(length(response$data$usageAsCollaterals$id) < 1000){ - break - } -} - -collaterals <- collaterals %>% - distinct() - -write_csv(collaterals, file = str_c(dataPath, collateralsFile, sep='')) -``` - -# Get (or update) repays from AAVEv2 Mainnet: -```{r} -repaysFile <- "rawRepaysAave.csv" -repays <- getOldData(repaysFile) - -lastTimestamp = 0 - -if(!is.null(repays)){ - lastTimestamp = max(repays$timestamp) -} - - -repeat{ - qry <- Query$new() - query = str_squish(str_c('query { repays(first:1000 orderBy: timestamp where: {timestamp_gt:',lastTimestamp,'}){ - id, timestamp, amount, - user{id}, - repayer{id}, - reserve{id}, - pool{id} - }}',sep = '')) - - qry$query("repays", query) - - response <- con$exec(qry$queries$repays) %>% fromJSON() - - responseData <- response$data$repays %>% - mutate(userID = response$data$repays$user$id, - repayerID = response$data$repays$repayer$id, - reserveID = response$data$repays$reserve$id, - poolID = response$data$repays$pool$id) %>% - select(-user, -repayer, -reserve, -pool) %>% - mutate(amount = as.double(amount), - userID = as.double(userID), - repayerID = as.double(repayerID), - poolID = as.double(poolID)) - - repays <- repays %>% - bind_rows(responseData) - - lastTimestamp = max(response$data$repays$timestamp) - as_datetime(lastTimestamp) - if(length(response$data$repays$id) < 1000){ - break - } -} - -repays <- repays %>% - distinct() - -write_csv(repays, file = str_c(dataPath, repaysFile, sep='')) -``` -# Get (or update) redeems from AAVEv2 Mainnet -```{r} -redeemsFile <- "rawRedeemsAave.csv" -redeems <- getOldData(redeemsFile) - -lastTimestamp = 0 - -if(!is.null(redeems)){ - lastTimestamp = max(redeems$timestamp) -} - - -repeat{ - qry <- Query$new() - query = str_squish(str_c('query { redeemUnderlyings(first:1000 orderBy: timestamp where: {timestamp_gt:',lastTimestamp,'}){ - id, timestamp, amount, - user{id}, - to{id}, - reserve{id}, - pool{id} - }}',sep = '')) - - qry$query("redeems", query) - - response <- con$exec(qry$queries$redeems) %>% fromJSON() - - responseData <- response$data$redeemUnderlyings %>% - mutate(userID = response$data$redeemUnderlyings$user$id, - toID = response$data$redeemUnderlyings$to$id, - reserveID = response$data$redeemUnderlyings$reserve$id, - poolID = response$data$redeemUnderlyings$pool$id) %>% - select(-user, -to, -reserve, -pool) %>% - mutate(userID = as.double(userID), - toID = as.double(toID), - poolID = as.double(poolID), - amount = as.double(amount)) - - redeems <- redeems %>% - bind_rows(responseData) - - lastTimestamp = max(responseData$timestamp) - - as_datetime(lastTimestamp) - - if(length(response$data$redeemUnderlyings$id) < 1000){ - break - } -} - -redeems <- redeems %>% - distinct() - - -write_csv(redeems, file = str_c(dataPath, redeemsFile, sep='')) -``` - -# Get (or update) swaps from AAVEv2 Mainnet -```{r} -swapsFile <- "rawSwapsAave.csv" -swaps <- getOldData(swapsFile) - -lastTimestamp = 0 - -if(!is.null(swaps)){ - lastTimestamp = max(swaps$timestamp) -} - - -repeat{ - qry <- Query$new() - query = str_squish(str_c('query { swaps(first:1000 orderBy: timestamp where: {timestamp_gt:',lastTimestamp,'}){ - id, timestamp, borrowRateModeFrom, borrowRateModeTo, stableBorrowRate, variableBorrowRate, - user{id}, - reserve{id}, - pool{id} - }}',sep = '')) - - qry$query("swaps", query) - - response <- con$exec(qry$queries$swaps) %>% fromJSON() - - responseData <- response$data$swaps %>% - mutate(userID = response$data$swaps$user$id, - reserveID = response$data$swaps$reserve$id, - poolID = response$data$swaps$pool$id) %>% - select(-user, -reserve, -pool) %>% - mutate(userID = as.double(userID), - poolID = as.double(poolID), - stableBorrowRate = as.double(stableBorrowRate), - variableBorrowRate = as.double(variableBorrowRate)) - swaps <- swaps %>% - bind_rows(responseData) - - lastTimestamp = max(response$data$swaps$timestamp) - - if(length(response$data$swaps$id) < 1000){ - break - } -} - -swaps <- swaps %>% - distinct() - -write_csv(swaps, file = str_c(dataPath, swapsFile, sep='')) -``` - - -# Get (or update) liquidations from AAVEv2 Mainnet -```{r} -liquidationsFile <- "rawLiquidationsAave.csv" -liquidations <- getOldData(liquidationsFile) - -lastTimestamp = 0 - -if(!is.null(liquidations)){ - lastTimestamp = max(liquidations$timestamp) -} - - -repeat{ - qry <- Query$new() - query = str_squish(str_c('query { liquidationCalls(first:1000 orderBy: timestamp where: {timestamp_gt:',lastTimestamp,'}){ - id, timestamp, principalAmount, collateralAmount, - user{id}, - liquidator, - principalReserve{id}, - collateralReserve{id}, - pool{id} - }}',sep = '')) - - qry$query("liquidations", query) - - response <- con$exec(qry$queries$liquidations) %>% fromJSON() - - responseData <- response$data$liquidationCalls %>% - mutate(userID = response$data$liquidationCalls$user$id, - liquidatorID = response$data$liquidationCalls$liquidator, - principalReserveID = response$data$liquidationCalls$principalReserve$id, - collateralReserveID = response$data$liquidationCalls$collateralReserve$id, - poolID = response$data$liquidationCalls$pool$id) %>% - select(-user, -liquidator, -principalReserve, -collateralReserve, -pool) %>% - mutate(principalAmount = as.double(principalAmount), - collateralAmount = as.double(collateralAmount), - userID = as.double(userID), - liquidatorID = as.double(liquidatorID), - poolID = as.double(poolID)) - - liquidations <- liquidations %>% - bind_rows(responseData) - - lastTimestamp = max(responseData$timestamp) - - if(length(response$data$liquidationCalls$id) < 1000){ - break - } -} - -liquidations <- liquidations %>% - distinct() - -write_csv(liquidations, file = str_c(dataPath, liquidationsFile, sep='')) -``` - -# Get (or update) reserveParamsHistory from AAVEv2 Mainnet: -```{r} -reserveParamsHistoryFile <- "rawReserveParamsHistoryAave.csv" -reserveParamsHistory <- getOldData(reserveParamsHistoryFile) - -lastTimestamp = 0 - -if(!is.null(reserveParamsHistory)){ - lastTimestamp = max(reserveParamsHistory$timestamp) -} - - -repeat{ - qry <- Query$new() - query = str_squish(str_c('query { reserveParamsHistoryItems(first:1000 orderBy: timestamp where: {timestamp_gt:',lastTimestamp,'}){ - id, - reserve{id}, - timestamp, - priceInUsd, - priceInEth, - liquidityIndex, - totalLiquidity, - liquidityRate, - availableLiquidity, - utilizationRate, - totalLiquidityAsCollateral, - stableBorrowRate, - averageStableBorrowRate, - variableBorrowRate, - totalScaledVariableDebt, - totalCurrentVariableDebt, - totalPrincipalStableDebt - }}',sep = '')) - - qry$query("reserveParamsHistory", query) - - response <- con$exec(qry$queries$reserveParamsHistory) %>% fromJSON() - - responseData <- response$data$reserveParamsHistoryItems %>% - mutate(reserveID = response$data$reserveParamsHistoryItems$reserve$id) %>% - select(-reserve) %>% - mutate(priceInUsd = as.double(priceInUsd), - priceInEth = as.double(priceInEth), - liquidityIndex = as.double(liquidityIndex), - totalLiquidity = as.double(totalLiquidity), - liquidityRate = as.double(liquidityRate), - availableLiquidity = as.double(availableLiquidity), - utilizationRate = as.double(utilizationRate), - totalLiquidityAsCollateral = as.double(totalLiquidityAsCollateral), - stableBorrowRate = as.double(stableBorrowRate), - averageStableBorrowRate = as.double(averageStableBorrowRate), - variableBorrowRate = as.double(variableBorrowRate), - totalScaledVariableDebt = as.double(totalScaledVariableDebt), - totalCurrentVariableDebt = as.double(totalCurrentVariableDebt), totalPrincipalStableDebt = as.double(totalPrincipalStableDebt)) - - reserveParamsHistory <- reserveParamsHistory %>% - bind_rows(responseData) - - lastTimestamp = max(response$data$reserveParamsHistoryItems$timestamp) - - if(length(response$data$reserveParamsHistoryItems$id) < 1000){ - break - } -} - -reserveParamsHistory <- reserveParamsHistory %>% - distinct() - -write_csv(reserveParamsHistory, file = str_c(dataPath, reserveParamsHistoryFile, sep='')) - -``` - -# Get reserveInfo from AAVEv2 Mainnet: -```{r} -reserveInfoFile <- "rawReserveInfoAave.csv" -reserveInfo <- NULL - -repeat{ - qry <- Query$new() - query = str_squish(str_c('query { reserves(first:1000){ - id, symbol, name, decimals, - usageAsCollateralEnabled, - borrowingEnabled, - stableBorrowRateEnabled, - isActive, - isFrozen, - reserveInterestRateStrategy, - optimalUtilisationRate, - variableRateSlope1, - variableRateSlope2, - stableRateSlope1, - stableRateSlope2, - baseVariableBorrowRate, - baseLTVasCollateral, - reserveLiquidationThreshold, - reserveLiquidationBonus, - pool{id} - }}',sep = '')) - - qry$query("reserveInfo", query) - - response <- con$exec(qry$queries$reserveInfo) %>% fromJSON() - reserveInfo <- reserveInfo %>% - bind_rows(response$data$reserves) %>% - distinct() - - if(length(response$data$reserves$id) < 1000){ - break - } -} - -reserveInfo <- reserveInfo %>% - mutate(poolID = reserveInfo$pool$id) %>% - select(-pool) - -write_csv(reserveInfo, file = str_c(dataPath, reserveInfoFile, sep='')) -``` \ No newline at end of file diff --git a/Data Collection/processRawDataMainnet.Rmd b/Data Collection/processRawDataMainnet.Rmd deleted file mode 100644 index a17dd5f3..00000000 --- a/Data Collection/processRawDataMainnet.Rmd +++ /dev/null @@ -1,229 +0,0 @@ -# Load relevant libraries -```{r} -library(readr) -library(tidyr) -library(dplyr) -library(lubridate) -library(randomNames) -``` - -# Load raw dataframes -```{r} -dataPath = "./Data/mainnet/" -rawDataPath = "./Data/raw/mainnet/" -borrowsFile = "rawBorrowsAave.csv" -collateralsFile = "rawCollateralsAave.csv" -depositsFile = "rawDepositsAave.csv" -liquidationsFile = "rawLiquidationsAave.csv" -redeemsFile = "rawRedeemsAave.csv" -repaysFile = "rawRepaysAave.csv" -reserveInfoFile = "rawReserveInfoAave.csv" -reserveParamsHistoryFile = "rawReserveParamsHistoryAave.csv" -swapsFile = "rawSwapsAave.csv" - -rawBorrows <- read_csv(paste(rawDataPath, borrowsFile, sep="")) -rawCollaterals <- read_csv(paste(rawDataPath, collateralsFile, sep = "")) -rawDeposits <- read_csv(paste(rawDataPath, depositsFile, sep="")) -rawLiquidations <- read_csv(paste(rawDataPath, liquidationsFile, sep="")) -rawRedeems <- read_csv(paste(rawDataPath, redeemsFile, sep="")) -rawRepays <- read_csv(paste(rawDataPath, repaysFile, sep="")) -rawReserveInfo <- read_csv(paste(rawDataPath, reserveInfoFile, sep="")) -rawReserveParamsHistory <- read_csv(paste(rawDataPath, reserveParamsHistoryFile, sep="")) -rawSwaps <- read_csv(paste(rawDataPath, swapsFile, sep = "")) - - -## Helper functions -not_all_na <- function(x) any(!is.na(x)) -`%notin%` <- Negate(`%in%`) -``` - -# Update reserveParamsHistory with the symbol for each reserve: -```{r} -reserveInfo <- rawReserveInfo %>% - rename(reserveID = id) -reserveParamsHistory <- rawReserveParamsHistory %>% - left_join(reserveInfo, by = "reserveID") - -transactionReserveSymbolsAndPrices <- reserveParamsHistory %>% - select(timestamp, reserveID, symbol, priceInUsd, priceInEth, decimals) -``` - -# Clean and combine transaction types into one large dataframe: -```{r} -borrows <- rawBorrows %>% - mutate(type = "borrow") %>% - left_join(transactionReserveSymbolsAndPrices, by = c("timestamp","reserveID")) %>% - mutate(amount = amount / (10^decimals)) %>% - mutate(amountUSD = amount * priceInUsd) %>% - mutate(priceInEth = priceInEth / (10^decimals)) %>% - mutate(amountETH = amount * priceInEth) %>% - mutate(reserve = symbol) %>% - mutate(user = userID) %>% - mutate(onBehalfOf = callerID) %>% - mutate(borrowRate = borrowRate / (10^25)) %>% - mutate(pool = poolID) %>% - select(type, timestamp, user, onBehalfOf, pool, reserve, amount, amountUSD, amountETH, borrowRate, borrowRateMode) %>% - drop_na() %>% - distinct() - -collaterals <- rawCollaterals %>% - mutate(type = "collateral") %>% - mutate(user = userID, pool = poolID) %>% - left_join(transactionReserveSymbolsAndPrices, by = c("timestamp", "reserveID")) %>% - mutate(reserve = symbol) %>% - select(timestamp, user, pool, reserve, fromState, toState, type) %>% - drop_na() %>% - distinct() - -deposits <- rawDeposits %>% - mutate(type = "deposit") %>% - mutate(user = userID, pool = poolID) %>% - left_join(transactionReserveSymbolsAndPrices, by = c("timestamp", "reserveID")) %>% - mutate(reserve = symbol) %>% - mutate(onBehalfOf = callerID) %>% - mutate(amount = amount / (10^decimals)) %>% - mutate(amountUSD = amount * priceInUsd) %>% - mutate(priceInEth = priceInEth / (10^decimals)) %>% - mutate(amountETH = amount * priceInEth) %>% - select(timestamp, type, amount, amountUSD, amountETH, reserve, user, onBehalfOf, pool) %>% - drop_na() %>% - distinct() - -liquidationReserveInfo <- transactionReserveSymbolsAndPrices %>% - rename(principalReserveID = reserveID) %>% - rename(principalReserve = symbol) %>% - rename(principalPriceUSD = priceInUsd, principalDecimals = decimals) %>% - rename(principalPriceETH = priceInEth) %>% - mutate(principalPriceETH = principalPriceETH / (10^principalDecimals)) %>% - left_join(transactionReserveSymbolsAndPrices, by = c("timestamp")) %>% - rename(collateralReserveID = reserveID) %>% - rename(collateralReserve = symbol) %>% - rename(collateralPriceUSD = priceInUsd, collateralDecimals = decimals) %>% - rename(collateralPriceETH = priceInEth) %>% - mutate(collateralPriceETH = collateralPriceETH / (10^collateralDecimals)) - - -liquidations <- rawLiquidations %>% - mutate(type = "liquidation") %>% - select(-liquidator) %>% - rename(user = userID, pool = poolID, liquidator = liquidatorID) %>% - left_join(liquidationReserveInfo, by = c("timestamp", "principalReserveID", "collateralReserveID")) %>% - distinct() %>% - group_by(id) %>% - slice_head() %>% - ungroup() %>% - mutate(principalAmount = principalAmount / (10^principalDecimals), - collateralAmount = collateralAmount / (10^collateralDecimals)) %>% - mutate(amountUSDPrincipal = principalAmount * principalPriceUSD, - amountUSDCollateral = collateralAmount * collateralPriceUSD) %>% - mutate(amountETHPrincipal = principalAmount * principalPriceETH, - amountETHCollateral = collateralAmount * collateralPriceETH) %>% - select(id, timestamp, type, user, liquidator, pool, principalReserve, amountUSDPrincipal, amountETHPrincipal, principalAmount, collateralReserve, amountUSDCollateral, amountETHCollateral, collateralAmount) %>% - drop_na() %>% - distinct() - -redeems <- rawRedeems %>% - mutate(type = "redeem") %>% - mutate(user = userID, pool = poolID) %>% - left_join(transactionReserveSymbolsAndPrices, by = c("timestamp", "reserveID")) %>% - mutate(reserve = symbol) %>% - mutate(onBehalfOf = toID) %>% - mutate(amount = amount / (10^decimals)) %>% - mutate(amountUSD = amount * priceInUsd) %>% - mutate(priceInEth = priceInEth / (10^decimals)) %>% - mutate(amountETH = amount * priceInEth) %>% - select(timestamp, type, amount, amountUSD, amountETH, reserve, user, onBehalfOf, priceInUsd, pool) %>% - drop_na() %>% - distinct() - -repays <- rawRepays %>% - mutate(type = "repay")%>% - mutate(user = userID, pool = poolID) %>% - left_join(transactionReserveSymbolsAndPrices, by = c("timestamp", "reserveID")) %>% - mutate(reserve = symbol) %>% - mutate(onBehalfOf = repayerID) %>% - mutate(amount = amount / (10^decimals)) %>% - mutate(amountUSD = amount * priceInUsd) %>% - mutate(priceInEth = priceInEth / (10^decimals)) %>% - mutate(amountETH = amount * priceInEth) %>% - select(timestamp, type, amount, amountUSD, amountETH, reserve, user, onBehalfOf, priceInUsd, pool) %>% - drop_na() %>% - distinct() - -swaps <- rawSwaps %>% - mutate(type = "swap") %>% - mutate(user = userID, pool = poolID) %>% - mutate(stableBorrowRate = stableBorrowRate / (10^25), variableBorrowRate = variableBorrowRate / (10^25)) %>% - left_join(transactionReserveSymbolsAndPrices, by = c("timestamp","reserveID")) %>% - mutate(reserve = symbol) %>% - select(timestamp, type, reserve, user, pool, borrowRateModeTo, borrowRateModeFrom, stableBorrowRate, variableBorrowRate) %>% - drop_na() %>% - distinct() - -cleanedTransactions <- borrows %>% - bind_rows(collaterals) %>% - bind_rows(deposits) %>% - bind_rows(liquidations) %>% - bind_rows(redeems) %>% - bind_rows(repays) %>% - bind_rows(swaps) -``` - -# Add user aliases to the transaction data: -```{r} -uniqueUsers <- cleanedTransactions %>% - select(user) - -uniqueOnBehalfOfs <- cleanedTransactions %>% - select(onBehalfOf) %>% - mutate(user = onBehalfOf) %>% - select(user) - -uniqueLiquidators <- cleanedTransactions %>% - select(liquidator) %>% - mutate(user = liquidator) %>% - select(user) - -uniqueUsers <- uniqueUsers %>% - bind_rows(uniqueOnBehalfOfs) %>% - bind_rows(uniqueLiquidators) %>% - distinct() - -uniqueUsers <- na.omit(uniqueUsers) - -aliases = NULL -set.seed(69420) # Dank seeding -while(length(aliases[,1]) < length(uniqueUsers$user)){ - alias <- randomNames(1000, name.order = "first.last", name.sep = " ", sample.with.replacement = FALSE) - aliases <- aliases %>% - bind_rows(data.frame(alias)) %>% - distinct() -} - -aliases <- aliases %>% - head(length(uniqueUsers$user)) - -userAliases <- bind_cols(uniqueUsers, aliases) - -aliasedTransactions <- cleanedTransactions %>% - left_join(userAliases, by = "user") %>% - rename(userAlias = alias) %>% - left_join(userAliases, by = c("onBehalfOf" = "user")) %>% - rename(onBehalfOfAlias = alias) %>% - left_join(userAliases, by = c("liquidator" = "user")) %>% - rename(liquidatorAlias = alias) -``` - -# Label each coin as stable or non-stable: -```{r} -stableCoins = c('TUSD','RAI','GUSD','BUSD','SUSD','DAI','FRAX','PAX','FEI','USDC','AMPL','USDT','AmmDAI','AmmUSDC','AmmUSDT') -reserveInfoWithStability <- reserveInfo %>% - mutate(stable = (symbol %in% stableCoins)) -``` - -# Write processed transaction data to csv: -```{r} -write_csv(aliasedTransactions, paste(dataPath, "transactions.csv", sep="")) -write_csv(reserveInfoWithStability, paste(dataPath, "reserveInfo.csv", sep="")) -write_csv(reserveParamsHistory, paste(dataPath, "reserveParamsHistory.csv", sep="")) -``` diff --git a/DeFi Dashboard (R Shiny)/Toolkit/DeFi_Toolkit/Toolkit b/DeFi Dashboard (R Shiny)/Toolkit/DeFi_Toolkit/Toolkit deleted file mode 120000 index dda30dd2..00000000 --- a/DeFi Dashboard (R Shiny)/Toolkit/DeFi_Toolkit/Toolkit +++ /dev/null @@ -1 +0,0 @@ -/home/giannm/DeFi_Summer_2022/DeFi_Dashboard/Toolkit \ No newline at end of file diff --git a/DeFi Dashboard (R Shiny)/Toolkit/DeFi_Toolkit/app.R b/DeFi Dashboard (R Shiny)/Toolkit/DeFi_Toolkit/app.R deleted file mode 100644 index 31063e50..00000000 --- a/DeFi Dashboard (R Shiny)/Toolkit/DeFi_Toolkit/app.R +++ /dev/null @@ -1,1010 +0,0 @@ -# -# This is a Shiny web application. You can run the application by clicking -# the 'Run App' button above. -# -# Find out more about building applications with Shiny here: -# -# http://shiny.rstudio.com/ -# - -library(shiny) - -# Set the default CRAN repository -local({r <- getOption("repos") -r["CRAN"] <- "http://cran.r-project.org" -options(repos=r) -}) - -# Load required packages; install if necessary -# CAUTION: DO NOT interrupt R as it installs packages!! -if (!require("ggplot2")) { - install.packages("ggplot2") - library(ggplot2) -} -if (!require("knitr")) { - install.packages("knitr") - library(knitr) -} -if (!require("dplyr")) { - install.packages("dplyr") - library(dplyr) -} -if (!require("xts")) { - install.packages("xts") - library(xts) -} -if(!require("lubridate")) { - install.packages("lubridate") - library(lubridate) -} -if(!require("survival")) { - install.packages("survival") - library(survival) -} -if(!require("ranger")){ - install.packages("ranger") - library(ranger) -} -if(!require("ggfortify")){ - install.packages("ggfortify") - library(ggfortify) -} -if(!require("dygraphs")){ - install.packages("dygraphs") - library(dygraphs) -} -if (!require("tidyverse")) { - install.packages("tidyverse") - library(tidyverse) -} -# if (!require("rsconnect")) { -# install.packages("rsconnect") -# library(rsconnect) -# } -if (!require("bslib")) { - install.packages("bslib") - library(bslib) -} -if (!require("DT")) { - install.packages("DT") - library(DT) -} -if (!require("survminer")) { - install.packages("survminer") - library(survminer) -} - - - -# Prepare Transaction Data -dataPath = "/data/IDEA_DeFi_Summer2022/" # This is the path to the main data directory. Further subdirectories will be specified to get the desired data -aavePath = "Aave/" # This is the folder to the directory storing AAVE data -mainnetPath = "mainnet/" # This is the folder to the directory storing the data from the AAVEv2 mainnet - -# These are the generic names for the files with the associated information for all AAVE deployments: -transactionFileName = "transactions.csv" -reserveParamsFileName = "reserveParamsHistory.csv" - -# Load the mainnet data: -transactions <- read_csv(paste(dataPath, aavePath, mainnetPath, transactionFileName, sep="")) -reserveParamsHistory <- read_csv(paste(dataPath, aavePath, mainnetPath, reserveParamsFileName, sep="")) - -# For consistency's sake, because we currently have to manually update the datasets and therefore there's no guarantee that they run to the same date, -# let's choose a cutoff date that remove data past that point: -cutoffDate = "2022-07-10 00:00:00 UTC" -transactions <- transactions %>% - mutate(datetime = as_datetime(timestamp)) %>% - filter(datetime <= cutoffDate) -transactions$date <- as.Date(as.POSIXct(transactions$datetime, origin = "1970-01-01")) - -reserveTypes <- transactions %>% - distinct(reserve) %>% - select(reserve) - -transactionTypes <- transactions %>% - distinct(type) %>% - select(type) - -minDate <- transactions %>% - slice_min(timestamp) %>% - distinct(timestamp) %>% - select(timestamp) %>% - transmute(time = as_datetime(timestamp)) - -maxDate <- transactions %>% - slice_max(timestamp) %>% - distinct(timestamp) %>% - select(timestamp) %>% - transmute(time = as_datetime(timestamp)) - -# load interest rates data in dataframe -rates <- reserveParamsHistory %>% - select(timestamp, symbol, liquidityRate, stableBorrowRate, variableBorrowRate) %>% - dplyr::rename(reserve = symbol) - -# create column in rates with date -rates <- rates[order(rates$timestamp),] -rates$date <- as.Date(as.POSIXct(rates$timestamp, origin = "1970-01-01")) - - -# Define UI for application that draws a histogram -ui <- function(request) { - fluidPage(theme = bs_theme(version = version_default(), bootswatch = "pulse"), - tabsetPanel( - navbarMenu("Transaction Data Visualizer", - tabPanel("First Viewer Pane", - # Application title - titlePanel("AAVE Transactions Data Visualizer"), - - # Sidebar with a number of input checkboxes, date range, radio buttons, etc. - sidebarLayout( - sidebarPanel( - dateRangeInput("dateRange", - "Filter by date range:", - start = floor_date(minDate$time, unit = "day"), - end = ceiling_date(maxDate$time, unit = "day")), - dateInput("dateSelect", - "Place Reference Line for Date:", - min = floor_date(minDate$time, unit = "day"), - max = ceiling_date(maxDate$time, unit = "day")), - checkboxInput("crash1", - "View market crashes?"), - radioButtons("bins", - "Group By:", - choices = c("day", "week", "month", "quarter"), - selected = "week", - inline=TRUE), - radioButtons('stats', - "Daily summary statistics on:", - choices = c('Hover', 'Click'), - selected = 'Hover', - inline = TRUE), - selectInput("reserve", - "Reserve Name:", - choices = reserveTypes$reserve, - multiple = TRUE), - checkboxInput("amm", - "Drop Amm coins?"), - radioButtons("reserveGroups", - "Reserve Grouping:", - choices = c("Separate", "Grouped"), - selected = "Grouped", - inline = TRUE), - selectInput("transactionType", - "Transaction Type(s):", - choices = transactionTypes$type, - multiple = TRUE), - radioButtons("transactionGroups", - "Transaction Grouping:", - choices = c("Separate", "Grouped"), - selected = "Grouped", - inline = "TRUE"), - radioButtons("scaleBy", - "Scale By: ", - choices = c("Transaction Count", "Cumulative Transaction Value (USD)", "Cumulative Transaction Value (ETH)", "Native Coin Transaction Count"), - selected = "Transaction Count"), - bookmarkButton(label = 'Create URL'), - actionButton('click', 'View Graph(s)') - ), - - #mainpanel within has plots/summary if selected - mainPanel( - plotOutput("reservePlot", click = clickOpts(id='plotClick'), - hover = hoverOpts(id='plotHover', clip = TRUE)), - verbatimTextOutput('dailySummaryHover'), - verbatimTextOutput('dailySummaryClick') - ) - ) # end of sidebarLayout - ), # end of tabPanel - - tabPanel("Second Viewer Pane", - # Application title - titlePanel("AAVE Transactions Data Visualizer"), - - # Sidebar with a number of input checkboxes, date range, radio buttons, etc. - sidebarLayout( - sidebarPanel( - dateRangeInput("dateRange2", - "Filter by date range:", - start = floor_date(minDate$time, unit = "day"), - end = ceiling_date(maxDate$time, unit = "day")), - dateInput("dateSelect2", - "Place Reference Line for Date:", - min = floor_date(minDate$time, unit = "day"), - max = ceiling_date(maxDate$time, unit = "day")), - checkboxInput("crash12", - "View market crashes?"), - radioButtons("bins2", - "Group By:", - choices = c("day", "week", "month", "quarter"), - selected = "week", - inline=TRUE), - radioButtons('stats2', - "Daily summary statistics on:", - choices = c('Hover', 'Click'), - selected = 'Hover', - inline = TRUE), - selectInput("reserve2", - "Reserve Name:", - choices = reserveTypes$reserve, - multiple = TRUE), - checkboxInput("amm2", - "Drop Amm coins?"), - radioButtons("reserveGroups2", - "Reserve Grouping:", - choices = c("Separate", "Grouped"), - selected = "Grouped", - inline = TRUE), - selectInput("transactionType2", - "Transaction Type(s):", - choices = transactionTypes$type, - multiple = TRUE), - radioButtons("transactionGroups2", - "Transaction Grouping:", - choices = c("Separate", "Grouped"), - selected = "Grouped", - inline = "TRUE"), - radioButtons("scaleBy2", - "Scale By: ", - choices = c("Transaction Count", "Cumulative Transaction Value (USD)", "Cumulative Transaction Value (ETH)", "Native Coin Transaction Count"), - selected = "Transaction Count"), - bookmarkButton(label = 'Create URL'), - actionButton('clickR', 'View Graph(s)') - ), - - #main panel within has plots/summary if selected - mainPanel( - plotOutput("reservePlot2", click = clickOpts(id='plotClick2'), - hover = hoverOpts(id='plotHover2', clip = TRUE)), - verbatimTextOutput('dailySummaryHover2'), - verbatimTextOutput('dailySummaryClick2') - ) - ) # end of sidebarLayout - ), # end of tabPanel - - tabPanel("Side-by-Side View", - tabPanel("Side-by-Side View", - # Application title - titlePanel("Side-by-Side View"), - - #output plots - fluidRow( - column(width=6, - plotOutput("reservePlotS", click = clickOpts(id='plotClick'), - hover = hoverOpts(id='plotHover', clip = TRUE)) - ), - column(width=6, - plotOutput("reservePlot2S", click = clickOpts(id='plotClick2'), - hover = hoverOpts(id='plotHover2', clip = TRUE)) - ), - - ), - fluidRow( - column(width=6, - verbatimTextOutput('dailySummaryHoverS') - ), - column(width=6, - verbatimTextOutput('dailySummary2HoverS') - ) - ), - fluidRow( - column(width=6, - verbatimTextOutput('dailySummaryClickS') - ), - column(width=6, - verbatimTextOutput('dailySummary2ClickS') - ) - ) - ) # end of sidebarLayout - ), # end of tabPanel - ), #end of navbar page - tabPanel("Coins", - tabPanel("Transactions", - # Application title - titlePanel("Coin Analysis"), - - # Sidebar with a number of inputs - sidebarLayout( - sidebarPanel( - selectInput("coin", - "Reserve Name:", - choices = reserveTypes$reserve, - multiple = FALSE), - dateRangeInput("coinDateRange", - "Filter by date range:", - start = floor_date(minDate$time, unit = "day"), - end = ceiling_date(maxDate$time, unit = "day")), - checkboxInput("crash2", - "View market crashes?"), - actionButton('click2', 'View Graph') - ), - #output plots of coin graphs/tables - mainPanel( - dygraphOutput("ratesPlot"), - tableOutput("ratesTable"), - dygraphOutput("borrowRepayPlot"), - dygraphOutput("depositRedeemPlot") - ) - ) # end of sidebarLayout - ) - ), - #construction in near future - tabPanel("Survival Analysis", - sidebarLayout( - sidebarPanel( - selectInput("indexEvent", - "Index Event:", - choices = c('Borrow', 'Deposit', 'Repay', 'Redeem'), - multiple = FALSE), - uiOutput("survUI"), - checkboxInput("split", "Split by Category?"), - uiOutput("survCategoryUI"), - checkboxInput('median', 'View Median Lines'), - actionButton('click3', 'View Graph') - ), - - mainPanel( - plotOutput("survivalPlot") - ) - ) - ), - tabPanel("Live AAVE Transactions", - # Application title - titlePanel("Live AAVE Transactions"), - fluidRow( - column(width=6, style = 'padding-bottom:25px', DTOutput("recentDeposits")), - column(width=6, style = 'padding-bottom:25px', DTOutput("recentRepays")), - ), - fluidRow( - column(width=6, style = 'padding-bottom:25px', DTOutput("recentRedeems")), - column(width=6, style = 'padding-bottom:25px', DTOutput("recentBorrows")), - ), - fluidRow( - column(width=12, DTOutput("recentLiquidations")), - ), - ) - ) # end of tabsetPanel - ) # end of fluid_page -} - -# Define server logic required to draw a histogram -server <- function(input, output) { - - # store global reactive dataframe - myData <- reactive({ - # Set up the x-axis bounds based on the time range and time intervals - # selected by the user, and filter the transactions by these dates. - timeInterval <- interval(input$dateRange[1], input$dateRange[2]) - dateFilteredTransactions <- transactions %>% - filter(datetime %within% timeInterval) %>% - mutate(roundedTime = round_date(datetime, unit=input$bins)) - - # Filter the transactions by the selected reserve types. If no reserve types are selected, - # select all reserves. - ifelse(length(input$reserve) == 0, filteredReserves <- reserveTypes$reserve, filteredReserves <- input$reserve) - reserveFilteredTransactions <- dateFilteredTransactions %>% - filter(reserve %in% filteredReserves) - - # Filter the transactions by the selected transaction types. If no types - # are selected, select all transaction types. - ifelse(length(input$transactionType) == 0, filteredTransactionTypes <- transactionTypes$type, filteredTransactionTypes <- input$transactionType) - typeFilteredTransactions <- reserveFilteredTransactions %>% - filter(type %in% filteredTransactionTypes) - - # Setup the yScale column according to the chosen scale, and set up the - # proper prefix for the y-axis label - if(input$scaleBy == "Transaction Count"){ - filteredTransactions <- typeFilteredTransactions %>% - group_by(reserve, roundedTime) %>% - count(type) %>% - mutate(yScale = n) - }else if(input$scaleBy == "Cumulative Transaction Value (USD)"){ - filteredTransactions <- typeFilteredTransactions %>% - group_by(reserve, roundedTime) %>% - mutate(yScale = cumsum(amountUSD)/1e6) - }else if(input$scaleBy == "Cumulative Transaction Value (ETH)"){ - filteredTransactions <- typeFilteredTransactions %>% - group_by(reserve, roundedTime) %>% - mutate(yScale = cumsum(amountETH)) - } - else if(input$scaleBy == "Native Coin Transaction Count"){ - filteredTransactions <- typeFilteredTransactions %>% - group_by(reserve, roundedTime) %>% - mutate(yScale = cumsum(amount)) - } - - #remove amm coins if chosen - if(input$amm == TRUE) { - filteredTransactions <- filteredTransactions %>% - filter(substr(reserve, 1, 3)!= 'Amm') - } - - filteredTransactions - }) - - # store global reactive dataframe - myData2 <- reactive({ - # Set up the x-axis bounds based on the time range and time intervals - # selected by the user, and filter the transactions by these dates. - timeInterval <- interval(input$dateRange2[1], input$dateRange2[2]) - dateFilteredTransactions <- transactions %>% - filter(datetime %within% timeInterval) %>% - mutate(roundedTime = round_date(datetime, unit=input$bins2)) - - # Filter the transactions by the selected reserve types. If no reserve types are selected, - # select all reserves. - ifelse(length(input$reserve2) == 0, filteredReserves <- reserveTypes$reserve, filteredReserves <- input$reserve2) - reserveFilteredTransactions <- dateFilteredTransactions %>% - filter(reserve %in% filteredReserves) - - # Filter the transactions by the selected transaction types. If no types - # are selected, select all transaction types. - ifelse(length(input$transactionType2) == 0, filteredTransactionTypes <- transactionTypes$type, filteredTransactionTypes <- input$transactionType2) - typeFilteredTransactions <- reserveFilteredTransactions %>% - filter(type %in% filteredTransactionTypes) - - # Setup the yScale column according to the chosen scale, and set up the - # proper prefix for the y-axis label - if(input$scaleBy2 == "Transaction Count"){ - filteredTransactions <- typeFilteredTransactions %>% - group_by(reserve, roundedTime) %>% - count(type) %>% - mutate(yScale = n) - }else if(input$scaleBy2 == "Cumulative Transaction Value (USD)"){ - filteredTransactions <- typeFilteredTransactions %>% - group_by(reserve, roundedTime) %>% - mutate(yScale = cumsum(amountUSD)/1e6) - }else if(input$scaleBy2 == "Cumulative Transaction Value (ETH)"){ - filteredTransactions <- typeFilteredTransactions %>% - group_by(reserve, roundedTime) %>% - mutate(yScale = cumsum(amountETH)) - } - else if(input$scaleBy2 == "Native Coin Transaction Count"){ - filteredTransactions <- typeFilteredTransactions %>% - group_by(reserve, roundedTime) %>% - mutate(yScale = cumsum(amount)) - } - - #remove amm coins if chosen - if(input$amm2 == TRUE) { - filteredTransactions <- filteredTransactions %>% - filter(substr(reserve, 1, 3)!= 'Amm') - } - - filteredTransactions - }) - - - # main output plot of the dashboard - output$reservePlot <- output$reservePlotS <- renderPlot({ - req(input$click) - isolate({ - filteredTransactions <- myData() - req(length(filteredTransactions$reserve)!=0) # make sure the subset of data isn't blank - isolate({ - # Setup the yScale column according to the chosen scale, and set up the - # proper prefix for the y-axis label - if(input$scaleBy == "Transaction Count"){ - yLabPrefix <- "Number of " - }else if(input$scaleBy == "Cumulative Transaction Value (USD)"){ - yLabPrefix <- "USD Value (in millions) of " - }else if(input$scaleBy == "Cumulative Transaction Value (ETH)"){ - yLabPrefix <- "ETH Value of " - } - else if(input$scaleBy == "Native Coin Transaction Count"){ - yLabPrefix <- "Native Coin Transaction Count of " - } - - ifelse(length(input$reserve) == 0, filteredReserves <- reserveTypes$reserve, filteredReserves <- input$reserve) - ifelse(length(input$transactionType) == 0, filteredTransactionTypes <- transactionTypes$type, filteredTransactionTypes <- input$transactionType) - - ifelse(length(filteredReserves) > 3, reserveString <- "Selected Reserves ", reserveString <- paste(filteredReserves, collapse=', ')) - ifelse(length(filteredTransactionTypes) > 3, typeString <- "Transactions ", typeString <- str_c(paste(filteredTransactionTypes, collapse='s, '), "s ", sep='')) - ifelse(input$reserveGroups=="Separate", plotAES <- aes(filteredTransactions$roundedTime, filteredTransactions$yScale, fill=filteredTransactions$reserve), - plotAES <- aes(filteredTransactions$roundedTime, filteredTransactions$yScale)) - title <- str_c(yLabPrefix, typeString, "for ", reserveString, sep='') - - plot <- ggplot(filteredTransactions, plotAES) + geom_col() + - xlab(str_to_title(input$bins)) + - ylab(str_c(yLabPrefix, typeString, sep=""))+ - ggtitle(title) - - #market crash functionality - if(input$crash1==TRUE){ - plot <- plot + geom_vline(xintercept = as.POSIXct(as.Date(c("2022-05-12 00:00:00 UTC", "2021-05-15 00:00:00 UTC"))), size=0.65, linetype='dotted', color = 'red', na.rm = TRUE) - } - #date addition functionality - if(isTruthy(input$dateSelect)){ - plot <- plot + geom_vline(xintercept = as.POSIXct(as.Date(input$dateSelect)), size=0.65, linetype='dotted', color = 'red', na.rm = TRUE) - } - #separate by transaction types - if(input$transactionGroups=="Separate") { - plot <- plot + facet_wrap(~type, ncol = 2, scales = "free_y") - } - #actual plot object - plot - }) - }) - }) - - #daily summary on hovers - output$dailySummaryHover <- output$dailySummaryHoverS <- renderText({ - req(input$click, input$stats=='Hover', is.null(input$plotHover)==FALSE) - isolate({ - hoverData <- input$plotHover - - if(input$bins!='day') { - paste("Please Select Day for Daily Summaries") - } - else if(input$scaleBy=='Transaction Count'){ - dailySubset <- myData()[myData()$roundedTime== as.POSIXct(substr(as_datetime(hoverData$x), 0, 10), format="%Y-%m-%d", tz = "UTC"),] - if(input$transactionGroups=="Separate"){ - dailySubset <- dailySubset[which(dailySubset$type==hoverData$panelvar1),]} - paste('Date: ',dailySubset$roundedTime[1],'\nDistinct Coins: ', paste(levels(as.factor(dailySubset$reserve)), collapse = ', '), '\nDaily Transactions: ', sum(dailySubset$n), sep='') - } - else if(input$scaleBy=='Cumulative Transaction Value (USD)') { - dailySubset <- myData()[myData()$roundedTime== as.POSIXct(substr(as_datetime(hoverData$x), 0, 10), format="%Y-%m-%d", tz = "UTC"),] - if(input$transactionGroups=="Separate"){ - dailySubset <- dailySubset[which(dailySubset$type==hoverData$panelvar1),]} - paste('Date: ',dailySubset$roundedTime[1],'\nDistinct Coins: ', paste(levels(as.factor(dailySubset$reserve)), collapse = ', '), '\nDaily Transaction Value (USD in millions): ', (sum(dailySubset$amountUSD, na.rm = TRUE)%/%1e6), sep='') - } - else if(input$scaleBy=='Cumulative Transaction Value (ETH)') { - dailySubset <- myData()[myData()$roundedTime== as.POSIXct(substr(as_datetime(hoverData$x), 0, 10), format="%Y-%m-%d", tz = "UTC"),] - if(input$transactionGroups=="Separate"){ - dailySubset <- dailySubset[which(dailySubset$type==hoverData$panelvar1),]} - paste('Date: ',dailySubset$roundedTime[1],'\nDistinct Coins: ', paste(levels(as.factor(dailySubset$reserve)), collapse = ', '), '\nDaily Transaction Value (ETH in millions): ', (sum(dailySubset$amountETH, na.rm = TRUE)%/%1e6), sep='') - } - else if(input$scaleBy=='Native Coin Transaction Count') { - dailySubset <- myData()[myData()$roundedTime== as.POSIXct(substr(as_datetime(hoverData$x), 0, 10), format="%Y-%m-%d", tz = "UTC"),] - if(input$transactionGroups=="Separate"){ - dailySubset <- dailySubset[which(dailySubset$type==hoverData$panelvar1),]} - paste('Date: ',dailySubset$roundedTime[1],'\nDistinct Coins: ', paste(levels(as.factor(dailySubset$reserve)), collapse = ', '), '\nDaily Amount of Coins Transacted (in millions): ', (sum(dailySubset$amount, na.rm = TRUE)%/%1e6), sep='') - } - }) - }) - - output$dailySummaryClick <- output$dailySummaryClickS <- renderText({ - req(input$click, input$stats=='Click', is.null(input$plotClick)==FALSE) - isolate({ - clickData <- input$plotClick - - if(input$bins!='day') { - paste("Please Select Day for Daily Summaries") - } - else if(input$scaleBy=='Transaction Count'){ - dailySubset <- myData()[myData()$roundedTime== as.POSIXct(substr(as_datetime(clickData$x), 0, 10), format="%Y-%m-%d", tz = "UTC"),] - if(input$transactionGroups=="Separate"){ - dailySubset <- dailySubset[which(dailySubset$type==clickData$panelvar1),]} - paste('Date: ',dailySubset$roundedTime[1],'\nDistinct Coins: ', paste(levels(as.factor(dailySubset$reserve)), collapse = ', '), '\nDaily Transactions: ', sum(dailySubset$n), sep='') - } - else if(input$scaleBy=='Cumulative Transaction Value (USD)') { - dailySubset <- myData()[myData()$roundedTime== as.POSIXct(substr(as_datetime(clickData$x), 0, 10), format="%Y-%m-%d", tz = "UTC"),] - if(input$transactionGroups=="Separate"){ - dailySubset <- dailySubset[which(dailySubset$type==clickData$panelvar1),]} - paste('Date: ',dailySubset$roundedTime[1],'\nDistinct Coins: ', paste(levels(as.factor(dailySubset$reserve)), collapse = ', '), '\nDaily Transaction Value (USD in millions): ', (sum(dailySubset$amountUSD, na.rm = TRUE)%/%1e6), sep='') - } - else if(input$scaleBy=='Cumulative Transaction Value (ETH)') { - dailySubset <- myData()[myData()$roundedTime== as.POSIXct(substr(as_datetime(clickData$x), 0, 10), format="%Y-%m-%d", tz = "UTC"),] - if(input$transactionGroups=="Separate"){ - dailySubset <- dailySubset[which(dailySubset$type==clickData$panelvar1),]} - paste('Date: ',dailySubset$roundedTime[1],'\nDistinct Coins: ', paste(levels(as.factor(dailySubset$reserve)), collapse = ', '), '\nDaily Transaction Value (ETH in millions): ', (sum(dailySubset$amountETH, na.rm = TRUE)%/%1e6), sep='') - } - else if(input$scaleBy=='Native Coin Transaction Count') { - dailySubset <- myData()[myData()$roundedTime== as.POSIXct(substr(as_datetime(clickData$x), 0, 10), format="%Y-%m-%d", tz = "UTC"),] - if(input$transactionGroups=="Separate"){ - dailySubset <- dailySubset[which(dailySubset$type==clickData$panelvar1),]} - paste('Date: ',dailySubset$roundedTime[1],'\nDistinct Coins: ', paste(levels(as.factor(dailySubset$reserve)), collapse = ', '), '\nDaily Amount of Coins Transacted (in millions): ', (sum(dailySubset$amount, na.rm = TRUE)%/%1e6), sep='') - } - }) - }) - - - # main output plot of the dashboard - output$reservePlot2 <- output$reservePlot2S <- renderPlot({ - req(input$clickR) - isolate({ - filteredTransactions <- myData2() - req(length(filteredTransactions$reserve)!=0) # make sure the subset of data isn't blank - isolate({ - # Setup the yScale column according to the chosen scale, and set up the - # proper prefix for the y-axis label - if(input$scaleBy2 == "Transaction Count"){ - yLabPrefix <- "Number of " - }else if(input$scaleBy2 == "Cumulative Transaction Value (USD)"){ - yLabPrefix <- "USD Value (in millions) of " - }else if(input$scaleBy2 == "Cumulative Transaction Value (ETH)"){ - yLabPrefix <- "ETH Value of " - } - else if(input$scaleBy2 == "Native Coin Transaction Count"){ - yLabPrefix <- "Native Coin Transaction Count of " - } - - ifelse(length(input$reserve2) == 0, filteredReserves <- reserveTypes$reserve, filteredReserves <- input$reserve2) - ifelse(length(input$transactionType2) == 0, filteredTransactionTypes <- transactionTypes$type, filteredTransactionTypes <- input$transactionType2) - - ifelse(length(filteredReserves) > 3, reserveString <- "Selected Reserves ", reserveString <- paste(filteredReserves, collapse=', ')) - ifelse(length(filteredTransactionTypes) > 3, typeString <- "Transactions ", typeString <- str_c(paste(filteredTransactionTypes, collapse='s, '), "s ", sep='')) - ifelse(input$reserveGroups2=="Separate", plotAES <- aes(filteredTransactions$roundedTime, filteredTransactions$yScale, fill=filteredTransactions$reserve), - plotAES <- aes(filteredTransactions$roundedTime, filteredTransactions$yScale)) - title <- str_c(yLabPrefix, typeString, "for ", reserveString, sep='') - - plot <- ggplot(filteredTransactions, plotAES) + geom_col() + - xlab(str_to_title(input$bins2)) + - ylab(str_c(yLabPrefix, typeString, sep=""))+ - ggtitle(title) - - #market crash functionality - if(input$crash12==TRUE){ - plot <- plot + geom_vline(xintercept = as.POSIXct(as.Date(c("2022-05-12 00:00:00 UTC", "2021-05-15 00:00:00 UTC"))), size=0.65, linetype='dotted', color = 'red', na.rm = TRUE) - } - #date addition functionality - if(isTruthy(input$dateSelect2)){ - plot <- plot + geom_vline(xintercept = as.POSIXct(as.Date(input$dateSelect2)), size=0.65, linetype='dotted', color = 'red', na.rm = TRUE) - } - #separate by transaction types - if(input$transactionGroups2=="Separate") { - plot <- plot + facet_wrap(~type, ncol = 2, scales = "free_y") - } - #actual plot object - plot - }) - }) - }) - - #daily summary on hovers - output$dailySummaryHover2 <- output$dailySummary2HoverS <- renderText({ - req(input$clickR, input$stats2=='Hover', is.null(input$plotHover2)==FALSE) - isolate({ - hoverData <- input$plotHover2 - - if(input$bins2!='day') { - paste("Please Select Day for Daily Summaries") - } - else if(input$scaleBy2=='Transaction Count'){ - dailySubset <- myData()[myData()$roundedTime== as.POSIXct(substr(as_datetime(hoverData$x), 0, 10), format="%Y-%m-%d", tz = "UTC"),] - if(input$transactionGroups2=="Separate"){ - dailySubset <- dailySubset[which(dailySubset$type==hoverData$panelvar1),]} - paste('Date: ',dailySubset$roundedTime[1],'\nDistinct Coins: ', paste(levels(as.factor(dailySubset$reserve)), collapse = ', '), '\nDaily Transactions: ', sum(dailySubset$n), sep='') - } - else if(input$scaleBy2=='Cumulative Transaction Value (USD)') { - dailySubset <- myData()[myData()$roundedTime== as.POSIXct(substr(as_datetime(hoverData$x), 0, 10), format="%Y-%m-%d", tz = "UTC"),] - if(input$transactionGroups2=="Separate"){ - dailySubset <- dailySubset[which(dailySubset$type==hoverData$panelvar1),]} - paste('Date: ',dailySubset$roundedTime[1],'\nDistinct Coins: ', paste(levels(as.factor(dailySubset$reserve)), collapse = ', '), '\nDaily Transaction Value (USD in millions): ', (sum(dailySubset$amountUSD, na.rm = TRUE)%/%1e6), sep='') - } - else if(input$scaleBy2=='Cumulative Transaction Value (ETH)') { - dailySubset <- myData()[myData()$roundedTime== as.POSIXct(substr(as_datetime(hoverData$x), 0, 10), format="%Y-%m-%d", tz = "UTC"),] - if(input$transactionGroups2=="Separate"){ - dailySubset <- dailySubset[which(dailySubset$type==hoverData$panelvar1),]} - paste('Date: ',dailySubset$roundedTime[1],'\nDistinct Coins: ', paste(levels(as.factor(dailySubset$reserve)), collapse = ', '), '\nDaily Transaction Value (ETH in millions): ', (sum(dailySubset$amountETH, na.rm = TRUE)%/%1e6), sep='') - } - else if(input$scaleBy2=='Native Coin Transaction Count') { - dailySubset <- myData()[myData()$roundedTime== as.POSIXct(substr(as_datetime(hoverData$x), 0, 10), format="%Y-%m-%d", tz = "UTC"),] - if(input$transactionGroups2=="Separate"){ - dailySubset <- dailySubset[which(dailySubset$type==hoverData$panelvar1),]} - paste('Date: ',dailySubset$roundedTime[1],'\nDistinct Coins: ', paste(levels(as.factor(dailySubset$reserve)), collapse = ', '), '\nDaily Amount of Coins Transacted (in millions): ', (sum(dailySubset$amount, na.rm = TRUE)%/%1e6), sep='') - } - }) - }) - - #daily summary on clicks - output$dailySummaryClick2 <- output$dailySummary2ClickS <- renderText({ - req(input$clickR, input$stats2=='Click', is.null(input$plotClick2)==FALSE) - isolate({ - clickData <- input$plotClick2 - - if(input$bins2!='day') { - paste("Please Select Day for Daily Summaries") - } - else if(input$scaleBy2=='Transaction Count'){ - dailySubset <- myData()[myData()$roundedTime==as.POSIXct(substr(as_datetime(clickData$x), 0, 10), format="%Y-%m-%d", tz = "UTC"),] - if(input$transactionGroups2=="Separate"){ - dailySubset <- dailySubset[which(dailySubset$type==clickData$panelvar1),]} - paste('Date: ',dailySubset$roundedTime[1],'\nDistinct Coins: ', paste(levels(as.factor(dailySubset$reserve)), collapse = ', '), '\nDaily Transactions: ', sum(dailySubset$n), sep='') - } - else if(input$scaleBy2=='Cumulative Transaction Value (USD)') { - dailySubset <- myData()[myData()$roundedTime== as.POSIXct(substr(as_datetime(clickData$x), 0, 10), format="%Y-%m-%d", tz = "UTC"),] - if(input$transactionGroups2=="Separate"){ - dailySubset <- dailySubset[which(dailySubset$type==clickData$panelvar1),]} - paste('Date: ',dailySubset$roundedTime[1],'\nDistinct Coins: ', paste(levels(as.factor(dailySubset$reserve)), collapse = ', '), '\nDaily Transaction Value (USD in millions): ', (sum(dailySubset$amountUSD, na.rm = TRUE)%/%1e6), sep='') - } - else if(input$scaleBy2=='Cumulative Transaction Value (ETH)') { - dailySubset <- myData()[myData()$roundedTime== as.POSIXct(substr(as_datetime(clickData$x), 0, 10), format="%Y-%m-%d", tz = "UTC"),] - if(input$transactionGroups2=="Separate"){ - dailySubset <- dailySubset[which(dailySubset$type==clickData$panelvar1),]} - paste('Date: ',dailySubset$roundedTime[1],'\nDistinct Coins: ', paste(levels(as.factor(dailySubset$reserve)), collapse = ', '), '\nDaily Transaction Value (ETH in millions): ', (sum(dailySubset$amountETH, na.rm = TRUE)%/%1e6), sep='') - } - else if(input$scaleBy2=='Native Coin Transaction Count') { - dailySubset <- myData()[myData()$roundedTime== as.POSIXct(substr(as_datetime(clickData$x), 0, 10), format="%Y-%m-%d", tz = "UTC"),] - if(input$transactionGroups2=="Separate"){ - dailySubset <- dailySubset[which(dailySubset$type==clickData$panelvar1),]} - paste('Date: ',dailySubset$roundedTime[1],'\nDistinct Coins: ', paste(levels(as.factor(dailySubset$reserve)), collapse = ', '), '\nDaily Amount of Coins Transacted (in millions): ', (sum(dailySubset$amount, na.rm = TRUE)%/%1e6), sep='') - } - }) - }) - - - output$recentLiquidations <- renderDT({ - transactions$datetime <- as_datetime(transactions$datetime) - datatable((transactions %>% - filter(type=='liquidation') %>% - select(datetime, principalReserve, principalAmount, collateralReserve, collateralAmount) %>% - arrange(desc(datetime))), - caption = htmltools::tags$caption(style = 'caption-side: top; text-align: center; color: black; font-size: 20px; font-style: bold;', htmltools::em('Liquidations')), - rownames = FALSE - ) %>% formatDate(1, "toLocaleString") - }) - - output$recentDeposits <- renderDT({ - transactions$datetime <- as_datetime(transactions$datetime) - datatable((transactions %>% - filter(type=='deposit') %>% - select(datetime, amount, reserve) %>% - arrange(desc(datetime))), - caption = htmltools::tags$caption(style = 'caption-side: top; text-align: center; color: black; font-size: 20px; font-style: bold;', htmltools::em('Deposits')), - rownames = FALSE - ) %>% formatDate(1, "toLocaleString") - }) - - output$recentRedeems <- renderDT({ - transactions$datetime <- as_datetime(transactions$datetime) - datatable((transactions %>% - filter(type=='redeem') %>% - select(datetime, amount, reserve) %>% - arrange(desc(datetime))), - caption = htmltools::tags$caption(style = 'caption-side: top; text-align: center; color: black; font-size: 20px; font-style: bold;', htmltools::em('Redeems')), - rownames = FALSE - ) %>% formatDate(1, "toLocaleString") - }) - - output$recentBorrows <- renderDT({ - transactions$datetime <- as_datetime(transactions$datetime) - datatable((transactions %>% - filter(type=='borrow') %>% - select(datetime, amount, reserve) %>% - arrange(desc(datetime))), - caption = htmltools::tags$caption(style = 'caption-side: top; text-align: center; color: black; font-size: 20px; font-style: bold;', htmltools::em('Borrows')), - rownames = FALSE - ) %>% formatDate(1, "toLocaleString") - }) - - output$recentRepays <- renderDT({ - transactions$datetime <- as_datetime(transactions$datetime) - datatable((transactions %>% - filter(type=='repay') %>% - select(datetime, amount, reserve) %>% - arrange(desc(datetime))), - caption = htmltools::tags$caption(style = 'caption-side: top; text-align: center; color: black; font-size: 20px; font-style: bold;', htmltools::em('Repays')), - rownames = FALSE - ) %>% formatDate(1, "toLocaleString") - }) - - output$ratesPlot <- renderDygraph({ - req(input$click2) - isolate({ - # subset rates dataframe into median stable and borrow rates for chosen coin by day - coin_rates <- rates %>% - filter(reserve == as.character(input$coin)) %>% - select(date, stableBorrowRate, variableBorrowRate) %>% - group_by(date) %>% - summarize(stable = median(stableBorrowRate), - variable = median(variableBorrowRate)) - - # create time series class for dygraphs - xts <- xts(x = cbind(coin_rates$stable, coin_rates$variable), - order.by = coin_rates$date) - - date_range <- c(input$coinDateRange[1], input$coinDateRange[2]) - - # create dygraph for stable and variable borrow rates - dygraph(xts, main = paste(input$coin, "Stable vs. Variable APR", sep = " ")) %>% - dySeries("V1", label = "Stable") %>% - dySeries("V2", label = "Variable") %>% - dyOptions(labelsUTC = TRUE, fillGraph = TRUE, fillAlpha = 0.1, drawGrid = FALSE, - colors = brewer.pal(3, "Set2")[1:2]) %>% - dyRangeSelector(dateWindow = date_range) %>% - dyCrosshair(direction = "vertical") %>% - dyHighlight(highlightCircleSize = 5, highlightSeriesBackgroundAlpha = 0.2, - hideOnMouseOut = FALSE) %>% - dyRoller(rollPeriod = 1) %>% - # add % to axis label - dyAxis("y", valueFormatter = "function(v){return v.toFixed(1) + '%'}", - axisLabelFormatter = "function(v){return v + '%'}") - }) - }) - - output$ratesTable <- renderTable({ - req(input$click2) - isolate({ - # get coin borrow rate data between date ranges - coin_rates <- rates %>% - filter(reserve == as.character(input$coin) & - date >= input$coinDateRange[1] & - date <= input$coinDateRange[2]) %>% - select(date, stableBorrowRate, variableBorrowRate) - - # create output dataframe with summary data - coin_borrow_stats <- - data.frame(mean_stable = mean(coin_rates$stableBorrowRate), - median_stable = median(coin_rates$stableBorrowRate), - high_stable = max(coin_rates$stableBorrowRate), - low_stable = min(coin_rates$stableBorrowRate), - mean_variable = mean(coin_rates$variableBorrowRate), - median_variable = median(coin_rates$variableBorrowRate), - high_variable = max(coin_rates$variableBorrowRate), - low_variable = min(coin_rates$variableBorrowRate)) - - # rename column names - coin_borrow_stats <- coin_borrow_stats %>% - rename("Mean Stable Rate" = mean_stable, - "Median Stable Rate" = median_stable, - "High Stable Rate" = high_stable, - "Low Stable Rate" = low_stable, - "Mean Variable Rate" = mean_variable, - "Median Variable Rate" = median_variable, - "High Variable Rate" = high_variable, - "Low Variable Rate" = low_variable) - - coin_borrow_stats - }) - }) - - output$borrowRepayPlot <- renderDygraph({ - req(input$click2) - isolate({ - br_df <- transactions %>% - filter(reserve == as.character(input$coin)) %>% - group_by(date) %>% - summarize(borrowed = sum(amountUSD[type == "borrow"]), - repayed = sum(amountUSD[type == "repay"])) - - # create time series class for dygraphs - br_xts <- xts(x = cbind(br_df$borrowed, br_df$repayed), order.by = br_df$date) - - date_range <- c(input$coinDateRange[1], input$coinDateRange[2]) - - # create dygraph for stable and variable borrow rates - if(input$crash2==TRUE) { - dygraph(br_xts, main = paste(input$coin, "(in USD) Borrowed vs. Repayed", sep = " ")) %>% - dySeries("V1", label = "Borrowed") %>% - dySeries("V2", label = "Repayed") %>% - dyOptions(labelsUTC = TRUE, fillGraph = TRUE, fillAlpha = 0.1, drawGrid = FALSE, - colors = brewer.pal(3, "Set2")[1:2]) %>% - dyRangeSelector(dateWindow = date_range) %>% - dyCrosshair(direction = "vertical") %>% - dyHighlight(highlightCircleSize = 5, highlightSeriesBackgroundAlpha = 0.2, - hideOnMouseOut = FALSE) %>% - dyRoller(rollPeriod = 1) %>% - dyEvent("2021-05-15 00:00:00 UTC", label = 'May 2021 Crash', labelLoc = "top", color = "black", strokePattern = "dotted") %>% - dyEvent("2022-05-12 00:00:00 UTC", label = 'May 2022 Crash', labelLoc = "top", color = "black", strokePattern = "dotted") - } else{ - dygraph(br_xts, main = paste(input$coin, "(in USD) Borrowed vs. Repayed", sep = " ")) %>% - dySeries("V1", label = "Borrowed") %>% - dySeries("V2", label = "Repayed") %>% - dyOptions(labelsUTC = TRUE, fillGraph = TRUE, fillAlpha = 0.1, drawGrid = FALSE, - colors = brewer.pal(3, "Set2")[1:2]) %>% - dyRangeSelector(dateWindow = date_range) %>% - dyCrosshair(direction = "vertical") %>% - dyHighlight(highlightCircleSize = 5, highlightSeriesBackgroundAlpha = 0.2, - hideOnMouseOut = FALSE) %>% - dyRoller(rollPeriod = 1)} - - }) - }) - - output$depositRedeemPlot <- renderDygraph({ - req(input$click2) - isolate({ - br_df <- transactions %>% - filter(reserve == as.character(input$coin)) %>% - group_by(date) %>% - summarize(deposited = sum(amountUSD[type == "deposit"]), - redeemed = sum(amountUSD[type == "redeem"])) - - # create time series class for dygraphs - br_xts <- xts(x = cbind(br_df$deposited, br_df$redeemed), order.by = br_df$date) - - date_range <- c(input$coinDateRange[1], input$coinDateRange[2]) - - # create dygraph for stable and variable borrow rates - if(input$crash2==TRUE) { - dygraph(br_xts, main = paste(input$coin, "(in USD) Deposited vs. Redeemed", sep = " ")) %>% - dySeries("V1", label = "Deposited", color = 'red') %>% - dySeries("V2", label = "Redeemed", color = 'blue') %>% - dyOptions(labelsUTC = TRUE, fillGraph = TRUE, fillAlpha = 0.1, drawGrid = FALSE, - colors = brewer.pal(3, "Set2")[1:2]) %>% - dyRangeSelector(dateWindow = date_range) %>% - dyCrosshair(direction = "vertical") %>% - dyHighlight(highlightCircleSize = 5, highlightSeriesBackgroundAlpha = 0.2, - hideOnMouseOut = FALSE) %>% - dyRoller(rollPeriod = 1) %>% - dyEvent("2021-05-15 00:00:00 UTC", label = 'May 2021 Crash', labelLoc = "top", color = "black", strokePattern = "dotted") %>% - dyEvent("2022-05-12 00:00:00 UTC", label = 'May 2022 Crash', labelLoc = "top", color = "black", strokePattern = "dotted") - } else{ - dygraph(br_xts, main = paste(input$coin, "(in USD) Deposited vs. Redeemed", sep = " ")) %>% - dySeries("V1", label = "Deposited") %>% - dySeries("V2", label = "Redeemd") %>% - dyOptions(labelsUTC = TRUE, fillGraph = TRUE, fillAlpha = 0.1, drawGrid = FALSE, - colors = brewer.pal(3, "Set2")[1:2]) %>% - dyRangeSelector(dateWindow = date_range) %>% - dyCrosshair(direction = "vertical") %>% - dyHighlight(highlightCircleSize = 5, highlightSeriesBackgroundAlpha = 0.2, - hideOnMouseOut = FALSE) %>% - dyRoller(rollPeriod = 1)} - - }) - }) - - output$survUI <- renderUI({ - survivalPath <- "Survival Analysis Data/" - indexEvent <- paste(input$indexEvent, '/', sep='') - outcomes <- list.files(paste(dataPath, aavePath, mainnetPath, survivalPath, indexEvent, sep='')) - - selectInput("outcome", - "Outcome:", - choices = outcomes, - multiple = FALSE) - }) - - output$survCategoryUI <- renderUI({ - req(input$split == TRUE) - isolate({ - selectInput("category", - "Category to Split:", - choices = append(c("None"), setdiff(colnames(mySurvivalData()), c("ID", "user", "timeDiff", "status"))), - multiple = FALSE, - selected = NULL) - }) - }) - - mySurvivalData <- reactive({ - survivalPath <- "Survival Analysis Data/" - indexEvent <- paste(input$indexEvent, '/', sep='') - outcome <- paste(input$outcome, '/', sep='') - censoredFileName <- "censoredEvents.csv" - uncensoredFileName <- "uncensoredEvents.csv" - - censoredDf <- read_csv(paste(dataPath, aavePath, mainnetPath, survivalPath, indexEvent, outcome, censoredFileName, sep="")) - uncensoredDf <- read_csv(paste(dataPath, aavePath, mainnetPath, survivalPath, indexEvent, outcome, uncensoredFileName, sep="")) - - survivalDataset <- bind_rows(censoredDf, uncensoredDf) %>% - arrange(ID) - - survivalDataset - }) - - output$survivalPlot <- renderPlot({ - req(input$click3) - isolate({ - survivalDataset <- mySurvivalData() - - if(input$category=='None' || input$split==FALSE){ - survFormula<- paste0("Surv(as.numeric(timeDiff/86400), as.numeric(status)) ~ ", '1') - }else{ - survFormula<- paste0("Surv(as.numeric(timeDiff/86400), as.numeric(status)) ~ ", input$category) - } - - survivalFit <- surv_fit(as.formula(survFormula), data = survivalDataset) - - if (input$median==TRUE){ - if (input$split==TRUE){ - survivalPlot <- ggsurvplot(survivalFit, data = survivalDataset, xlab = "Time (days)", ylab = "Survival Probability", title=paste("Time from", input$indexEvent, "to", input$outcome), legend = "right", censor=FALSE, surv.median.line = "hv") - }else{ - survivalPlot <- ggsurvplot(survivalFit, data = survivalDataset, xlab = "Time (days)", ylab = "Survival Probability", title=paste("Time from", input$indexEvent, "to", input$outcome), legend = "right", censor=FALSE, surv.median.line = "hv", pval = TRUE) - } - }else{ - if (input$split==TRUE){ - survivalPlot <- ggsurvplot(survivalFit, data = survivalDataset, xlab = "Time (days)", ylab = "Survival Probability", title=paste("Time from", input$indexEvent, "to", input$outcome), legend = "right", censor=FALSE) - }else{ - survivalPlot <- ggsurvplot(survivalFit, data = survivalDataset, xlab = "Time (days)", ylab = "Survival Probability", title=paste("Time from", input$indexEvent, "to", input$outcome), legend = "right", censor=FALSE, pval = TRUE) - } - } - - survivalPlot - }) - }) -} - -# Run the application -shinyApp(ui = ui, server = server, enableBookmarking = "url") -# rsconnect::deployApp('~/DeFi_Summer_2022/Toolkit/DeFi_Toolkit') diff --git a/DeFi-Data-Engine/.gitignore b/DeFi-Data-Engine/.gitignore deleted file mode 100644 index 9190a975..00000000 --- a/DeFi-Data-Engine/.gitignore +++ /dev/null @@ -1 +0,0 @@ -'Testing Environment'/ \ No newline at end of file diff --git a/DeFi-Data-Engine/Api-Handler/.classpath b/DeFi-Data-Engine/Api-Handler/.classpath deleted file mode 100644 index b045a086..00000000 --- a/DeFi-Data-Engine/Api-Handler/.classpath +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/DeFi-Data-Engine/Api-Handler/.gitignore b/DeFi-Data-Engine/Api-Handler/.gitignore deleted file mode 100644 index 0f630157..00000000 --- a/DeFi-Data-Engine/Api-Handler/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/target/ -/bin/ diff --git a/DeFi-Data-Engine/Api-Handler/.project b/DeFi-Data-Engine/Api-Handler/.project deleted file mode 100644 index 8b92ab58..00000000 --- a/DeFi-Data-Engine/Api-Handler/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - Api-Handler - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - - diff --git a/DeFi-Data-Engine/Api-Handler/.settings/org.eclipse.core.resources.prefs b/DeFi-Data-Engine/Api-Handler/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index abdea9ac..00000000 --- a/DeFi-Data-Engine/Api-Handler/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,4 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/main/java=UTF-8 -encoding//src/main/resources=UTF-8 -encoding/=UTF-8 diff --git a/DeFi-Data-Engine/Api-Handler/.settings/org.eclipse.jdt.core.prefs b/DeFi-Data-Engine/Api-Handler/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 67cd90e7..00000000 --- a/DeFi-Data-Engine/Api-Handler/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,9 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.methodParameters=generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 -org.eclipse.jdt.core.compiler.compliance=17 -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=17 diff --git a/DeFi-Data-Engine/Api-Handler/Dockerfile b/DeFi-Data-Engine/Api-Handler/Dockerfile deleted file mode 100644 index e0aa34c3..00000000 --- a/DeFi-Data-Engine/Api-Handler/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM maven:3.8.6-eclipse-temurin-17-alpine - -ENV APP_NAME api-handler -ENV PORT 8080 -ENV OUTPUT /Documents/Handler-Output - -EXPOSE ${PORT} - -COPY ./ ./ -RUN mvn clean package spring-boot:repackage -Dmaven.skip.test=true -CMD ["java", "-jar", "target/api-handler-0.0.1.jar"] \ No newline at end of file diff --git a/DeFi-Data-Engine/Api-Handler/pom.xml b/DeFi-Data-Engine/Api-Handler/pom.xml deleted file mode 100644 index d5c23ec0..00000000 --- a/DeFi-Data-Engine/Api-Handler/pom.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - 4.0.0 - - org.springframework.boot - spring-boot-starter-parent - 3.0.2 - - - org.application - api-handler - 0.0.1 - api-handler - Lightweight application for retrieving generalized api calls. - - 17 - - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.boot - spring-boot-starter-test - test - - - - - org.json - json - 20220924 - - - - - com.squareup.okhttp3 - okhttp - - - - org.reflections - reflections - 0.10.2 - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - diff --git a/DeFi-Data-Engine/Api-Handler/src/main/java/org/application/apihandler/ApiHandlerApplication.java b/DeFi-Data-Engine/Api-Handler/src/main/java/org/application/apihandler/ApiHandlerApplication.java deleted file mode 100644 index 19994bba..00000000 --- a/DeFi-Data-Engine/Api-Handler/src/main/java/org/application/apihandler/ApiHandlerApplication.java +++ /dev/null @@ -1,137 +0,0 @@ -package org.application.apihandler; - -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.TreeSet; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.servlet.config.annotation.EnableWebMvc; - -@EnableAutoConfiguration -@EnableWebMvc -@Configuration -@ComponentScan -public class ApiHandlerApplication { - - // define default output - // System.getProperty("user.home") + - private static final String DEFAULT_OUTPUT = "/data";//String.format("/Users/%s/Documents/DeFi-Data", System.getProperty("user.name")); - - private static final HashMap writers = new HashMap(); - private static final HashMap>> buffers = new HashMap>>(); - private static final HashMap> headers = new HashMap>(); - - private static final void initialize() { - // retrieve home directory and path to default output - File dir = new File(DEFAULT_OUTPUT); - // validate that it is a directory and if not then create - if(!dir.exists() || !dir.isDirectory()) - dir.mkdir(); - } - - public final static void lock(String name) { - if(!writers.containsKey(name)) { - try { - String file_name = DEFAULT_OUTPUT + "/" + name + ".csv"; - File file = new File(file_name); - if(!file.getParentFile().exists()) - file.getParentFile().mkdirs(); - if(!file.exists()) - file.createNewFile(); - else { - file.delete(); - file.createNewFile(); - } - writers.put(name, new BufferedWriter(new FileWriter(file))); - buffers.put(name, new ArrayList>()); - headers.put(name, new TreeSet()); - } catch (FileNotFoundException e) { - e.printStackTrace(); - System.exit(1); - } catch (IOException e) { - e.printStackTrace(); - System.exit(1); - } - } - } - - public final static void unlock(String name) { - if(writers.containsKey(name)) { - try { - // retrieve writer - BufferedWriter writer = writers.get(name); - - // write all column headers - Iterator header_itr = headers.get(name).iterator(); - while(header_itr.hasNext()) { - writer.write(header_itr.next()); - if(header_itr.hasNext()) - writer.write(","); - } - - // new line - writer.write("\n"); - - // write to file using formatted headers - ArrayList> buffer = buffers.get(name); - for(int i = 0; i < buffer.size(); i++) { - StringBuilder line = new StringBuilder(); - - // loop through all headers and format - for(String header : headers.get(name)) { - if(buffer.get(i).containsKey(header)) { - line.append(buffer.get(i).get(header).replaceAll(",", "|")); - } - - line.append(","); - } - - // write line to file - line.delete(line.length() - 1, line.length()); - writer.write(line.toString()); - - // new line - if(i != buffer.size() - 1) - writer.write("\n"); - } - - // close output loop - writers.get(name).close(); - } catch (IOException e) { - e.printStackTrace(); - System.exit(1); - } - } - - writers.remove(name); - } - - public final static void output(String name, HashMap data) { - if(!writers.containsKey(name) || !buffers.containsKey(name) || !headers.containsKey(name)) { - lock(name); - } - - // add all headers - for(String header : data.keySet()) - headers.get(name).add(header); - - // push data to buffers - buffers.get(name).add(data); - } - - public static void main(String[] args) { - // load in output directory - initialize(); - - SpringApplication.run(ApiHandlerApplication.class, args); - } -} \ No newline at end of file diff --git a/DeFi-Data-Engine/Api-Handler/src/main/java/org/application/apihandler/Controller.java b/DeFi-Data-Engine/Api-Handler/src/main/java/org/application/apihandler/Controller.java deleted file mode 100644 index 118f4f3e..00000000 --- a/DeFi-Data-Engine/Api-Handler/src/main/java/org/application/apihandler/Controller.java +++ /dev/null @@ -1,145 +0,0 @@ -package org.application.apihandler; - -import java.io.IOException; -import java.lang.reflect.InvocationTargetException; -import java.net.URISyntaxException; -import java.util.HashMap; - -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.CrossOrigin; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import org.stream.external.request.types.RequestFramework; -import org.stream.external.request.types.RequestManager; - -import jakarta.annotation.PostConstruct; - -@RestController -@RequestMapping(path = {"/api/v1"}) -public class Controller { - - @PostConstruct - public void initialize() { - try { - RequestManager.initialize(); - } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException - | NoSuchMethodException | SecurityException | URISyntaxException | IOException e) { - e.printStackTrace(); - } - } - - @PostMapping - @CrossOrigin - @RequestMapping(path = {"/request"}) - public ResponseEntity handleRequest( - @RequestParam(name="name", required=true) String name, - @RequestParam(name="properties", required=false) String properties, - @RequestParam(name="headers", required=false) String headers, - @RequestParam(name="path",required=false) String path) { - - // assert that request exists - if(!RequestManager.hasRequestFormat(name)) - return new ResponseEntity(String.format("Request name <%s> does not exist.", name), HttpStatus.UNPROCESSABLE_ENTITY); - - // retrieve request framework - RequestFramework request = RequestManager.getRequestFormat(name); - - // parse properties and headers - HashMap properties_map = new HashMap(); - HashMap headers_map = new HashMap(); - String[] path_map = new String[] {}; - - if(properties != null) { - String[] arr = properties.split(","); - if(arr.length % 2 != 0) - return new ResponseEntity("Properties must be in the format of pairs.", HttpStatus.PRECONDITION_FAILED); - - for(int i = 0; i < arr.length; i+=2) - properties_map.put(arr[i], arr[i + 1]); - } - - if(headers != null) { - String[] arr = headers.split(","); - if(arr.length % 2 != 0) - return new ResponseEntity("Headers must be in the format of pairs.", HttpStatus.PRECONDITION_FAILED); - - for(int i = 0; i < arr.length; i+=2) - headers_map.put(arr[i], arr[i + 1]); - } - - if(path != null) { - path_map = path.split(","); - if(path_map.length % 2 != 0) - return new ResponseEntity("Path must be in the format of pairs.", HttpStatus.PRECONDITION_FAILED); - } - - // submit request - ApiHandlerApplication.lock(name); - String response = request.request(path_map, properties_map, headers_map); - ApiHandlerApplication.unlock(name); - if(response != null) - return new ResponseEntity(response, HttpStatus.SERVICE_UNAVAILABLE); - - return new ResponseEntity("", HttpStatus.OK); - } - - @PostMapping - @CrossOrigin - @RequestMapping(path = {"/request-dated"}) - public ResponseEntity handleRequestDated( - @RequestParam(name="name", required=true) String name, - @RequestParam(name="properties", required=false) String properties, - @RequestParam(name="headers", required=false) String headers, - @RequestParam(name="path",required=false) String path, - @RequestParam(name="startDate",required=true) String start_date, - @RequestParam(name="endDate",required=true) String end_date) { - - // assert that request exists - if(!RequestManager.hasRequestFormat(name)) - return new ResponseEntity(String.format("Request name <%s> does not exist.", name), HttpStatus.UNPROCESSABLE_ENTITY); - - // retrieve request framework - RequestFramework request = RequestManager.getRequestFormat(name); - - // parse properties and headers - HashMap properties_map = new HashMap(); - HashMap headers_map = new HashMap(); - String[] path_map = new String[] {}; - - if(properties != null) { - String[] arr = properties.split(","); - if(arr.length % 2 != 0) - return new ResponseEntity("Properties must be in the format of pairs.", HttpStatus.PRECONDITION_FAILED); - - for(int i = 0; i < arr.length; i+=2) - properties_map.put(arr[i], arr[i + 1]); - } - - if(headers != null) { - String[] arr = headers.split(","); - if(arr.length % 2 != 0) - return new ResponseEntity("Headers must be in the format of pairs.", HttpStatus.PRECONDITION_FAILED); - - for(int i = 0; i < arr.length; i+=2) - headers_map.put(arr[i], arr[i + 1]); - } - - if(path != null) { - path_map = path.split(","); - if(path_map.length % 2 != 0) - return new ResponseEntity("Path must be in the format of pairs.", HttpStatus.PRECONDITION_FAILED); - } - - // submit request - ApiHandlerApplication.lock(name); - String response = request.request(path_map, properties_map, headers_map, start_date, end_date); - ApiHandlerApplication.unlock(name); - if(response != null) - return new ResponseEntity(response, HttpStatus.SERVICE_UNAVAILABLE); - - return new ResponseEntity("", HttpStatus.OK); - } -} diff --git a/DeFi-Data-Engine/Api-Handler/src/main/java/org/stream/external/request/types/RequestFramework.java b/DeFi-Data-Engine/Api-Handler/src/main/java/org/stream/external/request/types/RequestFramework.java deleted file mode 100644 index 6413d6af..00000000 --- a/DeFi-Data-Engine/Api-Handler/src/main/java/org/stream/external/request/types/RequestFramework.java +++ /dev/null @@ -1,381 +0,0 @@ -package org.stream.external.request.types; - -import java.io.IOException; -import java.time.LocalDate; -import java.time.format.DateTimeFormatter; -import java.time.format.DateTimeParseException; -import java.util.HashMap; -import java.util.Iterator; -import java.util.stream.Stream; - -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Request.Builder; -import okhttp3.Response; - -public abstract class RequestFramework { - - public final static DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); - - private final String name; - private String url; - private final String[] url_path; - private final HashMap properties; - private final HashMap headers; - private final HashMap tags; - private final String[] recursive_location; - private final String recursive_replacement; - private final String[] path; - private final boolean is_dated; - private final String date_location; - protected final String date_start_var; - protected final String date_end_var; - protected final DateTimeFormatter date_format; - - // default constructor used for templating - public RequestFramework() { - this.name = null; - this.url = null; - this.url_path = null; - this.properties = null; - this.headers = null; - this.tags = null; - this.recursive_location = null; - this.recursive_replacement = null; - this.path = null; - this.is_dated = false; - this.date_location = null; - this.date_start_var = null; - this.date_end_var = null; - this.date_format = null; - } - - public RequestFramework(String name, String url, String[] url_path, HashMap properties, HashMap headers, - HashMap tags, String[] recursive_location, String recursive_replacement, String[] path, - boolean is_dated, String date_location, String date_start_var, String date_end_var, String date_format) { - this.name = name; - this.url = url; - this.url_path = url_path; - this.properties = properties; - this.headers = headers; - this.tags = tags; - this.recursive_location = recursive_location; - this.recursive_replacement = recursive_replacement; - this.path = path; - this.is_dated = is_dated; - this.date_location = date_location; - this.date_start_var = date_start_var; - this.date_end_var = date_end_var; - this.date_format = DateTimeFormatter.ofPattern(date_format); - } - - public final boolean hasTag(String tag) { - return this.tags.containsKey(tag); - } - - public final String getTag(String tag) { - return this.tags.get(tag); - } - - public final HashMap getTags() { - return this.tags; - } - - public final String getName() { - return name; - } - - public final String getUrl() { - return url; - } - - public final String[] getRecursiveLocation() { - return recursive_location; - } - - public final String getRecursiveReplacement() { - return recursive_replacement; - } - - public final String[] getPath() { - return path; - } - - protected final Request getRequest(HashMap properties, HashMap headers) { - return this.getRequest(this.url, properties, headers); - } - - protected final Request getRequest(String url, HashMap properties, HashMap headers) { - // define builder - Builder builder = new Builder(); - StringBuilder url_builder = new StringBuilder(url); - - // add properties delim if there are properties - if(!properties.isEmpty()) - url_builder.append("?"); - - // add all required/optional properties - for(String property : properties.keySet()) { - String value = properties.get(property); - - // check if empty - if(value == null || value.equals("")) { - System.err.println(String.format("Property cannot be empty <%s>", property)); - return null; - } - - // check if required - if(value.equals(".") && this.properties.containsKey(property)) { - System.err.println(String.format("Required property <%s> not defined.", property)); - return null; - } - - // add to url - url_builder.append(String.format("%s=%s&", property, value)); - } - - // remove final & and update builder - if(!properties.isEmpty()) - url_builder.deleteCharAt(url_builder.length() - 1); - builder = builder.url(url_builder.toString()); - - // add all headers - for(String header : headers.keySet()) { - String value = headers.get(header); - - // check if empty - if(value == null || value.equals("")) { - System.err.println(String.format("Header cannot be empty <%s>", header)); - return null; - } - - // check if required - if(value.equals(".") && this.properties.containsKey(header)) { - System.err.println(String.format("Required header <%s> not defined.", header)); - return null; - } - - builder = builder.addHeader(header, value); - } - - return builder.build(); - } - - - public final synchronized String request(String[] url_path, HashMap properties, HashMap headers) { - // validate that url_path is correctly formatted - if(url_path.length % 2 != 0) { - System.err.println("Url path is not formatted properly and must be in pairs."); - return "Url path is not formatted properly and must be in pairs."; - } - - // validate that url_path parameter is valid - if(this.url_path.length != url_path.length) { - System.err.println("Url path does not match defined url path."); - return "Url path does not match defined url path."; - } - - // update path if there are url path extensions - StringBuilder url_builder = new StringBuilder(url); - if(url_path.length > 0) { - for(int i = 0; i < url_path.length; i+=2) { - if(!url_path[i].equals(this.url_path[i])) { - System.err.println(String.format("Url path key <%s> does not match defined key <%s>", url_path[i], this.url_path[i])); - return String.format("Url path key <%s> does not match defined key <%s>", url_path[i], this.url_path[i]); - } - - url_builder.append("/").append(url_path[i+1]); - } - } - - return process(url_builder.toString(), properties, headers); - } - - public final synchronized String request(String[] url_path, HashMap properties, HashMap headers, - String startDate, String endDate) { - - // validate that the request can be dated - if(!is_dated) { - System.err.println("Request cannot be dated."); - return "Request cannot be dated."; - } - - // parse passed dates - LocalDate start, end; - try { - start = LocalDate.parse(startDate, formatter); - end = LocalDate.parse(endDate, formatter); - } catch (DateTimeParseException e) { - return "Unable to parse dates."; - } - - if(start == null || end == null) { - System.err.println("Fatal error parsing dates."); - return "Fatal error parsing dates."; - } - - // retrieve all dates in-between - Stream dates = null; - - try { - dates = start.datesUntil(end); - } catch(Exception e) { - System.err.println("End date must be after start date."); - return "End date must be after start date."; - } - - // submit requests for each date - Iterator itr = dates.iterator(); - while(itr.hasNext()) { - // retrieve date - LocalDate date = itr.next(); - - // retrieve start date var and update to location - switch(date_location) { - case "properties": - properties.put(date_start_var, date.format(date_format)); - break; - case "headers": - headers.put(date_start_var, date.format(date_format)); - break; - default: - System.err.println("Invalid date.location parameter value."); - System.exit(1); - } - - // if end date is required add one day and push to properties - if(!date_end_var.equals(".")) { - LocalDate tmr = date.plusDays(1); - switch(date_location) { - case "properties": - properties.put(date_end_var, tmr.format(date_format)); - break; - case "headers": - headers.put(date_end_var, tmr.format(date_format)); - break; - default: - System.err.println("Invalid date.location parameter value."); - System.exit(1); - } - } - - // submit request with updated properties - System.out.println(String.format("Requesting: name=[%s] date=[%s]", getName(), date.toString())); - String request = request(url_path, properties, headers); - if(request != null) - return request; - } - - return null; - } - - protected String processUrl(String url, HashMap headers) { - HashMap all_headers = new HashMap(); - - for(String header : this.headers.keySet()) - all_headers.put(header, this.headers.get(header)); - - for(String header : headers.keySet()) - all_headers.put(header, headers.get(header)); - - return processRequest(url, new HashMap(), all_headers); - } - - protected String process(String url, HashMap properties, HashMap headers) { - HashMap all_properties = new HashMap(); - HashMap all_headers = new HashMap(); - - // add all properties and headers - for(String property : this.properties.keySet()) - all_properties.put(property, this.properties.get(property)); - - for(String property : properties.keySet()) - all_properties.put(property, properties.get(property)); - - for(String header : this.headers.keySet()) - all_headers.put(header, this.headers.get(header)); - - for(String header : headers.keySet()) - all_headers.put(header, headers.get(header)); - - return processRequest(url, all_properties, all_headers); - } - - protected String processRequest(String url, HashMap properties, HashMap headers) { - OkHttpClient client = new OkHttpClient(); - Request request = getRequest(url, properties, headers); - if(request == null) { - System.err.println("Malformed request, killing process."); - return "Malformed request, killing process."; - } - - Response response = null; - String body = null; - try { - response = client.newCall(request).execute(); - body = response.body().string().toString(); - if(response.code() != 200) { - return String.format("Request Failure code=<%d> url=<%s> body=<%s>", response.code(), request.url().toString(), body); - } - } catch (IOException e) { - e.printStackTrace(); - } - - if(body == null) { - System.err.println("Response had fatal issue, killing process."); - return "Response had fatal issue, killing process."; - } - - // send to specific request handler - try { - handle(body, properties, headers); - } catch(Exception e) { - e.printStackTrace(); - return e.toString(); - } - - return null; - } - - protected abstract String handle(String json, HashMap properties, HashMap headers); - - public abstract String getType(); - - protected final HashMap parse(Object input) throws JSONException { - - HashMap out = new HashMap(); - - if (input instanceof JSONObject) { - - Iterator keys = ((JSONObject) input).keys(); - - while (keys.hasNext()) { - - String key = (String) keys.next(); - - if (!(((JSONObject) input).get(key) instanceof JSONArray)) { - if (((JSONObject) input).get(key) instanceof JSONObject) { - out.putAll(parse(((JSONObject) input).get(key))); - } else { - out.put(key, ((JSONObject) input).get(key).toString()); - } - } else { - out.putAll(parse(new JSONArray(((JSONObject) input).get(key).toString()))); - } - } - } - - if (input instanceof JSONArray) { - for (int i = 0; i < ((JSONArray) input).length(); i++) { - JSONObject a = ((JSONArray) input).getJSONObject(i); - out.putAll(parse(a)); - } - } - - return out; - } -} \ No newline at end of file diff --git a/DeFi-Data-Engine/Api-Handler/src/main/java/org/stream/external/request/types/RequestGraphQL.java b/DeFi-Data-Engine/Api-Handler/src/main/java/org/stream/external/request/types/RequestGraphQL.java deleted file mode 100644 index 6c3cca54..00000000 --- a/DeFi-Data-Engine/Api-Handler/src/main/java/org/stream/external/request/types/RequestGraphQL.java +++ /dev/null @@ -1,256 +0,0 @@ -package org.stream.external.request.types; - -import java.net.URI; -import java.net.http.HttpClient; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.time.LocalDate; -import java.util.HashMap; - -import org.application.apihandler.ApiHandlerApplication; -import org.json.JSONArray; -import org.json.JSONObject; - -public class RequestGraphQL extends RequestFramework { - - public RequestGraphQL() { - super(); - } - - public RequestGraphQL(String name, String url, String[] url_path, HashMap properties, HashMap headers, - HashMap tags, String[] recursive_location, String recursive_replacement, String[] path, - boolean is_dated, String date_location, String date_start_var, String date_end_var, String date_format) { - super(name, url, url_path, properties, headers, tags, recursive_location, recursive_replacement, path, - is_dated, date_location, date_start_var, date_end_var, date_format); - } - - @Override - public String getType() { - return "graphql"; - } - - @Override - protected String processRequest(String url, HashMap properties, HashMap headers) { - // validate properties and url and not empty - if(url.isEmpty() || properties.isEmpty()) - return "Key parameter is empty"; - - // check for required tag -l - if(!hasTag("-l")) { - System.err.println(String.format("Missing required recursive parameter <-l>")); - return "Missing required recursive parameter <-l>"; - } - - // check for -l being an integer - try { - Integer.parseInt(getTag("-l")); - } catch(Exception e) { - e.printStackTrace(); - System.err.println(String.format("Value following <-l> must be an integer.")); - return "Value following <-l> must be an integer."; - } - - // validate all required properties exist - String[] req_properties = {"values", "method"}; - for(String key : req_properties) { - if(!properties.containsKey(key)) - return String.format("Required property <%s> not found.", key); - } - - // build query from properties: - - // generate values - String[] values_arr = properties.get("values").split(":"); - StringBuilder values = new StringBuilder(); - for(int i = 0; i < values_arr.length; i++) { - values.append(values_arr[i]); - if(i != values_arr.length - 1) - values.append(","); - } - - // generate timestamp/recursive values - String recursive_location = getRecursiveLocation()[0]; - StringBuilder where = new StringBuilder(); - if(properties.containsKey("gt")) { - where.append(String.format("{%s_gt:%s", recursive_location, properties.get("gt"))); - if(properties.containsKey("lt")) - where.append(String.format(" %s_lt:%s", recursive_location, properties.get("lt"))); - } - - // if no gt or lt detected, check if dated - else { - // if dated - if(properties.containsKey(date_start_var) && properties.containsKey(date_end_var)) { - // define timestamp definition based on recursive parameter for gt and lt - LocalDate start_date = LocalDate.parse(properties.get(date_start_var), formatter); - LocalDate end_date = LocalDate.parse(properties.get(date_end_var), formatter); - long start_epoch = start_date.toEpochDay() * 86400L; - long end_epoch = end_date.toEpochDay() * 86400L; - - // append - where.append(String.format("{%s_gt:%s %s_lt:%s", - recursive_location, start_epoch, - recursive_location, end_epoch)); - - // push gt and lt properties - properties.put("gt", "" + start_epoch); - properties.put("lt", "" + end_epoch); - } - - // if not dated then apply basic lt - else { - where.append(String.format("{%s_gt:0", recursive_location)); - properties.put("gt", "0"); - } - } - - // close recursion - where.append("}"); - - // append - String query = String.format("query {" - + "%s(first:%s orderBy:%s where:%s){%s}}", - properties.get("method"), - getTag("-l"), - recursive_location, - where, - values); - - System.out.println(query); - // make request to server: - - // create client - HttpClient client = HttpClient.newHttpClient(); - - // create http request with POST method - HttpRequest.Builder builder = HttpRequest.newBuilder() - .uri(URI.create(getUrl())) - .POST(HttpRequest.BodyPublishers.ofString(new JSONObject().put("query", query).toString())); - - // add all headers - for(String key : headers.keySet()) { - builder = builder.header(key, headers.get(key)); - } - - // generate request - HttpRequest request = builder.build(); - - // submit request - HttpResponse response; - try { - response = client.send(request, HttpResponse.BodyHandlers.ofString()); - } catch(Exception e) { - e.printStackTrace(); - return "Invalid client request to server"; - } - - if(response.statusCode() != 200) { - return "GraphQL request failed with status code: " + response.statusCode(); - } - - // extract json body - String body = response.body(); - JSONObject json = new JSONObject(body); - if(json.has("errors")) { - return json.toString(); - } - - // process in handler - return handle(body, properties, headers); - } - - @Override - protected String handle(String json, HashMap properties, HashMap headers) { - // parse json formatting - JSONObject obj = new JSONObject(json); - - // validate all required parameters are present: - // check for required tag -l - if(!hasTag("-l")) { - System.err.println(String.format("Missing required recursive parameter <-l>")); - return "Missing required recursive parameter <-l>"; - } - - // check for -l being an integer - int limit; - try { - limit = Integer.parseInt(getTag("-l")); - } catch(Exception e) { - e.printStackTrace(); - System.err.println(String.format("Value following <-l> must be an integer.")); - return "Value following <-l> must be an integer."; - } - - // validate that the base has the proper data path - String[] path = getPath(); - JSONArray data = null; - for(int i = 0; i < path.length; i++) { - if(i == path.length - 1) { - if(obj.has(path[i])) { - try { - data = obj.getJSONArray(path[i]); - } catch(Exception e) { - System.err.println("obj path type is not of type . Cannot parse"); - return "obj path type is not of type . Cannot parse"; - } - } - } - - else if(obj.has(path[i])) { - try { - obj = obj.getJSONObject(path[i]); - } catch(Exception e) { - System.err.println("obj path type step is not of type . Cannot parse."); - return "obj path type step is not of type . Cannot parse."; - } - } - - else { - return "Data path is invalid. Please revise configuration."; - } - } - - // validate that data is non-empty - if(data == null) { - System.err.println("Data array retrieval had fatal error, killing process."); - return "Data array retrieval had fatal error, killing process."; - } - - // define recursive location - String recursive_location = getRecursiveLocation()[0]; - - // extract and print data - // validate recursive parameter with first data point and store value from last - // note that if dated then use date restrictive query - for(int i = 0; i < data.length(); i++) { - // retrieve values - HashMap point = parse(data.getJSONObject(i)); - - // if i == 0 then parse recursive parameter - if(i == 0 && !point.containsKey(recursive_location)) { - System.err.println("Point does not contain recursive location."); - return "Point does not contain recursive location."; - } - - // push data - ApiHandlerApplication.output(this.getName(), point); - - // if last data point then retrieve recursive parameter - if(i == data.length() - 1) { - if(!point.containsKey(recursive_location)) { - System.err.println("Final point does not contain recursive location. Data collection may not be complete."); - return "Final point does not contain recursive location. Data collection may not be complete."; - } - - // update gt property with new value - properties.put("gt", String.format("\"%s\"", point.get(recursive_location))); - } - } - - // if data is less than provided limit then return - if(data.length() < limit) - return null; - - return process(getUrl(), properties, headers); - } -} diff --git a/DeFi-Data-Engine/Api-Handler/src/main/java/org/stream/external/request/types/RequestManager.java b/DeFi-Data-Engine/Api-Handler/src/main/java/org/stream/external/request/types/RequestManager.java deleted file mode 100644 index 9f145b6d..00000000 --- a/DeFi-Data-Engine/Api-Handler/src/main/java/org/stream/external/request/types/RequestManager.java +++ /dev/null @@ -1,226 +0,0 @@ -package org.stream.external.request.types; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.lang.reflect.InvocationTargetException; -import java.net.URISyntaxException; -import java.util.HashMap; -import java.util.Properties; -import java.util.Set; - -import org.reflections.Reflections; -import org.reflections.util.ConfigurationBuilder; - -public class RequestManager { - - private static final HashMap> templates = new HashMap>(); - private static final HashMap requests = new HashMap(); - - public static void initialize() throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException, URISyntaxException, IOException { - // load all templates - Reflections reflection = new Reflections(new ConfigurationBuilder().forPackages(RequestManager.class.getPackageName())); - Set> types = reflection.getSubTypesOf(RequestFramework.class); - for(Class c : types) { - templates.put(c.getDeclaredConstructor().newInstance().getType(), c); - } - - // load all property files - File directory = new File("target/classes/requests/"); - if(!directory.isDirectory()) { - System.err.println("Missing /target/classes/requests/ directory."); - System.exit(1); - } - - String[] requests = directory.list(); - for(String r : requests) { - // create file - Properties p = new Properties(); - p.load(new FileInputStream(directory.getPath() + "/" + r)); - - // extract all properties and parse - String name = null; - String url = null; - String[] url_path = {}; - HashMap properties = new HashMap(); - HashMap headers = new HashMap(); - String recursive_type = null; - HashMap tags = new HashMap(); - String[] recursive_location = {}; - String recursive_replacement = null; - String[] path = {}; - boolean is_dated = false; - String date_location = null; - String date_start_var = null; - String date_end_var = null; - String date_format = null; - - // parse name - if(p.containsKey("request.name")) { - name = p.getProperty("request.name"); - } else { - System.err.println(String.format("Missing required property <%s>.", "request.name")); - System.exit(1); - } - - // parse url base - if(p.containsKey("url.base")) { - url = p.getProperty("url.base"); - } else { - System.err.println(String.format("Missing required property <%s>.", "url.base")); - System.exit(1); - } - - // parse url base properties - if(p.containsKey("url.base.path")) { - url_path = p.getProperty("url.base.path").split(","); - if(url_path.length % 2 != 0) { - System.err.println("Url path must be formatted with pairs."); - System.exit(1); - } - } - - // parse url properties - if(p.containsKey("url.properties")) { - String[] arr = p.getProperty("url.properties").split(","); - if(arr.length % 2 != 0) { - System.err.println("Each property must be a pair."); - System.exit(1); - } - - for(int i = 0; i < arr.length; i+=2) - properties.put(arr[i], arr[i + 1]); - } else { - System.err.println(String.format("Missing required property <%s>.", "url.properties")); - System.exit(1); - } - - // parse url headers - if(p.containsKey("url.headers")) { - String[] arr = p.getProperty("url.headers").split(","); - if(arr.length % 2 != 0) { - System.err.println("Each property must be a pair."); - System.exit(1); - } - - for(int i = 0; i < arr.length; i+=2) - headers.put(arr[i], arr[i + 1]); - } else { - System.err.println(String.format("Missing required property <%s>.", "url.headers")); - System.exit(1); - } - - // parse data path - if(p.containsKey("data.path")) { - path = p.getProperty("data.path").split(","); - } else { - System.err.println(String.format("Missing required property <%s>.", "data.path")); - System.exit(1); - } - - // parse recursion type - if(p.containsKey("recursion.type")) { - recursive_type = p.getProperty("recursion.type"); - } else { - System.err.println(String.format("Missing required property <%s>.", "url.recursive.type")); - System.exit(1); - } - - // parse recursion tags - if(p.containsKey("recursion.tags")) { - String[] arr = p.getProperty("recursion.tags").split(","); - if(arr.length % 2 != 0) { - System.err.println("Each property must be a pair."); - System.exit(1); - } - - for(int i = 0; i < arr.length; i+=2) - tags.put(arr[i], arr[i + 1]); - } - - // parse recursive location - if(p.containsKey("recursion.location")) { - recursive_location = p.getProperty("recursion.location").split(","); - } - - // parse recursive replacement location - if(p.containsKey("recursion.replacement")) { - recursive_replacement = p.getProperty("recursive.replacement"); - } - - // parse date valid - if(p.containsKey("date.valid")) { - try { - is_dated = Boolean.parseBoolean(p.getProperty("date.valid")); - } catch(Exception e) { - System.err.println("Property date.valid is not of type boolean."); - System.exit(1); - } - } else { - System.err.println(String.format("Missing required property <%s>.", "date.valid")); - System.exit(1); - } - - // parse date location - if(p.containsKey("date.location")) { - date_location = p.getProperty("date.location"); - } else if(!p.containsKey("date.location") && is_dated) { - System.err.println("Missing required property date.location if date.valid=true."); - System.exit(1); - } - - // parse date start - if(p.containsKey("date.start")) { - date_start_var = p.getProperty("date.start"); - } else if(!p.containsKey("date.start") && is_dated) { - System.err.println("Missing required property date.start if date.valid=true."); - System.exit(1); - } - - // parse date end - if(p.containsKey("date.end")) { - date_end_var = p.getProperty("date.end"); - } else if(!p.containsKey("date.end") && is_dated) { - System.err.println("Missing required property date.end if date.valid=true."); - System.exit(1); - } - - // parse date format - if(p.containsKey("date.format")) { - date_format = p.getProperty("date.format"); - } else if(!p.containsKey("date.format") && is_dated) { - System.err.println("Missing required property date.format if date.valid=true."); - System.exit(1); - } - - // validate templates contains proper key - if(!templates.containsKey(recursive_type)) { - System.err.println(String.format("Template not found for <%s>.", recursive_type)); - System.exit(1); - } - - // validate that duplicate request doesn't exist - if(RequestManager.requests.containsKey(name)) { - System.err.println(String.format("Duplicate name found <%s>. Please modify one of the names to be unique.", name)); - System.exit(1); - } - - RequestManager.requests.put(name, templates.get(recursive_type).getDeclaredConstructor( - String.class, String.class, String[].class, HashMap.class, HashMap.class, - HashMap.class, String[].class, String.class, String[].class, - boolean.class, String.class, String.class, String.class, String.class).newInstance( - name, url, url_path, properties, headers, tags, recursive_location, recursive_replacement, path, - is_dated, date_location, date_start_var, date_end_var, date_format)); - - System.out.println(String.format("Successfully added type [%s]", name)); - } - } - - public static final boolean hasRequestFormat(String name) { - return requests.containsKey(name); - } - - public static final RequestFramework getRequestFormat(String name) { - return requests.get(name); - } -} \ No newline at end of file diff --git a/DeFi-Data-Engine/Api-Handler/src/main/java/org/stream/external/request/types/RequestParameterized.java b/DeFi-Data-Engine/Api-Handler/src/main/java/org/stream/external/request/types/RequestParameterized.java deleted file mode 100644 index 20332884..00000000 --- a/DeFi-Data-Engine/Api-Handler/src/main/java/org/stream/external/request/types/RequestParameterized.java +++ /dev/null @@ -1,183 +0,0 @@ -package org.stream.external.request.types; - -import java.util.HashMap; - -import org.application.apihandler.ApiHandlerApplication; -import org.json.JSONArray; -import org.json.JSONObject; - -public class RequestParameterized extends RequestFramework { - - public RequestParameterized() { - super(); - } - - public RequestParameterized(String name, String url, String[] url_path, HashMap properties, HashMap headers, - HashMap tags, String[] recursive_location, String recursive_replacement, String[] path, - boolean is_dated, String date_location, String date_start_var, String date_end_var, String date_format) { - super(name, url, url_path, properties, headers, tags, recursive_location, recursive_replacement, path, - is_dated, date_location, date_start_var, date_end_var, date_format); - } - - @Override - public String getType() { - return "parameterized"; - } - - public String handle(String json, HashMap properties, HashMap headers) { - // parse json formatting - JSONObject obj = new JSONObject(json); - - // validate all required parameters are present: - // check for required tag -l - if(!hasTag("-l")) { - System.err.println(String.format("Missing required recursive parameter <-l>")); - return "Missing required recursive parameter <-l>"; - } - - // check for required tag -t - if(!hasTag("-t")) { - System.err.println(String.format("Missing required recursive parameter <-t>")); - return "Missing required recursive parameter <-t>"; - } - - // check for -l being an integer - int limit = 0; - try { - limit = Integer.parseInt(getTag("-l")); - } catch(Exception e) { - e.printStackTrace(); - System.err.println(String.format("Value following <-l> must be an integer.")); - return "Value following <-l> must be an integer."; - } - - // validate that recursion location is valid - // should exist within json if url or static - // should exist within properties if type incremental - String recursive_parameter = null; - if(getTag("-t").equals("url") || getTag("-t").equals("static")) { - JSONObject base = obj; - String[] location = getRecursiveLocation(); - for(int i = 0; i < location.length - 1; i++) { - if(base.has(location[i])) { - base = base.getJSONObject(location[i]); - } else { - System.err.println("Response does not contain proper recursive parameter location at: " + location[i]); - return "Response does not contain proper recursive parameter location at: " + location[i]; - } - } - - recursive_parameter = base.get(location[location.length - 1]).toString(); - } - - else if(getTag("-t").equals("incremental")) { - if(!properties.containsKey(getRecursiveLocation()[0])) { - System.err.println("Properties do not contain incremental parameter listed in: " + getRecursiveLocation()[0]); - return "Properties do not contain incremental parameter listed in: " + getRecursiveLocation()[0]; - } - - recursive_parameter = properties.get(getRecursiveLocation()[0]); - } - - // validate that recursive parameter has been set - if(recursive_parameter == null) { - System.err.println("Fatal error. Recursive parameter is null after successful initialization."); - return "Fatal error. Recursive parameter is null after successful initialization."; - } - - - // validate that the base has the proper obj path - String[] path = getPath(); - JSONArray data = null; - for(int i = 0; i < path.length; i++) { - if(i == path.length - 1) { - if(obj.has(path[i])) { - try { - data = obj.getJSONArray(path[i]); - } catch(Exception e) { - System.err.println("obj path type is not of type . Cannot parse."); - return "obj path type is not of type . Cannot parse."; - } - } - } - - else if(obj.has(path[i])) { - try { - obj = obj.getJSONObject(path[i]); - } catch(Exception e) { - System.err.println("obj path type step is not of type . Cannot parse."); - return "obj path type step is not of type . Cannot parse."; - } - } - } - - // validate that data is non-empty - if(data == null) { - System.err.println("Data array retrieval had fatal error, killing process."); - return "Data array retrieval had fatal error, killing process."; - } - - // extract and print data - for(int i = 0; i < data.length(); i++) { - HashMap point = parse(data.getJSONObject(i)); - ApiHandlerApplication.output(this.getName(), point); - } - - // initiate recursive call - // if under limit requested, terminate call - if(data.length() < limit) - return null; - - // extract recursive parameter and apply to next call - String rec_type = getTag("-t"); - String url = getUrl(); - switch(rec_type) { - - // type url: - // - clear properties and set base to extracted url - // - execute - case "url": - properties.clear(); - url = recursive_parameter; - return processUrl(url, headers); - - // type incremental: - // - assert that parameter is an integer - // - increment parameter and update - // - execute - case "incremental": - int param = -1; - try { - param = Integer.parseInt(recursive_parameter); - } catch(Exception e) { - e.printStackTrace(); - System.err.println(String.format("Recursive parameter <%s> is not of type integer.", recursive_parameter)); - return String.format("Recursive parameter <%s> is not of type integer.", recursive_parameter); - } - - if(param == -1) { - System.err.println("Fatal parsing error occured."); - return "Fatal parsing error occured."; - } - - param += 1; - properties.put(getRecursiveLocation()[0], "" + param); - break; - - // type static: - // - check to see if replacement location exists - // - if so update replacement - // - execute - case "static": - if(getRecursiveReplacement() != null) { - properties.put(getRecursiveReplacement(), recursive_parameter); - } else { - properties.put(getRecursiveLocation()[0], recursive_parameter); - } - break; - } - - // increment param, replace, and execute - return process(url, properties, headers); - } -} \ No newline at end of file diff --git a/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-aave-governance.properties b/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-aave-governance.properties deleted file mode 100644 index 394e20c3..00000000 --- a/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-aave-governance.properties +++ /dev/null @@ -1,28 +0,0 @@ -request.name= amberdata-aave-governance - -url.base= https://web3api.io/api/v2/defi/lending/aavev3/governance - -url.properties= size,900 - -url.headers= accept,application/json,\ - x-api-key,. - -data.path= payload,\ - data - -recursion.type= parameterized - -recursion.tags= -l,900,\ - -t,url - -recursion.location= payload,metadata,next - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-aave-protocol.properties b/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-aave-protocol.properties deleted file mode 100644 index cf803956..00000000 --- a/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-aave-protocol.properties +++ /dev/null @@ -1,29 +0,0 @@ -request.name= amberdata-aave-protocol - -url.base= https://web3api.io/api/v2/defi/lending/aavev3/protocol - -url.properties= size,900 - -url.headers= accept,application/json,\ - x-amberdata-blockchain-id,polygon-mainnet,\ - x-api-key,. - -data.path= payload,\ - data - -recursion.type= parameterized - -recursion.tags= -l,900,\ - -t,url - -recursion.location= payload,metadata,next - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-blockchain-addresses.properties b/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-blockchain-addresses.properties deleted file mode 100644 index 823fad7a..00000000 --- a/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-blockchain-addresses.properties +++ /dev/null @@ -1,30 +0,0 @@ -request.name= amberdata-blockchain-addresses - -url.base= https://web3api.io/api/v2/addresses - -url.properties= page,0,\ - size,900 - -url.headers= accept,application/json,\ - x-amberdata-blockchain-id,ethereum-mainnet,\ - x-api-key,. - -data.path= payload,\ - records - -recursion.type= parameterized - -recursion.tags= -l,900,\ - -t,incremental - -recursion.location= page - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-compound-protocol.properties b/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-compound-protocol.properties deleted file mode 100644 index c7a78364..00000000 --- a/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-compound-protocol.properties +++ /dev/null @@ -1,28 +0,0 @@ -request.name= amberdata-compound-protocol - -url.base= https://web3api.io/api/v2/defi/lending/compoundv2/protocol - -url.properties= size,900 - -url.headers= accept,application/json,\ - x-api-key,. - -data.path= payload,\ - data - -recursion.type= parameterized - -recursion.tags= -l,900,\ - -t,url - -recursion.location= payload,metadata,next - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-makerdao-asset.properties b/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-makerdao-asset.properties deleted file mode 100644 index 385c25c4..00000000 --- a/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-makerdao-asset.properties +++ /dev/null @@ -1,31 +0,0 @@ -request.name= amberdata-makerdao-asset - -url.base= https://web3api.io/api/v2/defi/lending/makerdao/assets - -url.base.path= asset,. - -url.properties= size,900 - -url.headers= accept,application/json,\ - x-amberdata-blockchain-id,ethereum-mainnet,\ - x-api-key,. - -data.path= payload,\ - data - -recursion.type= parameterized - -recursion.tags= -l,900,\ - -t,url - -recursion.location= payload,metadata,next - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-makerdao-protocol.properties b/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-makerdao-protocol.properties deleted file mode 100644 index 37d841e4..00000000 --- a/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-makerdao-protocol.properties +++ /dev/null @@ -1,29 +0,0 @@ -request.name= amberdata-makerdao-protocol - -url.base= https://web3api.io/api/v2/defi/lending/makerdao/protocol - -url.properties= size,900 - -url.headers= accept,application/json,\ - x-amberdata-blockchain-id,ethereum-mainnet,\ - x-api-key,. - -data.path= payload,\ - data - -recursion.type= parameterized - -recursion.tags= -l,900,\ - -t,url - -recursion.location= payload,metadata,next - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-makerdao-wallet.properties b/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-makerdao-wallet.properties deleted file mode 100644 index 0669c075..00000000 --- a/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-makerdao-wallet.properties +++ /dev/null @@ -1,30 +0,0 @@ -request.name= amberdata-makerdao-wallet - -url.base= https://web3api.io/api/v2/defi/lending/makerdao/wallets - -url.base.path= walletAddress,. - -url.properties= size,900 - -url.headers= accept,application/json,\ - x-api-key,. - -data.path= payload,\ - data - -recursion.type= parameterized - -recursion.tags= -l,900,\ - -t,url - -recursion.location= payload,metadata,next - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-uniswap-pool.properties b/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-uniswap-pool.properties deleted file mode 100644 index 26c80cf1..00000000 --- a/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/amberdata-uniswap-pool.properties +++ /dev/null @@ -1,30 +0,0 @@ -request.name= amberdata-uniswap-pool - -url.base= https://web3api.io/api/v2/defi/dex/uniswapv2/pools - -url.base.path= poolAddress,. - -url.properties= size,900 - -url.headers= accept,application/json,\ - x-api-key,. - -data.path= payload,\ - data - -recursion.type= parameterized - -recursion.tags= -l,900,\ - -t,url - -recursion.location= payload,metadata,next - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/graph-reserve-params-hist-items.properties b/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/graph-reserve-params-hist-items.properties deleted file mode 100644 index 9b30bffb..00000000 --- a/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/graph-reserve-params-hist-items.properties +++ /dev/null @@ -1,58 +0,0 @@ -request.name= graph-reserve-params-hist-items - -url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 - -url.properties= method,reserveParamsHistoryItems,\ - values,\ - id:\ - reserve{id}:\ - variableBorrowRate:\ - variableBorrowIndex:\ - utilizationRate:\ - stableBorrowRate:\ - averageStableBorrowRate:\ - liquidityIndex:\ - liquidityRate:\ - totalLiquidity:\ - totalATokenSupply:\ - totalLiquidityAsCollateral:\ - availableLiquidity:\ - priceInEth:\ - priceInUsd:\ - timestamp:\ - totalScaledVariableDebt:\ - totalCurrentVariableDebt:\ - totalPrincipalStableDebt:\ - lifetimePrincipalStableDebt:\ - lifetimeScaledVariableDebt:\ - lifetimeCurrentVariableDebt:\ - lifetimeLiquidity:\ - lifetimeRepayments:\ - lifetimeWithdrawals:\ - lifetimeBorrows:\ - lifetimeLiquidated:\ - lifetimeFlashLoans:\ - lifetimeFlashLoanPremium:\ - lifetimeReserveFactorAccrued:\ - lifetimeDepositorsInterestEarned - -url.headers= Content-Type,application/json - -data.path= data,\ - reserveParamsHistoryItems - -recursion.type= graphql - -recursion.tags= -l,1000 - -recursion.location= timestamp - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/graph-users.properties b/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/graph-users.properties deleted file mode 100644 index b1cb27a6..00000000 --- a/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/graph-users.properties +++ /dev/null @@ -1,32 +0,0 @@ -request.name= graph-users - -url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 - -url.properties= method,users,\ - values,\ - id:\ - borrowedReservesCount:\ - unclaimedRewards:\ - lifetimeRewards:\ - incentivesLastUpdated - -url.headers= Content-Type,application/json - -data.path= data,\ - users - -recursion.type= graphql - -recursion.tags= -l,1000 - -recursion.location= id - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/template.properties b/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/template.properties deleted file mode 100644 index fcd8b2dc..00000000 --- a/DeFi-Data-Engine/Api-Handler/src/main/resources/requests/template.properties +++ /dev/null @@ -1,142 +0,0 @@ -# === Required Properties === -# These properties are required regardless of the request and should maintain a uniform syntax. - -# [REQUIRED] -# Name of the call to be referenced in the engine -request.name= template - -# [REQUIRED] -# Base url of the REST API call -url.base= http://localhost:8080 - -# [OPTIONAL] -# Url PATH properties that are required for parsing of the system. For example, if the url is -# https://localhost:8080/api/v1// where asset is dictated by the parameter 'asset', -# then this variable will be set to 'asset,.' Note all properties are in sequential order, such that -# asset must be defined before value. -url.base.path= asset,.,\ - value,. - -# [REQUIRED] -# This property details all required properties to be passed on runtime when called. Optional -# properties are not required to be specified here. Note that properties can be given a default -# value or can be forced to be specified. The list is in (, ) pairs, with each property -# having both a key and value specified. Default values can be placed in the property. -# Key's with no default property that are required on runtime can be filled as '.'. In this example -# has the default value , is required on runtime, and -# has the default value . -url.properties= property1,value1,\ - property2,.,\ - property3,value3 - -# [REQUIRED] -# This property details all headers to be passed on runtime when generating the request. -# Optional headers can be passed on runtime and are not required to be specified here. Note -# that headers can be given a default value or can be forced to be specified. The list is in -# (, ) pairs, with each property having both a key and value specified. Default -# values can be placed in the property. Key's with no default property that are required -# on runtime can be filled as '.'. In this example has the default value , -# and headers and are required on runtime. -url.headers= header1,value1,\ - header2,.,\ - header3,. - -# [REQUIRED] -# This property sets the location of the data points to be retrieved from the call. This -# should be a JSONArray which the handler can iterate through. To access these data points -# directly, the direct path must be specified (consisting of all JSONObject values). In -# the example below, we point to the path located at response->data. Note that for storing -# all non-array values and just recording all base values returned by the call, please set -# the value of this variable to '-b'. (i.e. url.data.path=-b) -data.path= response,\ - data - -# [REQUIRED] -# This property determines if the call is recursive, meaning that all data points required -# cannot be obtained in a single request. There are several integrated recursive types -# which have specific properties and handlers. Please review documentation to get a full -# list of these tags. To default with no recursive call, set this property to . -# This property we will set to for a clearer example. -recursion.type= parameterized - -# [OPTIONAL]: -# - url.recursion.type = static -# [REQUIRED]: -# - url.recursion.type = parameterized -# This property sets all tags pertaining to the type of recursive call. Please refer to -# the documentation for the full list of all tags and specified recursive types. All tags -# are in (, ) pairs, with each property having both a key and value specified. -# Should a tag not require an accompanying , please set it to '.'. In this -# example we will set the tags for which are as follows: -# -l: limit on items from request -# -t: type of recursive parameter (url, incremental, static) -recursion.tags= -l,1000,\ - -t,url - -# [OPTIONAL]: -# - url.recursion.type = static -# [REQUIRED]: -# - url.recursion.type = parameterized -# This property sets the recurisve parameters location within the response. Should '-t' in -# url.recursion.tags be of type 'incremental', this property should be the property to be -# incremented in the url. Otherwise if it is of type 'url' or 'static', point to the exact -# location in the response which will retrieve this property. For example if the next url -# is contained in: -# { -# "payload": { -# "metadata": { -# "next": "https://..." -# } -# } -# } -# this property would be set to 'payload,metadata,next'. For properties with no recursive call -# (with recursion type 'single') this parameter can remain blank. -recursion.location= payload,metadata,next - -# [OPTIONAL]: -# - url.recursion.type = static -# [REQUIRED]: -# - url.recursion.type = parameterized -# If the property defined in url.recursion.location is not the same as the property to replace -# in the url, define it here. If they are the same, this property can remain blank. This property -# will primarily be used if url.recursion.tags '-t' is set to 'static'. For '-t' being set to -# 'url', this property can remain blank. -recursion.replacement= - -# [REQUIRED] -# This parameter is used to determine whether the protocol can be dated or not. If so, the following -# properties are required: date.location, date.start, date.end, and date.format. -date.valid= true - -# [OPTIONAL]: -# - date.enable = false -# [REQUIRED]: -# - date.enable = true -# This property tells the location of the date variable, whether in the 'properties' or 'header' (note add -# path at a later date). This property will default to properties. -date.location= properties - -# [OPTIONAL]: -# - date.enable = false -# [REQUIRED]: -# - date.enable = true -# This property tells what key value will point to the start date variable. This is required and if no -# end date is required, use this as the primary date. -date.start= startDate - -# [OPTIONAL]: -# - date.enable = false -# [REQUIRED]: -# - date.enable = true -# This property tells what key value will point to the end date variable. This is not required if there -# is only one variable needed to reference the date. If so, set this value to '.' -date.end= endDate - -# [OPTIONAL]: -# - date.enable = false -# [REQUIRED]: -# - date.enable = true -# This property states the format for the date to be pushed to the parameter. Note this value will be extracted -# from the original call (which will be of the form yyyy-MM-dd and will always default to midnight should a time -# be required). -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/Api-Handler/src/test/java/test/sample/TestGraphGL.java b/DeFi-Data-Engine/Api-Handler/src/test/java/test/sample/TestGraphGL.java deleted file mode 100644 index df099436..00000000 --- a/DeFi-Data-Engine/Api-Handler/src/test/java/test/sample/TestGraphGL.java +++ /dev/null @@ -1,61 +0,0 @@ -package test.sample; - -import java.io.IOException; -import java.net.URI; -import java.net.http.HttpClient; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.time.LocalDate; -import java.time.format.DateTimeFormatter; - -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -public class TestGraphGL { - -// public static void main(String[] args) throws IOException, InterruptedException { -// execute(); -// } - - public static void execute() throws IOException, InterruptedException, JSONException { - // utc to epoch - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); - LocalDate date = LocalDate.parse("2023-01-01", formatter); - LocalDate tmr = date.plusDays(1); - long s_epoch = date.toEpochDay() * 86400L; - long e_epoch = tmr.toEpochDay() * 86400L; - - String query = String.format("query {reserveParamsHistoryItems(first:1000 orderBy: timestamp where: {timestamp_gt:%d, timestamp_lt:%d}){id, timestamp}}", s_epoch, e_epoch); - - // Define the GraphQL endpoint URL - String url = "https://api.thegraph.com/subgraphs/name/aave/protocol-v2"; - - // Create an HTTP client - HttpClient httpClient = HttpClient.newHttpClient(); - - // Create an HTTP request with POST method and JSON payload - HttpRequest request = HttpRequest.newBuilder() - .uri(URI.create(url)) - .header("Content-Type", "application/json") - .POST(HttpRequest.BodyPublishers.ofString("{\"query\":\"" + query + "\"}")) - .build(); - - // Send the HTTP request and get the response - HttpResponse response = httpClient.send(request, HttpResponse.BodyHandlers.ofString()); - - // Check if the request was successful (status code 200) - if (response.statusCode() == 200) { - // Extract the response body as JSON - String responseBody = response.body(); - // Process the response body as needed - JSONObject obj = new JSONObject(responseBody); - JSONObject data = obj.getJSONObject("data"); - JSONArray reserve = data.getJSONArray("reserveParamsHistoryItems"); - System.out.println(reserve.get(1).toString()); - } else { - // Print an error message if the request failed - System.out.println("GraphQL request failed with status code: " + response.statusCode()); - } - } -} \ No newline at end of file diff --git a/DeFi-Data-Engine/Api-Handler/target/classes/requests/template.properties b/DeFi-Data-Engine/Api-Handler/target/classes/requests/template.properties deleted file mode 100644 index fcd8b2dc..00000000 --- a/DeFi-Data-Engine/Api-Handler/target/classes/requests/template.properties +++ /dev/null @@ -1,142 +0,0 @@ -# === Required Properties === -# These properties are required regardless of the request and should maintain a uniform syntax. - -# [REQUIRED] -# Name of the call to be referenced in the engine -request.name= template - -# [REQUIRED] -# Base url of the REST API call -url.base= http://localhost:8080 - -# [OPTIONAL] -# Url PATH properties that are required for parsing of the system. For example, if the url is -# https://localhost:8080/api/v1// where asset is dictated by the parameter 'asset', -# then this variable will be set to 'asset,.' Note all properties are in sequential order, such that -# asset must be defined before value. -url.base.path= asset,.,\ - value,. - -# [REQUIRED] -# This property details all required properties to be passed on runtime when called. Optional -# properties are not required to be specified here. Note that properties can be given a default -# value or can be forced to be specified. The list is in (, ) pairs, with each property -# having both a key and value specified. Default values can be placed in the property. -# Key's with no default property that are required on runtime can be filled as '.'. In this example -# has the default value , is required on runtime, and -# has the default value . -url.properties= property1,value1,\ - property2,.,\ - property3,value3 - -# [REQUIRED] -# This property details all headers to be passed on runtime when generating the request. -# Optional headers can be passed on runtime and are not required to be specified here. Note -# that headers can be given a default value or can be forced to be specified. The list is in -# (, ) pairs, with each property having both a key and value specified. Default -# values can be placed in the property. Key's with no default property that are required -# on runtime can be filled as '.'. In this example has the default value , -# and headers and are required on runtime. -url.headers= header1,value1,\ - header2,.,\ - header3,. - -# [REQUIRED] -# This property sets the location of the data points to be retrieved from the call. This -# should be a JSONArray which the handler can iterate through. To access these data points -# directly, the direct path must be specified (consisting of all JSONObject values). In -# the example below, we point to the path located at response->data. Note that for storing -# all non-array values and just recording all base values returned by the call, please set -# the value of this variable to '-b'. (i.e. url.data.path=-b) -data.path= response,\ - data - -# [REQUIRED] -# This property determines if the call is recursive, meaning that all data points required -# cannot be obtained in a single request. There are several integrated recursive types -# which have specific properties and handlers. Please review documentation to get a full -# list of these tags. To default with no recursive call, set this property to . -# This property we will set to for a clearer example. -recursion.type= parameterized - -# [OPTIONAL]: -# - url.recursion.type = static -# [REQUIRED]: -# - url.recursion.type = parameterized -# This property sets all tags pertaining to the type of recursive call. Please refer to -# the documentation for the full list of all tags and specified recursive types. All tags -# are in (, ) pairs, with each property having both a key and value specified. -# Should a tag not require an accompanying , please set it to '.'. In this -# example we will set the tags for which are as follows: -# -l: limit on items from request -# -t: type of recursive parameter (url, incremental, static) -recursion.tags= -l,1000,\ - -t,url - -# [OPTIONAL]: -# - url.recursion.type = static -# [REQUIRED]: -# - url.recursion.type = parameterized -# This property sets the recurisve parameters location within the response. Should '-t' in -# url.recursion.tags be of type 'incremental', this property should be the property to be -# incremented in the url. Otherwise if it is of type 'url' or 'static', point to the exact -# location in the response which will retrieve this property. For example if the next url -# is contained in: -# { -# "payload": { -# "metadata": { -# "next": "https://..." -# } -# } -# } -# this property would be set to 'payload,metadata,next'. For properties with no recursive call -# (with recursion type 'single') this parameter can remain blank. -recursion.location= payload,metadata,next - -# [OPTIONAL]: -# - url.recursion.type = static -# [REQUIRED]: -# - url.recursion.type = parameterized -# If the property defined in url.recursion.location is not the same as the property to replace -# in the url, define it here. If they are the same, this property can remain blank. This property -# will primarily be used if url.recursion.tags '-t' is set to 'static'. For '-t' being set to -# 'url', this property can remain blank. -recursion.replacement= - -# [REQUIRED] -# This parameter is used to determine whether the protocol can be dated or not. If so, the following -# properties are required: date.location, date.start, date.end, and date.format. -date.valid= true - -# [OPTIONAL]: -# - date.enable = false -# [REQUIRED]: -# - date.enable = true -# This property tells the location of the date variable, whether in the 'properties' or 'header' (note add -# path at a later date). This property will default to properties. -date.location= properties - -# [OPTIONAL]: -# - date.enable = false -# [REQUIRED]: -# - date.enable = true -# This property tells what key value will point to the start date variable. This is required and if no -# end date is required, use this as the primary date. -date.start= startDate - -# [OPTIONAL]: -# - date.enable = false -# [REQUIRED]: -# - date.enable = true -# This property tells what key value will point to the end date variable. This is not required if there -# is only one variable needed to reference the date. If so, set this value to '.' -date.end= endDate - -# [OPTIONAL]: -# - date.enable = false -# [REQUIRED]: -# - date.enable = true -# This property states the format for the date to be pushed to the parameter. Note this value will be extracted -# from the original call (which will be of the form yyyy-MM-dd and will always default to midnight should a time -# be required). -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/.classpath b/DeFi-Data-Engine/DeFi Data Engine/.classpath deleted file mode 100644 index 2f837501..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/.classpath +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/.gitignore b/DeFi-Data-Engine/DeFi Data Engine/.gitignore deleted file mode 100644 index 09e3bc9b..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/bin/ -/target/ diff --git a/DeFi-Data-Engine/DeFi Data Engine/.project b/DeFi-Data-Engine/DeFi Data Engine/.project deleted file mode 100644 index db405e9e..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - DeFi-Data-Engine - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/.settings/org.eclipse.jdt.apt.core.prefs b/DeFi-Data-Engine/DeFi Data Engine/.settings/org.eclipse.jdt.apt.core.prefs deleted file mode 100644 index d4313d4b..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/.settings/org.eclipse.jdt.apt.core.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.apt.aptEnabled=false diff --git a/DeFi-Data-Engine/DeFi Data Engine/.settings/org.eclipse.jdt.core.prefs b/DeFi-Data-Engine/DeFi Data Engine/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index b5e07ce6..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,17 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.processAnnotations=disabled -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/DeFi-Data-Engine/DeFi Data Engine/.settings/org.eclipse.m2e.core.prefs b/DeFi-Data-Engine/DeFi Data Engine/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/DeFi-Data-Engine/DeFi Data Engine/Dockerfile b/DeFi-Data-Engine/DeFi Data Engine/Dockerfile deleted file mode 100644 index 971effa7..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM maven:3.8.6-eclipse-temurin-17 -COPY ./ ./ -RUN mvn clean compile assembly:single -Dmaven.skip.test=true -CMD ["java", "-jar", "target/defi-data-engine-0.0.1-jar-with-dependencies.jar"] \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/README b/DeFi-Data-Engine/DeFi Data Engine/README deleted file mode 100644 index b93164ba..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/README +++ /dev/null @@ -1 +0,0 @@ -(View https://github.rpi.edu/DataINCITE/IDEA-DeFi-CRAFT/wiki for more information) \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/allclasses-index.html b/DeFi-Data-Engine/DeFi Data Engine/doc/allclasses-index.html deleted file mode 100644 index e37de997..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/allclasses-index.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - -All Classes and Interfaces - - - - - - - - - - - - - - - -
- -
-
-
-

All Classes and Interfaces

-
-
-
-
-
-
Class
-
Description
- -
 
- -
 
- -
 
- -
 
- -
 
- -
 
- -
-
The ExternalStreamManager is a class which handles all - external stream connections and requests.
-
- -
-
Interface used for requiring components to have a unique hash based on the passed data.
-
- -
 
- -
 
- -
 
- -
 
- -
-
LogSeverity is a enum class used by all processes that interact - with the Logger class.
-
- -
 
- -
-
The Manager class is used to handle all Router connections.
-
- -
 
- -
 
- -
 
- -
-
The Packet class represents a standardized data transfer object - used throughout the engine.
-
- -
-
The Response class is used to relay information from a - given Packet sent through a Router.
-
- -
 
- -
-
The Router is a super class that every process inherits.
-
- -
 
- -
 
- -
 
- -
 
- -
 
- -
 
- -
 
- -
 
- -
 
- -
 
- -
 
- -
 
- -
 
- -
 
- -
 
- -
 
- -
 
- -
-
The UUID interface is used for requiring reflected classes to have a unique id that - they can be referenced by.
-
-
-
-
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/allpackages-index.html b/DeFi-Data-Engine/DeFi Data Engine/doc/allpackages-index.html deleted file mode 100644 index 26b21919..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/allpackages-index.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - -All Packages - - - - - - - - - - - - - - - - - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/deprecated-list.html b/DeFi-Data-Engine/DeFi Data Engine/doc/deprecated-list.html deleted file mode 100644 index 67865a72..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/deprecated-list.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - -Deprecated List - - - - - - - - - - - - - - - -
- -
-
-
-

Deprecated API

-

Contents

- -
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/element-list b/DeFi-Data-Engine/DeFi Data Engine/doc/element-list deleted file mode 100644 index c5cb3642..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/element-list +++ /dev/null @@ -1,17 +0,0 @@ -org.core.core -org.core.engine -org.core.logger -org.framework.interfaces -org.framework.router -org.main -org.out.controller -org.out.handler -org.stream.external.connected.connections -org.stream.external.handler -org.stream.local.connected.connections -org.stream.local.handler -org.stream.manager -org.stream.registry -test.framework.router -test.protocols -test.speed diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/help-doc.html b/DeFi-Data-Engine/DeFi Data Engine/doc/help-doc.html deleted file mode 100644 index 27448886..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/help-doc.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - -API Help - - - - - - - - - - - - - - - -
- -
-
-

JavaDoc Help

- -
-
-

Navigation

-Starting from the Overview page, you can browse the documentation using the links in each page, and in the navigation bar at the top of each page. The Index and Search box allow you to navigate to specific declarations and summary pages, including: All Packages, All Classes and Interfaces - -
-
-
-

Kinds of Pages

-The following sections describe the different kinds of pages in this collection. -
-

Overview

-

The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

-
-
-

Package

-

Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:

-
    -
  • Interfaces
  • -
  • Classes
  • -
  • Enum Classes
  • -
  • Exceptions
  • -
  • Errors
  • -
  • Annotation Interfaces
  • -
-
-
-

Class or Interface

-

Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.

-
    -
  • Class Inheritance Diagram
  • -
  • Direct Subclasses
  • -
  • All Known Subinterfaces
  • -
  • All Known Implementing Classes
  • -
  • Class or Interface Declaration
  • -
  • Class or Interface Description
  • -
-
-
    -
  • Nested Class Summary
  • -
  • Enum Constant Summary
  • -
  • Field Summary
  • -
  • Property Summary
  • -
  • Constructor Summary
  • -
  • Method Summary
  • -
  • Required Element Summary
  • -
  • Optional Element Summary
  • -
-
-
    -
  • Enum Constant Details
  • -
  • Field Details
  • -
  • Property Details
  • -
  • Constructor Details
  • -
  • Method Details
  • -
  • Element Details
  • -
-

Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.

-

The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

-
-
-

Other Files

-

Packages and modules may contain pages with additional information related to the declarations nearby.

-
-
-

Use

-

Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the USE link in the navigation bar.

-
-
-

Tree (Class Hierarchy)

-

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.

-
    -
  • When viewing the Overview page, clicking on TREE displays the hierarchy for all packages.
  • -
  • When viewing a particular package, class or interface page, clicking on TREE displays the hierarchy for only that package.
  • -
-
-
-

Deprecated API

-

The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to shortcomings, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

-
-
-

All Packages

-

The All Packages page contains an alphabetic index of all packages contained in the documentation.

-
-
-

All Classes and Interfaces

-

The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.

-
-
-

Index

-

The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.

-
-
-
-This help file applies to API documentation generated by the standard doclet.
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-1.html b/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-1.html deleted file mode 100644 index 7dc661f2..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-1.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - -A-Index - - - - - - - - - - - - - - - -
- -
-
-
-

Index

-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages -

A

-
-
active - Variable in class org.stream.external.connected.connections.TemplateConnection
-
 
-
addProcess(String, Method) - Method in class org.framework.router.Router
-
-
Adds a process to the Router object under the given subtag.
-
-
addRequestType(String) - Method in class org.stream.external.handler.ExternalStreamConnection
-
 
-
addRequestType(String) - Method in class org.stream.local.handler.LocalStreamConnection
-
 
-
addStream(String, String) - Method in class org.stream.external.handler.ExternalStreamManager
-
-
Adds a new stream of the given type to the manager.
-
-
addStream(String, String) - Method in class org.stream.local.handler.LocalStreamManager
-
 
-
addSubscriptionType(String) - Method in class org.stream.external.handler.ExternalStreamConnection
-
 
-
AmberDataConnection - Class in org.stream.external.connected.connections
-
 
-
AmberDataConnection(ExternalStreamManager, String) - Constructor for class org.stream.external.connected.connections.AmberDataConnection
-
 
-
authorize() - Method in class org.stream.external.connected.connections.AmberDataConnection
-
 
-
authorize() - Method in class org.stream.external.connected.connections.TemplateConnection
-
 
-
authorize() - Method in class org.stream.external.handler.ExternalStreamConnection
-
 
-
authorize() - Method in class org.stream.local.handler.LocalStreamConnection
-
 
-
authorized - Variable in class org.stream.external.connected.connections.TemplateConnection
-
 
-
authorizeStream(String) - Method in class org.stream.external.handler.ExternalStreamManager
-
-
Authorizes a stream for execution.
-
-
authorizeStream(String) - Method in class org.stream.local.handler.LocalStreamManager
-
 
-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-10.html b/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-10.html deleted file mode 100644 index 884dc93f..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-10.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - -M-Index - - - - - - - - - - - - - - - -
- -
-
-
-

Index

-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages -

M

-
-
main(String[]) - Static method in class org.main.Main
-
 
-
main(String[]) - Static method in class test.speed.TestRouterSendSpeed
-
 
-
Main - Class in org.main
-
 
-
Main() - Constructor for class org.main.Main
-
 
-
manager - Variable in class org.framework.router.Router
-
 
-
manager - Variable in class org.stream.external.handler.ExternalStreamConnection
-
 
-
manager - Variable in class org.stream.external.handler.ExternalStreamHandler
-
 
-
manager - Variable in class org.stream.local.handler.LocalStreamConnection
-
 
-
Manager - Class in org.framework.router
-
-
The Manager class is used to handle all Router connections.
-
-
Manager() - Constructor for class org.framework.router.Manager
-
-
Private constructor used to create a new Manager object.
-
-
message - Variable in class org.framework.router.Response
-
 
-
message() - Method in class org.framework.router.Response
-
-
Response message which is used for containing more detailed information about the - response code if necessary.
-
-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-11.html b/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-11.html deleted file mode 100644 index 3afb16c8..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-11.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - -N-Index - - - - - - - - - - - - - - - -
- -
-
-
-

Index

-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages -

N

-
-
num - Variable in class test.framework.router.RouterTemplate
-
 
-
num - Variable in class test.speed.RouterTemplate
-
 
-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-12.html b/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-12.html deleted file mode 100644 index 0c24512d..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-12.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - -O-Index - - - - - - - - - - - - - - - -
- -
-
-
-

Index

-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages -

O

-
-
org.core.core - package org.core.core
-
 
-
org.core.engine - package org.core.engine
-
 
-
org.core.logger - package org.core.logger
-
 
-
org.framework.interfaces - package org.framework.interfaces
-
 
-
org.framework.router - package org.framework.router
-
 
-
org.main - package org.main
-
 
-
org.out.controller - package org.out.controller
-
 
-
org.out.handler - package org.out.handler
-
 
-
org.stream.external.connected.connections - package org.stream.external.connected.connections
-
 
-
org.stream.external.handler - package org.stream.external.handler
-
 
-
org.stream.local.connected.connections - package org.stream.local.connected.connections
-
 
-
org.stream.local.handler - package org.stream.local.handler
-
 
-
org.stream.manager - package org.stream.manager
-
 
-
org.stream.registry - package org.stream.registry
-
 
-
OutputHandler - Class in org.out.handler
-
 
-
OutputHandler() - Constructor for class org.out.handler.OutputHandler
-
 
-
OutputLiveConnection - Class in org.out.handler
-
 
-
OutputLiveConnection() - Constructor for class org.out.handler.OutputLiveConnection
-
 
-
OutputStaticConnection - Class in org.out.handler
-
 
-
OutputStaticConnection() - Constructor for class org.out.handler.OutputStaticConnection
-
 
-
override - Variable in class org.stream.external.connected.connections.TemplateConnection
-
 
-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-13.html b/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-13.html deleted file mode 100644 index 1991d11c..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-13.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - -P-Index - - - - - - - - - - - - - - - -
- -
-
-
-

Index

-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages -

P

-
-
packet(Router, String, String, String) - Static method in class org.framework.router.Packet
-
-
Factory method used to create a Packet object.
-
-
Packet - Class in org.framework.router
-
-
The Packet class represents a standardized data transfer object - used throughout the engine.
-
-
Packet(Router, String, String, String) - Constructor for class org.framework.router.Packet
-
-
Initializes a new Packet object.
-
-
process(String, String) - Method in class org.stream.external.handler.ExternalStreamConnection
-
 
-
process(String, String) - Method in class org.stream.local.handler.LocalStreamConnection
-
 
-
process(String, String, String) - Method in class org.stream.external.handler.ExternalStreamManager
-
-
Function used for processing external data and sending it to the output handler.
-
-
process(String, String, String) - Method in class org.stream.local.handler.LocalStreamManager
-
 
-
process(Packet) - Method in class org.framework.router.Router
-
-
Function used to handle incoming Packet objects.
-
-
process1(Packet) - Method in class test.framework.router.Router1
-
 
-
process1(Packet) - Method in class test.framework.router.Router2
-
 
-
process1(Packet) - Method in class test.framework.router.RouterTemp
-
 
-
process1(Packet) - Method in class test.framework.router.RouterTemplate
-
 
-
process1(Packet) - Method in class test.framework.router.TestPacketRouter
-
 
-
process1(Packet) - Method in class test.speed.RouterTemplate
-
 
-
processEDAT(Packet) - Method in class org.out.handler.OutputHandler
-
 
-
processEDAT(Packet) - Method in class org.stream.registry.StreamRegistryController
-
 
-
processes - Variable in class org.framework.router.Router
-
 
-
processEXEC(Packet) - Method in class org.stream.external.handler.ExternalStreamHandler
-
 
-
processEXEC(Packet) - Method in class org.stream.registry.StreamRegistryController
-
 
-
processEXSR(Packet) - Method in class org.stream.external.handler.ExternalStreamHandler
-
 
-
processEXSR(Packet) - Method in class org.stream.registry.StreamRegistryController
-
 
-
processEXST(Packet) - Method in class org.stream.external.handler.ExternalStreamHandler
-
 
-
processEXST(Packet) - Method in class org.stream.registry.StreamRegistryController
-
 
-
processIATH(Packet) - Method in class org.stream.external.handler.ExternalStreamHandler
-
 
-
processIATH(Packet) - Method in class org.stream.registry.StreamRegistryController
-
 
-
processIATV(Packet) - Method in class org.stream.external.handler.ExternalStreamHandler
-
 
-
processIATV(Packet) - Method in class org.stream.registry.StreamRegistryController
-
 
-
processINIT(Packet) - Method in class org.stream.external.handler.ExternalStreamHandler
-
 
-
processINIT(Packet) - Method in class org.stream.registry.StreamRegistryController
-
 
-
processKILL(Packet) - Method in class org.stream.external.handler.ExternalStreamHandler
-
 
-
processKILL(Packet) - Method in class org.stream.registry.StreamRegistryController
-
 
-
processRQST(Packet) - Method in class org.stream.external.handler.ExternalStreamHandler
-
 
-
processRQST(Packet) - Method in class org.stream.registry.StreamRegistryController
-
 
-
processSUBS(Packet) - Method in class org.stream.external.handler.ExternalStreamHandler
-
 
-
processSUBS(Packet) - Method in class org.stream.registry.StreamRegistryController
-
 
-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-14.html b/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-14.html deleted file mode 100644 index d77ce6cc..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-14.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - -R-Index - - - - - - - - - - - - - - - -
- -
-
-
-

Index

-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages -

R

-
-
receive(Packet) - Method in class org.framework.router.Router
-
-
Function used for receiving Packet objects and determining whether - to route them to a connected Router or to process them through the - process(Packet) function.
-
-
reflect() - Method in class org.stream.external.handler.ExternalStreamManager
-
-
Private function which utilizes the org.reflections library to reflect - all classes stored in org.stream.external.connected.connections.
-
-
reflect() - Method in class org.stream.local.handler.LocalStreamManager
-
 
-
removeStream(String) - Method in class org.stream.external.handler.ExternalStreamManager
-
-
Deprecated.
-
-
removeStream(String) - Method in class org.stream.local.handler.LocalStreamManager
-
 
-
request(String) - Method in class org.stream.external.connected.connections.AmberDataConnection
-
 
-
request(String) - Method in class org.stream.external.connected.connections.TemplateConnection
-
 
-
request(String) - Method in class org.stream.external.handler.ExternalStreamConnection
-
 
-
request(String) - Method in class org.stream.local.handler.LocalStreamConnection
-
 
-
request(String, String) - Method in class org.stream.external.handler.ExternalStreamManager
-
-
Sends a data request from the stream with the given hash.
-
-
request(String, String) - Method in class org.stream.local.handler.LocalStreamManager
-
 
-
requestTypes - Variable in class org.stream.external.handler.ExternalStreamConnection
-
 
-
requestTypes - Variable in class org.stream.local.handler.LocalStreamConnection
-
 
-
Response - Class in org.framework.router
-
-
The Response class is used to relay information from a - given Packet sent through a Router.
-
-
Response(int, String) - Constructor for class org.framework.router.Response
-
-
Constructor used for creating a new Response object.
-
-
Response(int, String, String) - Constructor for class org.framework.router.Response
-
-
Constructor used for creating a new Response object.
-
-
response0() - Static method in class org.framework.router.ResponseFactory
-
-
Blank template response used for sending non-required responses
-
-
response400(String) - Static method in class org.framework.router.ResponseFactory
-
 
-
response404(String, String) - Static method in class org.framework.router.ResponseFactory
-
 
-
response405(String, String) - Static method in class org.framework.router.ResponseFactory
-
 
-
response410(String, String) - Static method in class org.framework.router.ResponseFactory
-
 
-
response420(String) - Static method in class org.framework.router.ResponseFactory
-
 
-
response421(String) - Static method in class org.framework.router.ResponseFactory
-
 
-
response422(String) - Static method in class org.framework.router.ResponseFactory
-
 
-
response423(String) - Static method in class org.framework.router.ResponseFactory
-
 
-
response424(String) - Static method in class org.framework.router.ResponseFactory
-
 
-
response425(String) - Static method in class org.framework.router.ResponseFactory
-
 
-
response426(String, String) - Static method in class org.framework.router.ResponseFactory
-
 
-
response427(String, String, String) - Static method in class org.framework.router.ResponseFactory
-
 
-
response428(String, String) - Static method in class org.framework.router.ResponseFactory
-
 
-
response429(String, String, String) - Static method in class org.framework.router.ResponseFactory
-
 
-
response500(String, String) - Static method in class org.framework.router.ResponseFactory
-
 
-
ResponseFactory - Class in org.framework.router
-
 
-
ResponseFactory() - Constructor for class org.framework.router.ResponseFactory
-
 
-
Router - Class in org.framework.router
-
-
The Router is a super class that every process inherits.
-
-
Router(String, String) - Constructor for class org.framework.router.Router
-
-
Initializes the Router object to handle processing packets.
-
-
Router(String, String, Manager) - Constructor for class org.framework.router.Router
-
-
Initializes the Router object to handle processing Packet objects.
-
-
Router1 - Class in test.framework.router
-
 
-
Router1() - Constructor for class test.framework.router.Router1
-
 
-
Router2 - Class in test.framework.router
-
 
-
Router2() - Constructor for class test.framework.router.Router2
-
 
-
routers - Variable in class org.framework.router.Manager
-
 
-
RouterTemp - Class in test.framework.router
-
 
-
RouterTemp(String, String) - Constructor for class test.framework.router.RouterTemp
-
 
-
RouterTemplate - Class in test.framework.router
-
 
-
RouterTemplate - Class in test.speed
-
 
-
RouterTemplate(int, String, String) - Constructor for class test.framework.router.RouterTemplate
-
 
-
RouterTemplate(int, String, String) - Constructor for class test.speed.RouterTemplate
-
 
-
RouterTemplate(String, String) - Constructor for class test.framework.router.RouterTemplate
-
 
-
RouterTemplate(String, String) - Constructor for class test.speed.RouterTemplate
-
 
-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-15.html b/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-15.html deleted file mode 100644 index 230eb4be..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-15.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - -S-Index - - - - - - - - - - - - - - - -
- -
-
-
-

Index

-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages -

S

-
-
send(String, String, String) - Method in class org.framework.router.Router
-
-
Function used to send a Packet object to the desired destination.
-
-
send(Packet) - Method in class org.framework.router.Manager
-
-
Sends a Packet object between two Router objects stored in the network.
-
-
sender - Variable in class org.framework.router.Packet
-
 
-
setManager(Manager) - Method in class org.framework.router.Router
-
-
Updates the Manager this Router is connected to.
-
-
start() - Method in class org.stream.external.connected.connections.AmberDataConnection
-
 
-
start() - Method in class org.stream.external.connected.connections.TemplateConnection
-
 
-
start() - Method in class org.stream.external.handler.ExternalStreamConnection
-
 
-
stop() - Method in class org.stream.external.connected.connections.AmberDataConnection
-
 
-
stop() - Method in class org.stream.external.connected.connections.TemplateConnection
-
 
-
stop() - Method in class org.stream.external.handler.ExternalStreamConnection
-
 
-
StreamAuthorization - Class in org.stream.registry
-
 
-
StreamAuthorization() - Constructor for class org.stream.registry.StreamAuthorization
-
 
-
StreamManager - Class in org.stream.manager
-
 
-
StreamManager() - Constructor for class org.stream.manager.StreamManager
-
 
-
StreamRegistryController - Class in org.stream.registry
-
 
-
StreamRegistryController() - Constructor for class org.stream.registry.StreamRegistryController
-
 
-
streams - Variable in class org.stream.external.handler.ExternalStreamManager
-
 
-
streams - Variable in class org.stream.local.handler.LocalStreamManager
-
 
-
sub_tag - Variable in class org.framework.router.Packet
-
 
-
subscribe(String) - Method in class org.stream.external.connected.connections.AmberDataConnection
-
 
-
subscribe(String) - Method in class org.stream.external.connected.connections.TemplateConnection
-
 
-
subscribe(String) - Method in class org.stream.external.handler.ExternalStreamConnection
-
 
-
subscribe(String, String) - Method in class org.stream.external.handler.ExternalStreamManager
-
-
Subscribes the stream to the given subscription type passed in the data - parameter.
-
-
subscriptionTypes - Variable in class org.stream.external.handler.ExternalStreamConnection
-
 
-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-16.html b/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-16.html deleted file mode 100644 index ba0dfcd7..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-16.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - -T-Index - - - - - - - - - - - - - - - -
- -
-
-
-

Index

-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages -

T

-
-
tag - Variable in enum class org.core.logger.LogSeverity
-
 
-
tag - Variable in class org.framework.router.Packet
-
 
-
tag - Variable in class org.framework.router.Router
-
 
-
tags() - Method in class org.framework.router.Manager
-
-
Collection of all Router object tags connected to the Manager object.
-
-
TemplateConnection - Class in org.stream.external.connected.connections
-
 
-
TemplateConnection - Class in org.stream.local.connected.connections
-
 
-
TemplateConnection() - Constructor for class org.stream.local.connected.connections.TemplateConnection
-
 
-
TemplateConnection(ExternalStreamManager, String) - Constructor for class org.stream.external.connected.connections.TemplateConnection
-
 
-
templates - Variable in class org.stream.external.handler.ExternalStreamManager
-
 
-
templates - Variable in class org.stream.local.handler.LocalStreamManager
-
 
-
test.framework.router - package test.framework.router
-
 
-
test.protocols - package test.protocols
-
 
-
test.speed - package test.speed
-
 
-
TestCentralRouterConnection() - Method in class test.framework.router.TestRouter
-
 
-
TestComplexRouterConnection() - Method in class test.framework.router.TestRouter
-
 
-
TestComplexRouterSend() - Method in class test.framework.router.TestRouter
-
 
-
TestConnection() - Method in class test.framework.router.TestManager
-
 
-
TestCreatePacket() - Method in class test.framework.router.TestPacket
-
 
-
TestESH - Class in test.protocols
-
 
-
TestESH() - Constructor for class test.protocols.TestESH
-
 
-
TestEXEC() - Method in class test.protocols.TestESH
-
 
-
TestEXEC() - Method in class test.protocols.TestSRC
-
 
-
TestExistingConnection() - Method in class test.framework.router.TestManager
-
 
-
TestExistingConnection() - Method in class test.framework.router.TestRouter
-
 
-
TestEXSR() - Method in class test.protocols.TestESH
-
 
-
TestEXSR() - Method in class test.protocols.TestSRC
-
 
-
TestEXST() - Method in class test.protocols.TestESH
-
 
-
TestEXST() - Method in class test.protocols.TestSRC
-
 
-
TestIATH() - Method in class test.protocols.TestESH
-
 
-
TestIATH() - Method in class test.protocols.TestSRC
-
 
-
TestIATV() - Method in class test.protocols.TestESH
-
 
-
TestIATV() - Method in class test.protocols.TestSRC
-
 
-
TestINIT() - Method in class test.protocols.TestESH
-
 
-
TestINIT() - Method in class test.protocols.TestSRC
-
 
-
TestKILL() - Method in class test.protocols.TestESH
-
 
-
TestKILL() - Method in class test.protocols.TestSRC
-
 
-
TestManager - Class in test.framework.router
-
 
-
TestManager() - Constructor for class test.framework.router.TestManager
-
 
-
TestPacket - Class in test.framework.router
-
 
-
TestPacket() - Constructor for class test.framework.router.TestPacket
-
 
-
TestPacketRouter - Class in test.framework.router
-
 
-
TestPacketRouter() - Constructor for class test.framework.router.TestPacketRouter
-
 
-
TestRouter - Class in test.framework.router
-
 
-
TestRouter() - Constructor for class test.framework.router.TestRouter
-
 
-
TestRouterSendSpeed - Class in test.speed
-
 
-
TestRouterSendSpeed() - Constructor for class test.speed.TestRouterSendSpeed
-
 
-
TestRQST() - Method in class test.protocols.TestSRC
-
 
-
TestSends() - Method in class test.framework.router.TestManager
-
 
-
TestSimpleRouterConnection() - Method in class test.framework.router.TestRouter
-
 
-
TestSimpleRouterSendPacket() - Method in class test.framework.router.TestRouter
-
 
-
TestSRC - Class in test.protocols
-
 
-
TestSRC() - Constructor for class test.protocols.TestSRC
-
 
-
TestSUBS() - Method in class test.protocols.TestSRC
-
 
-
toString() - Method in class org.framework.router.Manager
-
-
String representation of the Manager object.
-
-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-17.html b/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-17.html deleted file mode 100644 index 96303832..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-17.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - -U-Index - - - - - - - - - - - - - - - -
- -
-
-
-

Index

-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages -

U

-
-
uuid - Variable in class org.framework.router.Manager
-
 
-
uuid - Variable in class org.framework.router.Router
-
 
-
UUID - Interface in org.framework.interfaces
-
-
The UUID interface is used for requiring reflected classes to have a unique id that - they can be referenced by.
-
-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-18.html b/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-18.html deleted file mode 100644 index 4198d79c..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-18.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - -V-Index - - - - - - - - - - - - - - - -
- -
-
-
-

Index

-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages -

V

-
-
valueOf(String) - Static method in enum class org.core.logger.LogSeverity
-
-
Returns the enum constant of this class with the specified name.
-
-
values() - Static method in enum class org.core.logger.LogSeverity
-
-
Returns an array containing the constants of this enum class, in -the order they are declared.
-
-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-19.html b/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-19.html deleted file mode 100644 index eddbf6a2..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-19.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - -W-Index - - - - - - - - - - - - - - - -
- -
-
-
-

Index

-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages -

W

-
-
WARNING - Enum constant in enum class org.core.logger.LogSeverity
-
 
-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-2.html b/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-2.html deleted file mode 100644 index 57b38f05..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-2.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - -C-Index - - - - - - - - - - - - - - - -
- -
-
-
-

Index

-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages -

C

-
-
code - Variable in class org.framework.router.Response
-
 
-
code() - Method in class org.framework.router.Response
-
-
Response code of the Response object.
-
-
connect(Router) - Method in class org.framework.router.Manager
-
-
Connects a Router object to the Manager object.
-
-
connect(Router...) - Method in class org.framework.router.Router
-
-
Connects all passed Router objects to this Router object's Manager.
-
-
connected() - Method in class org.framework.router.Manager
-
-
Collection of all Router objects connected to the Manager object.
-
-
connectedTags() - Method in class org.framework.router.Router
-
-
Collection of all Router object's tags that are connected to the network.
-
-
containsRequestType(String) - Method in class org.stream.external.handler.ExternalStreamConnection
-
 
-
containsRequestType(String) - Method in class org.stream.local.handler.LocalStreamConnection
-
 
-
containsRequestType(String, String) - Method in class org.stream.external.handler.ExternalStreamManager
-
-
Determines if a stream with the given hash contains the given request type.
-
-
containsRequestType(String, String) - Method in class org.stream.local.handler.LocalStreamManager
-
 
-
containsStream(String) - Method in class org.stream.external.handler.ExternalStreamManager
-
-
Determines if a stream with the given hash exists in the manager.
-
-
containsStream(String) - Method in class org.stream.local.handler.LocalStreamManager
-
 
-
containsSubscriptionType(String) - Method in class org.stream.external.handler.ExternalStreamConnection
-
 
-
containsSubscriptionType(String, String) - Method in class org.stream.external.handler.ExternalStreamManager
-
-
Determines if a stream with the given hash contains the given subscription type.
-
-
containsTemplate(String) - Method in class org.stream.external.handler.ExternalStreamManager
-
-
Determines if the given template was reflected on initialization.
-
-
containsTemplate(String) - Method in class org.stream.local.handler.LocalStreamManager
-
 
-
Controller - Class in org.out.controller
-
 
-
Controller() - Constructor for class org.out.controller.Controller
-
 
-
Core - Class in org.core.core
-
 
-
Core() - Constructor for class org.core.core.Core
-
 
-
create(int, String) - Static method in class org.framework.router.Response
-
-
Static function used for creating a new Response object.
-
-
create(int, String, String) - Static method in class org.framework.router.Response
-
-
Static function used for creating a new Response object.
-
-
create(Router) - Static method in class org.framework.router.Manager
-
-
Static function used to create a new Manager object.
-
-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-3.html b/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-3.html deleted file mode 100644 index 78b7876a..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-3.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - -D-Index - - - - - - - - - - - - - - - -
- -
-
-
-

Index

-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages -

D

-
-
data - Variable in class org.framework.router.Packet
-
 
-
data - Variable in class org.framework.router.Response
-
 
-
data - Variable in class org.stream.external.handler.ExternalStreamConnection
-
 
-
data - Variable in class org.stream.local.handler.LocalStreamConnection
-
 
-
data() - Method in class org.framework.router.Response
-
-
String of all data contained within the Response object.
-
-
defineProcesses() - Method in class org.framework.router.Router
-
-
Defines all processes used within the Router.
-
-
defineProcesses() - Method in class org.out.handler.OutputHandler
-
 
-
defineProcesses() - Method in class org.stream.external.handler.ExternalStreamHandler
-
 
-
defineProcesses() - Method in class org.stream.registry.StreamRegistryController
-
 
-
defineProcesses() - Method in class test.framework.router.Router1
-
 
-
defineProcesses() - Method in class test.framework.router.Router2
-
 
-
defineProcesses() - Method in class test.framework.router.RouterTemp
-
 
-
defineProcesses() - Method in class test.framework.router.RouterTemplate
-
 
-
defineProcesses() - Method in class test.framework.router.TestPacketRouter
-
 
-
defineProcesses() - Method in class test.speed.RouterTemplate
-
 
-
defineRequestTypes() - Method in class org.stream.external.connected.connections.AmberDataConnection
-
 
-
defineRequestTypes() - Method in class org.stream.external.connected.connections.TemplateConnection
-
 
-
defineRequestTypes() - Method in class org.stream.external.handler.ExternalStreamConnection
-
 
-
defineRequestTypes() - Method in class org.stream.local.handler.LocalStreamConnection
-
 
-
defineSubscriptionTypes() - Method in class org.stream.external.connected.connections.AmberDataConnection
-
 
-
defineSubscriptionTypes() - Method in class org.stream.external.connected.connections.TemplateConnection
-
 
-
defineSubscriptionTypes() - Method in class org.stream.external.handler.ExternalStreamConnection
-
 
-
disconnect(Router) - Method in class org.framework.router.Manager
-
-
Disconnects a Router object from the Manager object.
-
-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-4.html b/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-4.html deleted file mode 100644 index 05a8ed6e..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-4.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - -E-Index - - - - - - - - - - - - - - - -
- -
-
-
-

Index

-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages -

E

-
-
Engine - Class in org.core.engine
-
 
-
Engine() - Constructor for class org.core.engine.Engine
-
 
-
ERROR - Enum constant in enum class org.core.logger.LogSeverity
-
 
-
executeStream(String) - Method in class org.stream.external.handler.ExternalStreamManager
-
-
Executes a stream to start processing live data.
-
-
ExternalStreamConnection - Class in org.stream.external.handler
-
 
-
ExternalStreamConnection(ExternalStreamManager, String) - Constructor for class org.stream.external.handler.ExternalStreamConnection
-
 
-
ExternalStreamHandler - Class in org.stream.external.handler
-
 
-
ExternalStreamHandler() - Constructor for class org.stream.external.handler.ExternalStreamHandler
-
 
-
ExternalStreamManager - Class in org.stream.external.handler
-
-
The ExternalStreamManager is a class which handles all - external stream connections and requests.
-
-
ExternalStreamManager(ExternalStreamHandler) - Constructor for class org.stream.external.handler.ExternalStreamManager
-
-
Creates a new ExternalStreamManager object.
-
-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-5.html b/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-5.html deleted file mode 100644 index 53d013b2..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-5.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - -G-Index - - - - - - - - - - - - - - - -
- -
-
-
-

Index

-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages -

G

-
-
getData() - Method in class org.framework.router.Packet
-
-
Data transmitted through the Packet for processing at the destination.
-
-
getHash() - Method in class org.stream.external.handler.ExternalStreamConnection
-
 
-
getHash() - Method in class org.stream.local.handler.LocalStreamConnection
-
 
-
getHash(String) - Method in interface org.framework.interfaces.Hash
-
-
Unique hash based on the passed data for identification.
-
-
getHash(String) - Method in class org.stream.external.connected.connections.AmberDataConnection
-
 
-
getHash(String) - Method in class org.stream.external.connected.connections.TemplateConnection
-
 
-
getManager() - Method in class org.framework.router.Router
-
-
Manager that this Router is connected to.
-
-
getSender() - Method in class org.framework.router.Packet
-
-
Tag of the Router object that sent the Packet.
-
-
getSubTag() - Method in class org.framework.router.Packet
-
-
Sub tag determining the action of the Packet at the destination.
-
-
getTag() - Method in enum class org.core.logger.LogSeverity
-
-
Tag related to the enum for printing.
-
-
getTag() - Method in class org.framework.router.Packet
-
-
Tag of the destination the Packet will be sent to.
-
-
getTag() - Method in class org.framework.router.Router
-
-
Unique tag of the inheriting process.
-
-
getUUID() - Method in interface org.framework.interfaces.UUID
-
-
UUID of the implementing class.
-
-
getUUID() - Method in class org.framework.router.Manager
-
-
Uniquely generated UUID created on object initialization.
-
-
getUUID() - Method in class org.framework.router.Router
-
-
Unique identifier of the inheriting process.
-
-
getUUID() - Method in class org.stream.external.connected.connections.AmberDataConnection
-
 
-
getUUID() - Method in class org.stream.external.connected.connections.TemplateConnection
-
 
-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-6.html b/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-6.html deleted file mode 100644 index 27c6776a..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-6.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - -H-Index - - - - - - - - - - - - - - - -
- -
-
-
-

Index

-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages -

H

-
-
handler - Variable in class org.stream.external.handler.ExternalStreamManager
-
 
-
handler - Variable in class org.stream.local.handler.LocalStreamManager
-
 
-
hash - Variable in class org.stream.external.handler.ExternalStreamConnection
-
 
-
hash - Variable in class org.stream.local.handler.LocalStreamConnection
-
 
-
Hash - Interface in org.framework.interfaces
-
-
Interface used for requiring components to have a unique hash based on the passed data.
-
-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-7.html b/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-7.html deleted file mode 100644 index 5d5471ba..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-7.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - -I-Index - - - - - - - - - - - - - - - -
- -
-
-
-

Index

-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages -

I

-
-
INFO - Enum constant in enum class org.core.logger.LogSeverity
-
 
-
init() - Method in class org.stream.external.handler.ExternalStreamConnection
-
 
-
init() - Method in class org.stream.local.handler.LocalStreamConnection
-
 
-
isActive() - Method in class org.stream.external.connected.connections.AmberDataConnection
-
 
-
isActive() - Method in class org.stream.external.connected.connections.TemplateConnection
-
 
-
isActive() - Method in class org.stream.external.handler.ExternalStreamConnection
-
 
-
isAuthorized() - Method in class org.stream.external.connected.connections.AmberDataConnection
-
 
-
isAuthorized() - Method in class org.stream.external.connected.connections.TemplateConnection
-
 
-
isAuthorized() - Method in class org.stream.external.handler.ExternalStreamConnection
-
 
-
isAuthorized() - Method in class org.stream.local.handler.LocalStreamConnection
-
 
-
isConnected(String) - Method in class org.framework.router.Manager
-
-
Checks to see if a Router object with the specified tag is connected - to the network.
-
-
isConnected(String) - Method in class org.framework.router.Router
-
-
Determines if a Router object with the passed tag - exists on the network.
-
-
isConnected(Router) - Method in class org.framework.router.Router
-
-
Determines if a Router object exists on the network.
-
-
isReady() - Method in class org.stream.external.connected.connections.AmberDataConnection
-
 
-
isReady() - Method in class org.stream.external.connected.connections.TemplateConnection
-
 
-
isReady() - Method in class org.stream.external.handler.ExternalStreamConnection
-
 
-
isReady() - Method in class org.stream.local.handler.LocalStreamConnection
-
 
-
isStreamActive(String) - Method in class org.stream.external.handler.ExternalStreamManager
-
-
Determines if a stream with the given hash is currently active.
-
-
isStreamAuthorized(String) - Method in class org.stream.external.handler.ExternalStreamManager
-
-
Determines if a stream with the given hash has been successfully authorized.
-
-
isStreamAuthorized(String) - Method in class org.stream.local.handler.LocalStreamManager
-
 
-
isStreamReady(String) - Method in class org.stream.external.handler.ExternalStreamManager
-
-
Determines if a stream with the given hash is ready for deployment or a static request.
-
-
isStreamReady(String) - Method in class org.stream.local.handler.LocalStreamManager
-
 
-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-8.html b/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-8.html deleted file mode 100644 index 12eb1c61..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-8.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - -K-Index - - - - - - - - - - - - - - - -
- -
-
-
-

Index

-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages -

K

-
-
killStream(String) - Method in class org.stream.external.handler.ExternalStreamManager
-
-
Kills a currently active stream.
-
-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-9.html b/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-9.html deleted file mode 100644 index 8a6a174a..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/index-files/index-9.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - -L-Index - - - - - - - - - - - - - - - -
- -
-
-
-

Index

-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages -

L

-
-
LocalStreamConnection - Class in org.stream.local.handler
-
 
-
LocalStreamConnection(LocalStreamManager, String) - Constructor for class org.stream.local.handler.LocalStreamConnection
-
 
-
LocalStreamHandler - Class in org.stream.local.handler
-
 
-
LocalStreamHandler() - Constructor for class org.stream.local.handler.LocalStreamHandler
-
 
-
LocalStreamManager - Class in org.stream.local.handler
-
 
-
LocalStreamManager(LocalStreamHandler) - Constructor for class org.stream.local.handler.LocalStreamManager
-
 
-
Logger - Class in org.core.logger
-
 
-
Logger() - Constructor for class org.core.logger.Logger
-
 
-
LogSeverity - Enum Class in org.core.logger
-
-
LogSeverity is a enum class used by all processes that interact - with the Logger class.
-
-
LogSeverity(String) - Constructor for enum class org.core.logger.LogSeverity
-
 
-
-A C D E G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/index.html b/DeFi-Data-Engine/DeFi Data Engine/doc/index.html deleted file mode 100644 index ad065f3f..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/index.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - -Overview - - - - - - - - - - - - - - - - - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/jquery-ui.overrides.css b/DeFi-Data-Engine/DeFi Data Engine/doc/jquery-ui.overrides.css deleted file mode 100644 index 1abff952..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/jquery-ui.overrides.css +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. - * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ - -.ui-state-active, -.ui-widget-content .ui-state-active, -.ui-widget-header .ui-state-active, -a.ui-button:active, -.ui-button:active, -.ui-button.ui-state-active:hover { - /* Overrides the color of selection used in jQuery UI */ - background: #F8981D; -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/legal/COPYRIGHT b/DeFi-Data-Engine/DeFi Data Engine/doc/legal/COPYRIGHT deleted file mode 100644 index ca74fffd..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/legal/COPYRIGHT +++ /dev/null @@ -1 +0,0 @@ -Please see ..\java.base\COPYRIGHT diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/legal/LICENSE b/DeFi-Data-Engine/DeFi Data Engine/doc/legal/LICENSE deleted file mode 100644 index 4ad9fe40..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/legal/LICENSE +++ /dev/null @@ -1 +0,0 @@ -Please see ..\java.base\LICENSE diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/legal/jquery.md b/DeFi-Data-Engine/DeFi Data Engine/doc/legal/jquery.md deleted file mode 100644 index 8054a34c..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/legal/jquery.md +++ /dev/null @@ -1,72 +0,0 @@ -## jQuery v3.5.1 - -### jQuery License -``` -jQuery v 3.5.1 -Copyright JS Foundation and other contributors, https://js.foundation/ - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -****************************************** - -The jQuery JavaScript Library v3.5.1 also includes Sizzle.js - -Sizzle.js includes the following license: - -Copyright JS Foundation and other contributors, https://js.foundation/ - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/jquery/sizzle - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -All files located in the node_modules and external directories are -externally maintained libraries used by this software which have their -own licenses; we recommend you read them, as their terms may differ from -the terms above. - -********************* - -``` diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/legal/jqueryUI.md b/DeFi-Data-Engine/DeFi Data Engine/doc/legal/jqueryUI.md deleted file mode 100644 index 8031bdb5..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/legal/jqueryUI.md +++ /dev/null @@ -1,49 +0,0 @@ -## jQuery UI v1.12.1 - -### jQuery UI License -``` -Copyright jQuery Foundation and other contributors, https://jquery.org/ - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/jquery/jquery-ui - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code contained within the demos directory. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -All files located in the node_modules and external directories are -externally maintained libraries used by this software which have their -own licenses; we recommend you read them, as their terms may differ from -the terms above. - -``` diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/member-search-index.js b/DeFi-Data-Engine/DeFi Data Engine/doc/member-search-index.js deleted file mode 100644 index 728b1ddc..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/member-search-index.js +++ /dev/null @@ -1 +0,0 @@ -memberSearchIndex = [{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"active"},{"p":"org.framework.router","c":"Router","l":"addProcess(String, Method)","u":"addProcess(java.lang.String,java.lang.reflect.Method)"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"addRequestType(String)","u":"addRequestType(java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"addRequestType(String)","u":"addRequestType(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"addStream(String, String)","u":"addStream(java.lang.String,java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"addStream(String, String)","u":"addStream(java.lang.String,java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"addSubscriptionType(String)","u":"addSubscriptionType(java.lang.String)"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"AmberDataConnection(ExternalStreamManager, String)","u":"%3Cinit%3E(org.stream.external.handler.ExternalStreamManager,java.lang.String)"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"authorize()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"authorize()"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"authorize()"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"authorize()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"authorized"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"authorizeStream(String)","u":"authorizeStream(java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"authorizeStream(String)","u":"authorizeStream(java.lang.String)"},{"p":"org.framework.router","c":"Response","l":"code"},{"p":"org.framework.router","c":"Response","l":"code()"},{"p":"org.framework.router","c":"Manager","l":"connect(Router)","u":"connect(org.framework.router.Router)"},{"p":"org.framework.router","c":"Router","l":"connect(Router...)","u":"connect(org.framework.router.Router...)"},{"p":"org.framework.router","c":"Manager","l":"connected()"},{"p":"org.framework.router","c":"Router","l":"connectedTags()"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"containsRequestType(String)","u":"containsRequestType(java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"containsRequestType(String)","u":"containsRequestType(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"containsRequestType(String, String)","u":"containsRequestType(java.lang.String,java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"containsRequestType(String, String)","u":"containsRequestType(java.lang.String,java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"containsStream(String)","u":"containsStream(java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"containsStream(String)","u":"containsStream(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"containsSubscriptionType(String)","u":"containsSubscriptionType(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"containsSubscriptionType(String, String)","u":"containsSubscriptionType(java.lang.String,java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"containsTemplate(String)","u":"containsTemplate(java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"containsTemplate(String)","u":"containsTemplate(java.lang.String)"},{"p":"org.out.controller","c":"Controller","l":"Controller()","u":"%3Cinit%3E()"},{"p":"org.core.core","c":"Core","l":"Core()","u":"%3Cinit%3E()"},{"p":"org.framework.router","c":"Response","l":"create(int, String)","u":"create(int,java.lang.String)"},{"p":"org.framework.router","c":"Response","l":"create(int, String, String)","u":"create(int,java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"Manager","l":"create(Router)","u":"create(org.framework.router.Router)"},{"p":"org.framework.router","c":"Packet","l":"data"},{"p":"org.framework.router","c":"Response","l":"data"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"data"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"data"},{"p":"org.framework.router","c":"Response","l":"data()"},{"p":"org.framework.router","c":"Router","l":"defineProcesses()"},{"p":"org.out.handler","c":"OutputHandler","l":"defineProcesses()"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"defineProcesses()"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"defineProcesses()"},{"p":"test.framework.router","c":"Router1","l":"defineProcesses()"},{"p":"test.framework.router","c":"Router2","l":"defineProcesses()"},{"p":"test.framework.router","c":"RouterTemp","l":"defineProcesses()"},{"p":"test.framework.router","c":"RouterTemplate","l":"defineProcesses()"},{"p":"test.framework.router","c":"TestPacketRouter","l":"defineProcesses()"},{"p":"test.speed","c":"RouterTemplate","l":"defineProcesses()"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"defineRequestTypes()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"defineRequestTypes()"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"defineRequestTypes()"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"defineRequestTypes()"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"defineSubscriptionTypes()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"defineSubscriptionTypes()"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"defineSubscriptionTypes()"},{"p":"org.framework.router","c":"Manager","l":"disconnect(Router)","u":"disconnect(org.framework.router.Router)"},{"p":"org.core.engine","c":"Engine","l":"Engine()","u":"%3Cinit%3E()"},{"p":"org.core.logger","c":"LogSeverity","l":"ERROR"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"executeStream(String)","u":"executeStream(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"ExternalStreamConnection(ExternalStreamManager, String)","u":"%3Cinit%3E(org.stream.external.handler.ExternalStreamManager,java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"ExternalStreamHandler()","u":"%3Cinit%3E()"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"ExternalStreamManager(ExternalStreamHandler)","u":"%3Cinit%3E(org.stream.external.handler.ExternalStreamHandler)"},{"p":"org.framework.router","c":"Packet","l":"getData()"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"getHash()"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"getHash()"},{"p":"org.framework.interfaces","c":"Hash","l":"getHash(String)","u":"getHash(java.lang.String)"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"getHash(String)","u":"getHash(java.lang.String)"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"getHash(String)","u":"getHash(java.lang.String)"},{"p":"org.framework.router","c":"Router","l":"getManager()"},{"p":"org.framework.router","c":"Packet","l":"getSender()"},{"p":"org.framework.router","c":"Packet","l":"getSubTag()"},{"p":"org.core.logger","c":"LogSeverity","l":"getTag()"},{"p":"org.framework.router","c":"Packet","l":"getTag()"},{"p":"org.framework.router","c":"Router","l":"getTag()"},{"p":"org.framework.interfaces","c":"UUID","l":"getUUID()"},{"p":"org.framework.router","c":"Manager","l":"getUUID()"},{"p":"org.framework.router","c":"Router","l":"getUUID()"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"getUUID()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"getUUID()"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"handler"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"handler"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"hash"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"hash"},{"p":"org.core.logger","c":"LogSeverity","l":"INFO"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"init()"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"init()"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"isActive()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"isActive()"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"isActive()"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"isAuthorized()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"isAuthorized()"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"isAuthorized()"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"isAuthorized()"},{"p":"org.framework.router","c":"Router","l":"isConnected(Router)","u":"isConnected(org.framework.router.Router)"},{"p":"org.framework.router","c":"Manager","l":"isConnected(String)","u":"isConnected(java.lang.String)"},{"p":"org.framework.router","c":"Router","l":"isConnected(String)","u":"isConnected(java.lang.String)"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"isReady()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"isReady()"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"isReady()"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"isReady()"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"isStreamActive(String)","u":"isStreamActive(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"isStreamAuthorized(String)","u":"isStreamAuthorized(java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"isStreamAuthorized(String)","u":"isStreamAuthorized(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"isStreamReady(String)","u":"isStreamReady(java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"isStreamReady(String)","u":"isStreamReady(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"killStream(String)","u":"killStream(java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"LocalStreamConnection(LocalStreamManager, String)","u":"%3Cinit%3E(org.stream.local.handler.LocalStreamManager,java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamHandler","l":"LocalStreamHandler()","u":"%3Cinit%3E()"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"LocalStreamManager(LocalStreamHandler)","u":"%3Cinit%3E(org.stream.local.handler.LocalStreamHandler)"},{"p":"org.core.logger","c":"Logger","l":"Logger()","u":"%3Cinit%3E()"},{"p":"org.core.logger","c":"LogSeverity","l":"LogSeverity(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"org.main","c":"Main","l":"Main()","u":"%3Cinit%3E()"},{"p":"org.main","c":"Main","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"test.speed","c":"TestRouterSendSpeed","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"org.framework.router","c":"Router","l":"manager"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"manager"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"manager"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"manager"},{"p":"org.framework.router","c":"Manager","l":"Manager()","u":"%3Cinit%3E()"},{"p":"org.framework.router","c":"Response","l":"message"},{"p":"org.framework.router","c":"Response","l":"message()"},{"p":"test.framework.router","c":"RouterTemplate","l":"num"},{"p":"test.speed","c":"RouterTemplate","l":"num"},{"p":"org.out.handler","c":"OutputHandler","l":"OutputHandler()","u":"%3Cinit%3E()"},{"p":"org.out.handler","c":"OutputLiveConnection","l":"OutputLiveConnection()","u":"%3Cinit%3E()"},{"p":"org.out.handler","c":"OutputStaticConnection","l":"OutputStaticConnection()","u":"%3Cinit%3E()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"override"},{"p":"org.framework.router","c":"Packet","l":"packet(Router, String, String, String)","u":"packet(org.framework.router.Router,java.lang.String,java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"Packet","l":"Packet(Router, String, String, String)","u":"%3Cinit%3E(org.framework.router.Router,java.lang.String,java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"Router","l":"process(Packet)","u":"process(org.framework.router.Packet)"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"process(String, String)","u":"process(java.lang.String,java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"process(String, String)","u":"process(java.lang.String,java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"process(String, String, String)","u":"process(java.lang.String,java.lang.String,java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"process(String, String, String)","u":"process(java.lang.String,java.lang.String,java.lang.String)"},{"p":"test.framework.router","c":"Router1","l":"process1(Packet)","u":"process1(org.framework.router.Packet)"},{"p":"test.framework.router","c":"Router2","l":"process1(Packet)","u":"process1(org.framework.router.Packet)"},{"p":"test.framework.router","c":"RouterTemp","l":"process1(Packet)","u":"process1(org.framework.router.Packet)"},{"p":"test.framework.router","c":"RouterTemplate","l":"process1(Packet)","u":"process1(org.framework.router.Packet)"},{"p":"test.framework.router","c":"TestPacketRouter","l":"process1(Packet)","u":"process1(org.framework.router.Packet)"},{"p":"test.speed","c":"RouterTemplate","l":"process1(Packet)","u":"process1(org.framework.router.Packet)"},{"p":"org.out.handler","c":"OutputHandler","l":"processEDAT(Packet)","u":"processEDAT(org.framework.router.Packet)"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"processEDAT(Packet)","u":"processEDAT(org.framework.router.Packet)"},{"p":"org.framework.router","c":"Router","l":"processes"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"processEXEC(Packet)","u":"processEXEC(org.framework.router.Packet)"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"processEXEC(Packet)","u":"processEXEC(org.framework.router.Packet)"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"processEXSR(Packet)","u":"processEXSR(org.framework.router.Packet)"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"processEXSR(Packet)","u":"processEXSR(org.framework.router.Packet)"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"processEXST(Packet)","u":"processEXST(org.framework.router.Packet)"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"processEXST(Packet)","u":"processEXST(org.framework.router.Packet)"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"processIATH(Packet)","u":"processIATH(org.framework.router.Packet)"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"processIATH(Packet)","u":"processIATH(org.framework.router.Packet)"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"processIATV(Packet)","u":"processIATV(org.framework.router.Packet)"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"processIATV(Packet)","u":"processIATV(org.framework.router.Packet)"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"processINIT(Packet)","u":"processINIT(org.framework.router.Packet)"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"processINIT(Packet)","u":"processINIT(org.framework.router.Packet)"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"processKILL(Packet)","u":"processKILL(org.framework.router.Packet)"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"processKILL(Packet)","u":"processKILL(org.framework.router.Packet)"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"processRQST(Packet)","u":"processRQST(org.framework.router.Packet)"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"processRQST(Packet)","u":"processRQST(org.framework.router.Packet)"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"processSUBS(Packet)","u":"processSUBS(org.framework.router.Packet)"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"processSUBS(Packet)","u":"processSUBS(org.framework.router.Packet)"},{"p":"org.framework.router","c":"Router","l":"receive(Packet)","u":"receive(org.framework.router.Packet)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"reflect()"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"reflect()"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"removeStream(String)","u":"removeStream(java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"removeStream(String)","u":"removeStream(java.lang.String)"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"request(String)","u":"request(java.lang.String)"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"request(String)","u":"request(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"request(String)","u":"request(java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"request(String)","u":"request(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"request(String, String)","u":"request(java.lang.String,java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"request(String, String)","u":"request(java.lang.String,java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"requestTypes"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"requestTypes"},{"p":"org.framework.router","c":"Response","l":"Response(int, String)","u":"%3Cinit%3E(int,java.lang.String)"},{"p":"org.framework.router","c":"Response","l":"Response(int, String, String)","u":"%3Cinit%3E(int,java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response0()"},{"p":"org.framework.router","c":"ResponseFactory","l":"response400(String)","u":"response400(java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response404(String, String)","u":"response404(java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response405(String, String)","u":"response405(java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response410(String, String)","u":"response410(java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response420(String)","u":"response420(java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response421(String)","u":"response421(java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response422(String)","u":"response422(java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response423(String)","u":"response423(java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response424(String)","u":"response424(java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response425(String)","u":"response425(java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response426(String, String)","u":"response426(java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response427(String, String, String)","u":"response427(java.lang.String,java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response428(String, String)","u":"response428(java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response429(String, String, String)","u":"response429(java.lang.String,java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response500(String, String)","u":"response500(java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"ResponseFactory()","u":"%3Cinit%3E()"},{"p":"org.framework.router","c":"Router","l":"Router(String, String)","u":"%3Cinit%3E(java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"Router","l":"Router(String, String, Manager)","u":"%3Cinit%3E(java.lang.String,java.lang.String,org.framework.router.Manager)"},{"p":"test.framework.router","c":"Router1","l":"Router1()","u":"%3Cinit%3E()"},{"p":"test.framework.router","c":"Router2","l":"Router2()","u":"%3Cinit%3E()"},{"p":"org.framework.router","c":"Manager","l":"routers"},{"p":"test.framework.router","c":"RouterTemp","l":"RouterTemp(String, String)","u":"%3Cinit%3E(java.lang.String,java.lang.String)"},{"p":"test.framework.router","c":"RouterTemplate","l":"RouterTemplate(int, String, String)","u":"%3Cinit%3E(int,java.lang.String,java.lang.String)"},{"p":"test.speed","c":"RouterTemplate","l":"RouterTemplate(int, String, String)","u":"%3Cinit%3E(int,java.lang.String,java.lang.String)"},{"p":"test.framework.router","c":"RouterTemplate","l":"RouterTemplate(String, String)","u":"%3Cinit%3E(java.lang.String,java.lang.String)"},{"p":"test.speed","c":"RouterTemplate","l":"RouterTemplate(String, String)","u":"%3Cinit%3E(java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"Manager","l":"send(Packet)","u":"send(org.framework.router.Packet)"},{"p":"org.framework.router","c":"Router","l":"send(String, String, String)","u":"send(java.lang.String,java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"Packet","l":"sender"},{"p":"org.framework.router","c":"Router","l":"setManager(Manager)","u":"setManager(org.framework.router.Manager)"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"start()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"start()"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"start()"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"stop()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"stop()"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"stop()"},{"p":"org.stream.registry","c":"StreamAuthorization","l":"StreamAuthorization()","u":"%3Cinit%3E()"},{"p":"org.stream.manager","c":"StreamManager","l":"StreamManager()","u":"%3Cinit%3E()"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"StreamRegistryController()","u":"%3Cinit%3E()"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"streams"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"streams"},{"p":"org.framework.router","c":"Packet","l":"sub_tag"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"subscribe(String)","u":"subscribe(java.lang.String)"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"subscribe(String)","u":"subscribe(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"subscribe(String)","u":"subscribe(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"subscribe(String, String)","u":"subscribe(java.lang.String,java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"subscriptionTypes"},{"p":"org.core.logger","c":"LogSeverity","l":"tag"},{"p":"org.framework.router","c":"Packet","l":"tag"},{"p":"org.framework.router","c":"Router","l":"tag"},{"p":"org.framework.router","c":"Manager","l":"tags()"},{"p":"org.stream.local.connected.connections","c":"TemplateConnection","l":"TemplateConnection()","u":"%3Cinit%3E()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"TemplateConnection(ExternalStreamManager, String)","u":"%3Cinit%3E(org.stream.external.handler.ExternalStreamManager,java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"templates"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"templates"},{"p":"test.framework.router","c":"TestRouter","l":"TestCentralRouterConnection()"},{"p":"test.framework.router","c":"TestRouter","l":"TestComplexRouterConnection()"},{"p":"test.framework.router","c":"TestRouter","l":"TestComplexRouterSend()"},{"p":"test.framework.router","c":"TestManager","l":"TestConnection()"},{"p":"test.framework.router","c":"TestPacket","l":"TestCreatePacket()"},{"p":"test.protocols","c":"TestESH","l":"TestESH()","u":"%3Cinit%3E()"},{"p":"test.protocols","c":"TestESH","l":"TestEXEC()"},{"p":"test.protocols","c":"TestSRC","l":"TestEXEC()"},{"p":"test.framework.router","c":"TestManager","l":"TestExistingConnection()"},{"p":"test.framework.router","c":"TestRouter","l":"TestExistingConnection()"},{"p":"test.protocols","c":"TestESH","l":"TestEXSR()"},{"p":"test.protocols","c":"TestSRC","l":"TestEXSR()"},{"p":"test.protocols","c":"TestESH","l":"TestEXST()"},{"p":"test.protocols","c":"TestSRC","l":"TestEXST()"},{"p":"test.protocols","c":"TestESH","l":"TestIATH()"},{"p":"test.protocols","c":"TestSRC","l":"TestIATH()"},{"p":"test.protocols","c":"TestESH","l":"TestIATV()"},{"p":"test.protocols","c":"TestSRC","l":"TestIATV()"},{"p":"test.protocols","c":"TestESH","l":"TestINIT()"},{"p":"test.protocols","c":"TestSRC","l":"TestINIT()"},{"p":"test.protocols","c":"TestESH","l":"TestKILL()"},{"p":"test.protocols","c":"TestSRC","l":"TestKILL()"},{"p":"test.framework.router","c":"TestManager","l":"TestManager()","u":"%3Cinit%3E()"},{"p":"test.framework.router","c":"TestPacket","l":"TestPacket()","u":"%3Cinit%3E()"},{"p":"test.framework.router","c":"TestPacketRouter","l":"TestPacketRouter()","u":"%3Cinit%3E()"},{"p":"test.framework.router","c":"TestRouter","l":"TestRouter()","u":"%3Cinit%3E()"},{"p":"test.speed","c":"TestRouterSendSpeed","l":"TestRouterSendSpeed()","u":"%3Cinit%3E()"},{"p":"test.protocols","c":"TestSRC","l":"TestRQST()"},{"p":"test.framework.router","c":"TestManager","l":"TestSends()"},{"p":"test.framework.router","c":"TestRouter","l":"TestSimpleRouterConnection()"},{"p":"test.framework.router","c":"TestRouter","l":"TestSimpleRouterSendPacket()"},{"p":"test.protocols","c":"TestSRC","l":"TestSRC()","u":"%3Cinit%3E()"},{"p":"test.protocols","c":"TestSRC","l":"TestSUBS()"},{"p":"org.framework.router","c":"Manager","l":"toString()"},{"p":"org.framework.router","c":"Manager","l":"uuid"},{"p":"org.framework.router","c":"Router","l":"uuid"},{"p":"org.core.logger","c":"LogSeverity","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"org.core.logger","c":"LogSeverity","l":"values()"},{"p":"org.core.logger","c":"LogSeverity","l":"WARNING"}];updateSearchResults(); \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/module-search-index.js b/DeFi-Data-Engine/DeFi Data Engine/doc/module-search-index.js deleted file mode 100644 index 0d59754f..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/module-search-index.js +++ /dev/null @@ -1 +0,0 @@ -moduleSearchIndex = [];updateSearchResults(); \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/core/Core.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/core/Core.html deleted file mode 100644 index 75b13658..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/core/Core.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - -Core - - - - - - - - - - - - - - - -
- -
-
- -
-
Package org.core.core
-

Class Core

-
- -
-
-
public class Core -extends Router
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      Core

      -
      public Core()
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/core/class-use/Core.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/core/class-use/Core.html deleted file mode 100644 index b670f275..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/core/class-use/Core.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class org.core.core.Core - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.core.core.Core

-
-No usage of org.core.core.Core
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/core/package-summary.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/core/package-summary.html deleted file mode 100644 index 0e5fda59..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/core/package-summary.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - -org.core.core - - - - - - - - - - - - - - - -
- -
-
-
-

Package org.core.core

-
-
-
package org.core.core
-
-
    -
  • -
    -
    Classes
    -
    -
    Class
    -
    Description
    - -
     
    -
    -
    -
  • -
-
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/core/package-tree.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/core/package-tree.html deleted file mode 100644 index d0c04e7f..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/core/package-tree.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - -org.core.core Class Hierarchy - - - - - - - - - - - - - - - -
- -
-
-
-

Hierarchy For Package org.core.core

-Package Hierarchies: - -
-
-

Class Hierarchy

-
    -
  • java.lang.Object -
      -
    • org.framework.router.Router -
        -
      • org.core.core.Core
      • -
      -
    • -
    -
  • -
-
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/core/package-use.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/core/package-use.html deleted file mode 100644 index ee69171b..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/core/package-use.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Package org.core.core - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Package
org.core.core

-
-No usage of org.core.core
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/engine/Engine.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/engine/Engine.html deleted file mode 100644 index 8b894e78..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/engine/Engine.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - -Engine - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class Engine

-
-
java.lang.Object -
org.framework.router.Router -
org.core.engine.Engine
-
-
-
-
-
public class Engine -extends Router
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      Engine

      -
      public Engine()
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/engine/class-use/Engine.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/engine/class-use/Engine.html deleted file mode 100644 index a0a051d6..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/engine/class-use/Engine.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class org.core.engine.Engine - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.core.engine.Engine

-
-No usage of org.core.engine.Engine
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/engine/package-summary.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/engine/package-summary.html deleted file mode 100644 index c6da670c..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/engine/package-summary.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - -org.core.engine - - - - - - - - - - - - - - - -
- -
-
-
-

Package org.core.engine

-
-
-
package org.core.engine
-
-
    -
  • -
    -
    Classes
    -
    -
    Class
    -
    Description
    - -
     
    -
    -
    -
  • -
-
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/engine/package-tree.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/engine/package-tree.html deleted file mode 100644 index a3653775..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/engine/package-tree.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - -org.core.engine Class Hierarchy - - - - - - - - - - - - - - - -
- -
-
-
-

Hierarchy For Package org.core.engine

-Package Hierarchies: - -
-
-

Class Hierarchy

- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/engine/package-use.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/engine/package-use.html deleted file mode 100644 index 79d33ce1..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/engine/package-use.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Package org.core.engine - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Package
org.core.engine

-
-No usage of org.core.engine
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/logger/LogSeverity.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/logger/LogSeverity.html deleted file mode 100644 index 8a0c0515..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/logger/LogSeverity.html +++ /dev/null @@ -1,312 +0,0 @@ - - - - -LogSeverity - - - - - - - - - - - - - - - -
- -
-
- -
- -

Enum Class LogSeverity

-
-
java.lang.Object -
java.lang.Enum<LogSeverity> -
org.core.logger.LogSeverity
-
-
-
-
-
All Implemented Interfaces:
-
Serializable, Comparable<LogSeverity>, Constable
-
-
-
public enum LogSeverity -extends Enum<LogSeverity>
-
LogSeverity is a enum class used by all processes that interact - with the Logger class. There are several values which are used - to determine the severity of the message passed to the Logger. - - INFO: General information regarding the system. - WARNING: Warnings about system inconsistencies. - ERROR: Errors that cause system failure.
-
-
Author:
-
Conor Flynn
-
-
-
- -
-
-
    - -
  • -
    -

    Enum Constant Details

    -
      -
    • -
      -

      INFO

      -
      public static final LogSeverity INFO
      -
      -
    • -
    • -
      -

      WARNING

      -
      public static final LogSeverity WARNING
      -
      -
    • -
    • -
      -

      ERROR

      -
      public static final LogSeverity ERROR
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      tag

      -
      private final String tag
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      LogSeverity

      -
      private LogSeverity(String tag)
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      values

      -
      public static LogSeverity[] values()
      -
      Returns an array containing the constants of this enum class, in -the order they are declared.
      -
      -
      Returns:
      -
      an array containing the constants of this enum class, in the order they are declared
      -
      -
      -
    • -
    • -
      -

      valueOf

      -
      public static LogSeverity valueOf(String name)
      -
      Returns the enum constant of this class with the specified name. -The string must match exactly an identifier used to declare an -enum constant in this class. (Extraneous whitespace characters are -not permitted.)
      -
      -
      Parameters:
      -
      name - the name of the enum constant to be returned.
      -
      Returns:
      -
      the enum constant with the specified name
      -
      Throws:
      -
      IllegalArgumentException - if this enum class has no constant with the specified name
      -
      NullPointerException - if the argument is null
      -
      -
      -
    • -
    • -
      -

      getTag

      -
      public String getTag()
      -
      Tag related to the enum for printing.
      -
      -
      Returns:
      -
      String corresponding to the given enum.
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/logger/Logger.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/logger/Logger.html deleted file mode 100644 index bf5e04e6..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/logger/Logger.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - -Logger - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class Logger

-
-
java.lang.Object -
org.framework.router.Router -
org.core.logger.Logger
-
-
-
-
-
public class Logger -extends Router
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      Logger

      -
      public Logger()
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/logger/class-use/LogSeverity.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/logger/class-use/LogSeverity.html deleted file mode 100644 index 426478f4..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/logger/class-use/LogSeverity.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - -Uses of Enum Class org.core.logger.LogSeverity - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Enum Class
org.core.logger.LogSeverity

-
-
Packages that use LogSeverity
-
-
Package
-
Description
- -
 
-
-
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/logger/class-use/Logger.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/logger/class-use/Logger.html deleted file mode 100644 index 2a8478a4..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/logger/class-use/Logger.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class org.core.logger.Logger - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.core.logger.Logger

-
-No usage of org.core.logger.Logger
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/logger/package-summary.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/logger/package-summary.html deleted file mode 100644 index f3f0813f..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/logger/package-summary.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - -org.core.logger - - - - - - - - - - - - - - - -
- -
-
-
-

Package org.core.logger

-
-
-
package org.core.logger
-
-
    -
  • -
    -
    -
    -
    -
    Class
    -
    Description
    - -
     
    - -
    -
    LogSeverity is a enum class used by all processes that interact - with the Logger class.
    -
    -
    -
    -
    -
  • -
-
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/logger/package-tree.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/logger/package-tree.html deleted file mode 100644 index 36758449..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/logger/package-tree.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - -org.core.logger Class Hierarchy - - - - - - - - - - - - - - - -
- -
-
-
-

Hierarchy For Package org.core.logger

-Package Hierarchies: - -
-
-

Class Hierarchy

- -
-
-

Enum Class Hierarchy

- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/logger/package-use.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/logger/package-use.html deleted file mode 100644 index 7be3d1c3..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/logger/package-use.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - -Uses of Package org.core.logger - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Package
org.core.logger

-
-
Packages that use org.core.logger
-
-
Package
-
Description
- -
 
-
-
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/interfaces/Hash.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/interfaces/Hash.html deleted file mode 100644 index 9ebde39d..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/interfaces/Hash.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - -Hash - - - - - - - - - - - - - - - -
- -
-
- -
- -

Interface Hash

-
-
-
-
All Known Implementing Classes:
-
AmberDataConnection, ExternalStreamConnection, LocalStreamConnection, TemplateConnection
-
-
-
public interface Hash
-
Interface used for requiring components to have a unique hash based on the passed data. - The hash does not require any standard formatting so long as it is unique. -
- The standard algorithm that will be used is a salted SHA-512.
-
-
Author:
-
Conor Flynn
-
-
-
-
    - -
  • -
    -

    Method Summary

    -
    -
    -
    -
    -
    Modifier and Type
    -
    Method
    -
    Description
    - - -
    -
    Unique hash based on the passed data for identification.
    -
    -
    -
    -
    -
    -
  • -
-
-
-
    - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      getHash

      -
      String getHash(String data)
      -
      Unique hash based on the passed data for identification. Algorithm is recommended to be - a salted SHA-512.
      -
      -
      Parameters:
      -
      data - String which holds all data, primarily that used for authorization.
      -
      Returns:
      -
      String that contains the newly created hash.
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/interfaces/UUID.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/interfaces/UUID.html deleted file mode 100644 index d3a2cd75..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/interfaces/UUID.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - -UUID - - - - - - - - - - - - - - - -
- -
-
- -
- -

Interface UUID

-
-
-
-
All Known Implementing Classes:
-
AmberDataConnection, ExternalStreamConnection, LocalStreamConnection, TemplateConnection
-
-
-
public interface UUID
-
The UUID interface is used for requiring reflected classes to have a unique id that - they can be referenced by. -
- Standard syntax for a UUID is all lower case, no numbers, and words being separated - by _.
-
-
-
    - -
  • -
    -

    Method Summary

    -
    -
    -
    -
    -
    Modifier and Type
    -
    Method
    -
    Description
    - - -
    -
    UUID of the implementing class.
    -
    -
    -
    -
    -
    -
  • -
-
-
-
    - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      getUUID

      -
      String getUUID()
      -
      UUID of the implementing class. Recommended to follow standard syntax - as referenced by UUID.
      -
      -
      Returns:
      -
      String representing the UUID of the implementing class.
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/interfaces/class-use/Hash.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/interfaces/class-use/Hash.html deleted file mode 100644 index c3c67223..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/interfaces/class-use/Hash.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - -Uses of Interface org.framework.interfaces.Hash - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Interface
org.framework.interfaces.Hash

-
-
Packages that use Hash
- -
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/interfaces/class-use/UUID.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/interfaces/class-use/UUID.html deleted file mode 100644 index a1cd186b..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/interfaces/class-use/UUID.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - -Uses of Interface org.framework.interfaces.UUID - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Interface
org.framework.interfaces.UUID

-
-
Packages that use UUID
- -
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/interfaces/package-summary.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/interfaces/package-summary.html deleted file mode 100644 index 0a1dda9d..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/interfaces/package-summary.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - -org.framework.interfaces - - - - - - - - - - - - - - - -
- -
-
-
-

Package org.framework.interfaces

-
-
-
package org.framework.interfaces
-
-
    -
  • -
    -
    Interfaces
    -
    -
    Class
    -
    Description
    - -
    -
    Interface used for requiring components to have a unique hash based on the passed data.
    -
    - -
    -
    The UUID interface is used for requiring reflected classes to have a unique id that - they can be referenced by.
    -
    -
    -
    -
  • -
-
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/interfaces/package-tree.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/interfaces/package-tree.html deleted file mode 100644 index df97c625..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/interfaces/package-tree.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - -org.framework.interfaces Class Hierarchy - - - - - - - - - - - - - - - -
- -
-
-
-

Hierarchy For Package org.framework.interfaces

-Package Hierarchies: - -
-
-

Interface Hierarchy

-
    -
  • org.framework.interfaces.Hash
  • -
  • org.framework.interfaces.UUID
  • -
-
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/interfaces/package-use.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/interfaces/package-use.html deleted file mode 100644 index 1bf6bdf3..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/interfaces/package-use.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - -Uses of Package org.framework.interfaces - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Package
org.framework.interfaces

-
-
Packages that use org.framework.interfaces
- -
-
    -
  • -
    - -
    -
    Class
    -
    Description
    - -
    -
    Interface used for requiring components to have a unique hash based on the passed data.
    -
    - -
    -
    The UUID interface is used for requiring reflected classes to have a unique id that - they can be referenced by.
    -
    -
    -
    -
  • -
  • -
    - -
    -
    Class
    -
    Description
    - -
    -
    Interface used for requiring components to have a unique hash based on the passed data.
    -
    - -
    -
    The UUID interface is used for requiring reflected classes to have a unique id that - they can be referenced by.
    -
    -
    -
    -
  • -
  • -
    - -
    -
    Class
    -
    Description
    - -
    -
    Interface used for requiring components to have a unique hash based on the passed data.
    -
    - -
    -
    The UUID interface is used for requiring reflected classes to have a unique id that - they can be referenced by.
    -
    -
    -
    -
  • -
-
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/Manager.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/Manager.html deleted file mode 100644 index e10d16b9..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/Manager.html +++ /dev/null @@ -1,364 +0,0 @@ - - - - -Manager - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class Manager

-
-
java.lang.Object -
org.framework.router.Manager
-
-
-
-
public class Manager -extends Object
-
The Manager class is used to handle all Router connections. - Manager objects have the ability to merge and combine networks of - Router objects efficiently and effectively.
-
-
Author:
-
Conor Flynn
-
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    - -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      Manager

      -
      private Manager()
      -
      Private constructor used to create a new Manager object. - Used by create(Router) to connect the newly created - object to a Router.
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      getUUID

      -
      public String getUUID()
      -
      Uniquely generated UUID created on object initialization.
      -
      -
      Returns:
      -
      String representing the UUID of the object.
      -
      -
      -
    • -
    • -
      -

      toString

      -
      public String toString()
      -
      String representation of the Manager object.
      -
      -
      Overrides:
      -
      toString in class Object
      -
      Returns:
      -
      UUID of the object. See getUUID() for more information.
      -
      -
      -
    • -
    • -
      -

      connect

      -
      protected void connect(Router router)
      -
      Connects a Router object to the Manager object. Allows it to send - Packet object's to any Router on the network through send(Packet).
      -
      -
      Parameters:
      -
      router - Router object to connect to the Manager object.
      -
      -
      -
    • -
    • -
      -

      disconnect

      -
      protected void disconnect(Router router)
      -
      Disconnects a Router object from the Manager object. Removes access from - sending any Packet object's to any Router connected to the network.
      -
      -
      Parameters:
      -
      router - Router object to disconnect from the Manager object.
      -
      -
      -
    • -
    • -
      -

      isConnected

      -
      public boolean isConnected(String tag)
      -
      Checks to see if a Router object with the specified tag is connected - to the network.
      -
      -
      Parameters:
      -
      tag - Tag of the Router object to determine if it is connected to the network.
      -
      Returns:
      -
      Boolean determining if a Router with the given tag exists on the network.
      -
      -
      -
    • -
    • -
      -

      connected

      -
      protected Collection<Router> connected()
      -
      Collection of all Router objects connected to the Manager object.
      -
      -
      Returns:
      -
      Collection of all Router objects stored within the Manager.
      -
      -
      -
    • -
    • -
      -

      tags

      -
      protected Collection<String> tags()
      -
      Collection of all Router object tags connected to the Manager object.
      -
      -
      Returns:
      -
      Collection of all Router object tags stored within the Manager.
      -
      -
      -
    • -
    • -
      -

      send

      -
      public Response send(Packet packet)
      -
      Sends a Packet object between two Router objects stored in the network. Sent - packets are required to return a Response to the sender that determines the result - of the sent Packet.
      -
      -
      Parameters:
      -
      packet - Packet object to send to the Router.
      -
      Returns:
      -
      Response object returned from the receiver determining the state of the action performed - by the sent packet.
      -
      -
      -
    • -
    • -
      -

      create

      -
      protected static Manager create(Router router)
      -
      Static function used to create a new Manager object. Called by a Router - object when necessary. Automatically connects the passed Router to the Manager - upon initialization.
      -
      -
      Parameters:
      -
      router - Router object that creates the Manager and then automatically connects to it.
      -
      Returns:
      -
      New Manager object with the parameterized router object connected.
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/Packet.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/Packet.html deleted file mode 100644 index 937373e4..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/Packet.html +++ /dev/null @@ -1,324 +0,0 @@ - - - - -Packet - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class Packet

-
-
java.lang.Object -
org.framework.router.Packet
-
-
-
-
public class Packet -extends Object
-
The Packet class represents a standardized data transfer object - used throughout the engine. It contains a series of values which help to - route it to different processes. This class interacts heavily with the - Router class.
-
-
Author:
-
Conor Flynn
-
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      sender

      -
      private final String sender
      -
      -
    • -
    • -
      -

      tag

      -
      private final String tag
      -
      -
    • -
    • -
      -

      sub_tag

      -
      private final String sub_tag
      -
      -
    • -
    • -
      -

      data

      -
      private final String data
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      Packet

      -
      private Packet(Router router, - String tag, - String sub_tag, - String data)
      -
      Initializes a new Packet object.
      -
      -
      Parameters:
      -
      router - Router object the Packet was sent from.
      -
      tag - Tag of the destination the Packet will be sent to.
      -
      sub_tag - Sub tag describing the action performed at the destination.
      -
      data - Data transmitted through the Packet for processing at the destination.
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      getSender

      -
      public final String getSender()
      -
      Tag of the Router object that sent the Packet.
      -
      -
      Returns:
      -
      Tag of the sending Router object.
      -
      -
      -
    • -
    • -
      -

      getTag

      -
      public final String getTag()
      -
      Tag of the destination the Packet will be sent to.
      -
      -
      Returns:
      -
      Tag of the Router the Packet is being sent to.
      -
      -
      -
    • -
    • -
      -

      getSubTag

      -
      public final String getSubTag()
      -
      Sub tag determining the action of the Packet at the destination.
      -
      -
      Returns:
      -
      Sub tag of the Packet object.
      -
      -
      -
    • -
    • -
      -

      getData

      -
      public final String getData()
      -
      Data transmitted through the Packet for processing at the destination.
      -
      -
      Returns:
      -
      String containing all data sent.
      -
      -
      -
    • -
    • -
      -

      packet

      -
      public static Packet packet(Router router, - String tag, - String sub_tag, - String data)
      -
      Factory method used to create a Packet object.
      -
      -
      Parameters:
      -
      router - Router object the Packet was sent from.
      -
      tag - Tag of the destination the Packet will be sent to.
      -
      sub_tag - Sub tag describing the action performed at the destination.
      -
      data - Data transmitted through the Packet for processing at the destination.
      -
      Returns:
      -
      New Packet object.
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/Response.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/Response.html deleted file mode 100644 index 32790de3..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/Response.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - -Response - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class Response

-
-
java.lang.Object -
org.framework.router.Response
-
-
-
-
public final class Response -extends Object
-
The Response class is used to relay information from a - given Packet sent through a Router. Response - objects contain two fields: code and message. - - The code refers to the response code listed in the documentation, which - can be used to determine certain interactions the sent Packet may - have had. - - The message refers to the message sent with the response code, which may - contain more detailed information of the response. This value may be left - blank based on the response code as some codes do not need any more information - than what is provided.
-
-
Author:
-
Conor Flynn
-
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      code

      -
      private final int code
      -
      -
    • -
    • -
      -

      message

      -
      private final String message
      -
      -
    • -
    • -
      -

      data

      -
      private final String data
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      Response

      -
      private Response(int code, - String message)
      -
      Constructor used for creating a new Response object. Must - be accessed through the create(int, String, String) function.
      -
      -
      Parameters:
      -
      code - Response code to be sent.
      -
      message - Message to be sent to accompany the response code.
      -
      -
      -
    • -
    • -
      -

      Response

      -
      private Response(int code, - String message, - String data)
      -
      Constructor used for creating a new Response object. Must - be accessed through the create(int, String, String) function.
      -
      -
      Parameters:
      -
      code - Response code to be sent.
      -
      message - Message to be sent to accompany the response code.
      -
      data - String of data to be returned in the response.
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      code

      -
      public int code()
      -
      Response code of the Response object. Gives high level overview of the - sent Packet object's response. - - See documentation for more detailed explanation of all response codes.
      -
      -
      Returns:
      -
      Integer value representing response from Packet submission.
      -
      -
      -
    • -
    • -
      -

      message

      -
      public String message()
      -
      Response message which is used for containing more detailed information about the - response code if necessary. This field may be left blank if not needed.
      -
      -
      Returns:
      -
      String value representing the response message.
      -
      -
      -
    • -
    • -
      -

      data

      -
      public String data()
      -
      String of all data contained within the Response object. Parameter - is optional and will return an empty String if not defined on initialization.
      -
      -
      Returns:
      -
      String containing all returned data by the Response object.
      -
      -
      -
    • -
    • -
      -

      create

      -
      public static Response create(int code, - String message)
      -
      Static function used for creating a new Response object. Formats and returns - the new response based on the parameters included below.
      -
      -
      Parameters:
      -
      code - Response code of the Response object.
      -
      message - Response message of the Response object. Uses String.format(String, Object...) for formatting with args parameter.
      -
      Returns:
      -
      New Response object formatted based on the passed parameters.
      -
      -
      -
    • -
    • -
      -

      create

      -
      public static Response create(int code, - String message, - String data)
      -
      Static function used for creating a new Response object. Formats and returns - the new response based on the parameters included below.
      -
      -
      Parameters:
      -
      code - Response code of the Response object.
      -
      message - Response message of the Response object. Uses String.format(String, Object...) for formatting with args parameter.
      -
      data - String of data to be returned in the response.
      -
      Returns:
      -
      New Response object formatted based on the passed parameters.
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/ResponseFactory.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/ResponseFactory.html deleted file mode 100644 index 922c3a11..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/ResponseFactory.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - -ResponseFactory - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class ResponseFactory

-
-
java.lang.Object -
org.framework.router.ResponseFactory
-
-
-
-
public class ResponseFactory -extends Object
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      ResponseFactory

      -
      public ResponseFactory()
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      response0

      -
      public static Response response0()
      -
      Blank template response used for sending non-required responses
      -
      -
      Returns:
      -
      A new Response object with a response code of 0 and a blank response message.
      -
      -
      -
    • -
    • -
      -

      response400

      -
      public static Response response400(String router)
      -
      -
    • -
    • -
      -

      response404

      -
      public static Response response404(String router, - String destination)
      -
      -
    • -
    • -
      -

      response405

      -
      public static Response response405(String router, - String subtag)
      -
      -
    • -
    • -
      -

      response410

      -
      public static Response response410(String router, - String subtag)
      -
      -
    • -
    • -
      -

      response420

      -
      public static Response response420(String source)
      -
      -
    • -
    • -
      -

      response421

      -
      public static Response response421(String hash)
      -
      -
    • -
    • -
      -

      response422

      -
      public static Response response422(String source)
      -
      -
    • -
    • -
      -

      response423

      -
      public static Response response423(String hash)
      -
      -
    • -
    • -
      -

      response424

      -
      public static Response response424(String hash)
      -
      -
    • -
    • -
      -

      response425

      -
      public static Response response425(String hash)
      -
      -
    • -
    • -
      -

      response426

      -
      public static Response response426(String hash, - String subscription)
      -
      -
    • -
    • -
      -

      response427

      -
      public static Response response427(String hash, - String subscription, - String response)
      -
      -
    • -
    • -
      -

      response428

      -
      public static Response response428(String hash, - String request)
      -
      -
    • -
    • -
      -

      response429

      -
      public static Response response429(String hash, - String request, - String response)
      -
      -
    • -
    • -
      -

      response500

      -
      public static Response response500(String loc, - String parameter)
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/Router.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/Router.html deleted file mode 100644 index 2042fce1..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/Router.html +++ /dev/null @@ -1,509 +0,0 @@ - - - - -Router - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class Router

-
-
java.lang.Object -
org.framework.router.Router
-
-
-
-
Direct Known Subclasses:
-
Controller, Core, Engine, ExternalStreamHandler, LocalStreamHandler, Logger, OutputHandler, Router1, Router2, RouterTemp, RouterTemplate, RouterTemplate, StreamManager, StreamRegistryController, TestPacketRouter
-
-
-
public abstract class Router -extends Object
-
The Router is a super class that every process inherits. It is used to route data in a - standardized manner throughout the engine. Each process that inherits the Router super class - will be required to supply several types of information. See documentation for further - details.
-
-
Author:
-
Conor Flynn
-
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      uuid

      -
      private final String uuid
      -
      -
    • -
    • -
      -

      tag

      -
      private final String tag
      -
      -
    • -
    • -
      -

      manager

      -
      private Manager manager
      -
      -
    • -
    • -
      -

      processes

      -
      private final HashMap<String,Method> processes
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      Router

      -
      public Router(String uuid, - String tag)
      -
      Initializes the Router object to handle processing packets. Router - does not have any contained tags other than identifying tag.
      -
      -
      Parameters:
      -
      uuid - Unique identifier of the inheriting process.
      -
      tag - Unique tag of the inheriting process.
      -
      -
      -
    • -
    • -
      -

      Router

      -
      public Router(String uuid, - String tag, - Manager manager)
      -
      Initializes the Router object to handle processing Packet objects.
      -
      -
      Parameters:
      -
      uuid - Unique identifier of the inheriting process.
      -
      tag - Unique tag of the inheriting process.
      -
      manager - Manager object which determines the network of processes the router is connected to.
      -
      Throws:
      -
      IllegalArgumentException - Thrown if Router object's tag already exists within the - contained_tags list passed in the constructor.
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      getUUID

      -
      public final String getUUID()
      -
      Unique identifier of the inheriting process.
      -
      -
      Returns:
      -
      String representation of UUID.
      -
      -
      -
    • -
    • -
      -

      getTag

      -
      public final String getTag()
      -
      Unique tag of the inheriting process.
      -
      -
      Returns:
      -
      Unique 3 character string representing tag.
      -
      -
      -
    • -
    • -
      -

      getManager

      -
      public final Manager getManager()
      -
      Manager that this Router is connected to.
      -
      -
      Returns:
      -
      Manager object of the Router.
      -
      -
      -
    • -
    • -
      -

      setManager

      -
      protected final void setManager(Manager manager)
      -
      Updates the Manager this Router is connected to. - Disconnects from the old Manager as well if it is not - null.
      -
      -
      Parameters:
      -
      manager - Manager object to connect this Router to.
      -
      -
      -
    • -
    • -
      -

      connect

      -
      public final void connect(Router... routers)
      -
      Connects all passed Router objects to this Router object's Manager. - Merges all Router objects within both networks such that they can all communicate with - each other. -
      - Creates a new Manager object for this Router if it is null.
      -
      -
      Parameters:
      -
      routers - Router objects to connect to this Router object's network.
      -
      -
      -
    • -
    • -
      -

      isConnected

      -
      public final boolean isConnected(String tag)
      -
      Determines if a Router object with the passed tag - exists on the network.
      -
      -
      Parameters:
      -
      tag - Tag of the Router object to search for.
      -
      Returns:
      -
      Boolean determining if Router object with passed tag exists.
      -
      -
      -
    • -
    • -
      -

      isConnected

      -
      public final boolean isConnected(Router router)
      -
      Determines if a Router object exists on the network. Uses - the passed Router object's tag to determine existence and references - isConnected(String).
      -
      -
      Parameters:
      -
      router - Router object to search for.
      -
      Returns:
      -
      Boolean determining if Router object exists.
      -
      -
      -
    • -
    • -
      -

      connectedTags

      -
      protected final Collection<String> connectedTags()
      -
      Collection of all Router object's tags that are connected to the network. - See getTag() for more information.
      -
      -
      Returns:
      -
      Collection of all connected Router object's tags.
      -
      -
      -
    • -
    • -
      -

      send

      -
      public final Response send(String tag, - String sub_tag, - String data)
      -
      Function used to send a Packet object to the desired destination.
      -
      -
      Parameters:
      -
      tag - Tag Tag of the destination's Router object.
      -
      sub_tag - Sub tag describing the action performed at the destination.
      -
      data - Data transmitted through the Packet for processing at the destination.
      -
      Returns:
      -
      Integer representing the return code of the sent Packet.
      -
      -
      -
    • -
    • -
      -

      receive

      -
      public final Response receive(Packet packet)
      -
      Function used for receiving Packet objects and determining whether - to route them to a connected Router or to process them through the - process(Packet) function.
      -
      -
      Parameters:
      -
      packet - Packet object received by the Router.
      -
      Returns:
      -
      Integer representing the return code of the sent Packet.
      -
      -
      -
    • -
    • -
      -

      addProcess

      -
      public final void addProcess(String subtag, - Method method)
      -
      Adds a process to the Router object under the given subtag. - When the Router object receives a Packet with the given - subtag, it will auto route the Packet to the stored method. -
      - All Method objects must contain a single parameter, a Packet object, - and return a Response object.
      -
      -
      Parameters:
      -
      subtag - Subtag of the process to handle the incoming Packet object.
      -
      method - Method to pass the Packet object to.
      -
      -
      -
    • -
    • -
      -

      process

      -
      private final Response process(Packet packet)
      -
      Function used to handle incoming Packet objects. -
      - Returns a 405 response code should the Router not support the - given Packet.getSubTag() process.
      -
      -
      Parameters:
      -
      packet - Packet object to be processed.
      -
      Returns:
      -
      Integer representing the return code of the sent Packet
      -
      -
      -
    • -
    • -
      -

      defineProcesses

      -
      public void defineProcesses() - throws NoSuchMethodException, -SecurityException
      -
      Defines all processes used within the Router. Function is defined as blank - however can be overwritten to define specific processes. All added processes must contain - the explicit subtag they are listed under and the associated method to handle the subtag from.
      -
      -
      Throws:
      -
      NoSuchMethodException
      -
      SecurityException
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/class-use/Manager.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/class-use/Manager.html deleted file mode 100644 index 85ae51f5..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/class-use/Manager.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - -Uses of Class org.framework.router.Manager - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.framework.router.Manager

-
-
Packages that use Manager
-
-
Package
-
Description
- -
 
-
-
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/class-use/Packet.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/class-use/Packet.html deleted file mode 100644 index f2f18475..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/class-use/Packet.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - -Uses of Class org.framework.router.Packet - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.framework.router.Packet

-
-
Packages that use Packet
- -
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/class-use/Response.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/class-use/Response.html deleted file mode 100644 index 4a1b265a..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/class-use/Response.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - -Uses of Class org.framework.router.Response - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.framework.router.Response

-
-
Packages that use Response
- -
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/class-use/ResponseFactory.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/class-use/ResponseFactory.html deleted file mode 100644 index 462fae37..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/class-use/ResponseFactory.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class org.framework.router.ResponseFactory - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.framework.router.ResponseFactory

-
-No usage of org.framework.router.ResponseFactory
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/class-use/Router.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/class-use/Router.html deleted file mode 100644 index f195fbd2..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/class-use/Router.html +++ /dev/null @@ -1,336 +0,0 @@ - - - - -Uses of Class org.framework.router.Router - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.framework.router.Router

-
-
Packages that use Router
- -
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/package-summary.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/package-summary.html deleted file mode 100644 index e455dd35..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/package-summary.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - -org.framework.router - - - - - - - - - - - - - - - -
- -
-
-
-

Package org.framework.router

-
-
-
package org.framework.router
-
-
    -
  • -
    -
    Classes
    -
    -
    Class
    -
    Description
    - -
    -
    The Manager class is used to handle all Router connections.
    -
    - -
    -
    The Packet class represents a standardized data transfer object - used throughout the engine.
    -
    - -
    -
    The Response class is used to relay information from a - given Packet sent through a Router.
    -
    - -
     
    - -
    -
    The Router is a super class that every process inherits.
    -
    -
    -
    -
  • -
-
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/package-tree.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/package-tree.html deleted file mode 100644 index 00b66e24..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/package-tree.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - -org.framework.router Class Hierarchy - - - - - - - - - - - - - - - -
- -
-
-
-

Hierarchy For Package org.framework.router

-Package Hierarchies: - -
-
-

Class Hierarchy

- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/package-use.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/package-use.html deleted file mode 100644 index da3ef9d0..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/framework/router/package-use.html +++ /dev/null @@ -1,312 +0,0 @@ - - - - -Uses of Package org.framework.router - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Package
org.framework.router

-
-
Packages that use org.framework.router
- -
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/main/Main.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/main/Main.html deleted file mode 100644 index 5fc07ee1..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/main/Main.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - -Main - - - - - - - - - - - - - - - -
- -
-
- -
-
Package org.main
-

Class Main

-
-
java.lang.Object -
org.main.Main
-
-
-
-
public class Main -extends Object
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      Main

      -
      public Main()
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      main

      -
      public static void main(String[] args)
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/main/class-use/Main.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/main/class-use/Main.html deleted file mode 100644 index fd89f21e..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/main/class-use/Main.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class org.main.Main - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.main.Main

-
-No usage of org.main.Main
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/main/package-summary.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/main/package-summary.html deleted file mode 100644 index 2ffa0e62..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/main/package-summary.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - -org.main - - - - - - - - - - - - - - - -
- -
-
-
-

Package org.main

-
-
-
package org.main
-
-
    -
  • -
    -
    Classes
    -
    -
    Class
    -
    Description
    - -
     
    -
    -
    -
  • -
-
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/main/package-tree.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/main/package-tree.html deleted file mode 100644 index 640dc597..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/main/package-tree.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - -org.main Class Hierarchy - - - - - - - - - - - - - - - -
- -
-
-
-

Hierarchy For Package org.main

-Package Hierarchies: - -
-
-

Class Hierarchy

- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/main/package-use.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/main/package-use.html deleted file mode 100644 index d3148e6f..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/main/package-use.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Package org.main - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Package
org.main

-
-No usage of org.main
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/controller/Controller.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/controller/Controller.html deleted file mode 100644 index 4f1496b5..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/controller/Controller.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - -Controller - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class Controller

-
-
java.lang.Object -
org.framework.router.Router -
org.out.controller.Controller
-
-
-
-
-
public class Controller -extends Router
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      Controller

      -
      public Controller()
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/controller/class-use/Controller.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/controller/class-use/Controller.html deleted file mode 100644 index 9931d2aa..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/controller/class-use/Controller.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class org.out.controller.Controller - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.out.controller.Controller

-
-No usage of org.out.controller.Controller
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/controller/package-summary.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/controller/package-summary.html deleted file mode 100644 index 5a1cb53c..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/controller/package-summary.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - -org.out.controller - - - - - - - - - - - - - - - -
- -
-
-
-

Package org.out.controller

-
-
-
package org.out.controller
-
-
    -
  • -
    -
    Classes
    -
    -
    Class
    -
    Description
    - -
     
    -
    -
    -
  • -
-
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/controller/package-tree.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/controller/package-tree.html deleted file mode 100644 index d24884d9..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/controller/package-tree.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - -org.out.controller Class Hierarchy - - - - - - - - - - - - - - - -
- -
-
-
-

Hierarchy For Package org.out.controller

-Package Hierarchies: - -
-
-

Class Hierarchy

- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/controller/package-use.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/controller/package-use.html deleted file mode 100644 index 1666e72e..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/controller/package-use.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Package org.out.controller - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Package
org.out.controller

-
-No usage of org.out.controller
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/OutputHandler.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/OutputHandler.html deleted file mode 100644 index 8ce3c408..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/OutputHandler.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - -OutputHandler - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class OutputHandler

-
-
java.lang.Object -
org.framework.router.Router -
org.out.handler.OutputHandler
-
-
-
-
-
public class OutputHandler -extends Router
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      OutputHandler

      -
      public OutputHandler()
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    - -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/OutputLiveConnection.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/OutputLiveConnection.html deleted file mode 100644 index d1a40a2a..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/OutputLiveConnection.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - -OutputLiveConnection - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class OutputLiveConnection

-
-
java.lang.Object -
org.out.handler.OutputLiveConnection
-
-
-
-
public class OutputLiveConnection -extends Object
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      OutputLiveConnection

      -
      public OutputLiveConnection()
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/OutputStaticConnection.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/OutputStaticConnection.html deleted file mode 100644 index 47d9ee6b..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/OutputStaticConnection.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - -OutputStaticConnection - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class OutputStaticConnection

-
-
java.lang.Object -
org.out.handler.OutputStaticConnection
-
-
-
-
public class OutputStaticConnection -extends Object
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      OutputStaticConnection

      -
      public OutputStaticConnection()
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/class-use/OutputHandler.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/class-use/OutputHandler.html deleted file mode 100644 index da40b222..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/class-use/OutputHandler.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class org.out.handler.OutputHandler - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.out.handler.OutputHandler

-
-No usage of org.out.handler.OutputHandler
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/class-use/OutputLiveConnection.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/class-use/OutputLiveConnection.html deleted file mode 100644 index 80a91fdf..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/class-use/OutputLiveConnection.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class org.out.handler.OutputLiveConnection - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.out.handler.OutputLiveConnection

-
-No usage of org.out.handler.OutputLiveConnection
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/class-use/OutputStaticConnection.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/class-use/OutputStaticConnection.html deleted file mode 100644 index 1bce0c8b..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/class-use/OutputStaticConnection.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class org.out.handler.OutputStaticConnection - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.out.handler.OutputStaticConnection

-
-No usage of org.out.handler.OutputStaticConnection
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/package-summary.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/package-summary.html deleted file mode 100644 index 6db05923..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/package-summary.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - -org.out.handler - - - - - - - - - - - - - - - -
- -
-
-
-

Package org.out.handler

-
-
-
package org.out.handler
-
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/package-tree.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/package-tree.html deleted file mode 100644 index 9589a5c4..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/package-tree.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - -org.out.handler Class Hierarchy - - - - - - - - - - - - - - - -
- -
-
-
-

Hierarchy For Package org.out.handler

-Package Hierarchies: - -
-
-

Class Hierarchy

- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/package-use.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/package-use.html deleted file mode 100644 index b7554612..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/out/handler/package-use.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Package org.out.handler - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Package
org.out.handler

-
-No usage of org.out.handler
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/connected/connections/AmberDataConnection.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/connected/connections/AmberDataConnection.html deleted file mode 100644 index e152e908..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/connected/connections/AmberDataConnection.html +++ /dev/null @@ -1,339 +0,0 @@ - - - - -AmberDataConnection - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class AmberDataConnection

-
-
java.lang.Object -
org.stream.external.handler.ExternalStreamConnection -
org.stream.external.connected.connections.AmberDataConnection
-
-
-
-
-
All Implemented Interfaces:
-
Hash, UUID
-
-
-
public class AmberDataConnection -extends ExternalStreamConnection
-
-
- -
-
- -
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/connected/connections/TemplateConnection.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/connected/connections/TemplateConnection.html deleted file mode 100644 index 77e45d4c..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/connected/connections/TemplateConnection.html +++ /dev/null @@ -1,380 +0,0 @@ - - - - -TemplateConnection - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class TemplateConnection

-
-
java.lang.Object -
org.stream.external.handler.ExternalStreamConnection -
org.stream.external.connected.connections.TemplateConnection
-
-
-
-
-
All Implemented Interfaces:
-
Hash, UUID
-
-
-
public class TemplateConnection -extends ExternalStreamConnection
-
-
- -
-
- -
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/connected/connections/class-use/AmberDataConnection.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/connected/connections/class-use/AmberDataConnection.html deleted file mode 100644 index c4f610e0..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/connected/connections/class-use/AmberDataConnection.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class org.stream.external.connected.connections.AmberDataConnection - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.stream.external.connected.connections.AmberDataConnection

-
-No usage of org.stream.external.connected.connections.AmberDataConnection
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/connected/connections/class-use/TemplateConnection.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/connected/connections/class-use/TemplateConnection.html deleted file mode 100644 index 1e737dc9..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/connected/connections/class-use/TemplateConnection.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class org.stream.external.connected.connections.TemplateConnection - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.stream.external.connected.connections.TemplateConnection

-
-No usage of org.stream.external.connected.connections.TemplateConnection
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/connected/connections/package-summary.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/connected/connections/package-summary.html deleted file mode 100644 index b067663b..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/connected/connections/package-summary.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - -org.stream.external.connected.connections - - - - - - - - - - - - - - - -
- -
-
-
-

Package org.stream.external.connected.connections

-
-
-
package org.stream.external.connected.connections
-
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/connected/connections/package-tree.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/connected/connections/package-tree.html deleted file mode 100644 index 1462310f..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/connected/connections/package-tree.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - -org.stream.external.connected.connections Class Hierarchy - - - - - - - - - - - - - - - -
- -
-
-
-

Hierarchy For Package org.stream.external.connected.connections

-Package Hierarchies: - -
-
-

Class Hierarchy

- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/connected/connections/package-use.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/connected/connections/package-use.html deleted file mode 100644 index 3f143747..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/connected/connections/package-use.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Package org.stream.external.connected.connections - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Package
org.stream.external.connected.connections

-
-No usage of org.stream.external.connected.connections
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/ExternalStreamConnection.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/ExternalStreamConnection.html deleted file mode 100644 index 1376b812..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/ExternalStreamConnection.html +++ /dev/null @@ -1,388 +0,0 @@ - - - - -ExternalStreamConnection - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class ExternalStreamConnection

-
-
java.lang.Object -
org.stream.external.handler.ExternalStreamConnection
-
-
-
-
All Implemented Interfaces:
-
Hash, UUID
-
-
-
Direct Known Subclasses:
-
AmberDataConnection, TemplateConnection
-
-
-
public abstract class ExternalStreamConnection -extends Object -implements UUID, Hash
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      hash

      -
      private final String hash
      -
      -
    • -
    • -
      -

      manager

      -
      private final ExternalStreamManager manager
      -
      -
    • -
    • -
      -

      data

      -
      protected final String data
      -
      -
    • -
    • -
      -

      subscriptionTypes

      -
      protected final TreeSet<String> subscriptionTypes
      -
      -
    • -
    • -
      -

      requestTypes

      -
      protected final TreeSet<String> requestTypes
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    - -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      init

      -
      public void init()
      -
      -
    • -
    • -
      -

      process

      -
      public void process(String subscription, - String data)
      -
      -
    • -
    • -
      -

      getHash

      -
      public final String getHash()
      -
      -
    • -
    • -
      -

      authorize

      -
      public abstract boolean authorize()
      -
      -
    • -
    • -
      -

      isAuthorized

      -
      public abstract boolean isAuthorized()
      -
      -
    • -
    • -
      -

      isReady

      -
      public abstract boolean isReady()
      -
      -
    • -
    • -
      -

      isActive

      -
      public abstract boolean isActive()
      -
      -
    • -
    • -
      -

      defineSubscriptionTypes

      -
      public abstract void defineSubscriptionTypes()
      -
      -
    • -
    • -
      -

      addSubscriptionType

      -
      public final void addSubscriptionType(String type)
      -
      -
    • -
    • -
      -

      containsSubscriptionType

      -
      public final boolean containsSubscriptionType(String type)
      -
      -
    • -
    • -
      -

      subscribe

      -
      public abstract Object[] subscribe(String data)
      -
      -
    • -
    • -
      -

      defineRequestTypes

      -
      public abstract void defineRequestTypes()
      -
      -
    • -
    • -
      -

      addRequestType

      -
      public final void addRequestType(String type)
      -
      -
    • -
    • -
      -

      containsRequestType

      -
      public final boolean containsRequestType(String type)
      -
      -
    • -
    • -
      -

      request

      -
      public abstract Object[] request(String request)
      -
      -
    • -
    • -
      -

      start

      -
      public abstract boolean start()
      -
      -
    • -
    • -
      -

      stop

      -
      public abstract boolean stop()
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/ExternalStreamHandler.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/ExternalStreamHandler.html deleted file mode 100644 index 380b2380..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/ExternalStreamHandler.html +++ /dev/null @@ -1,290 +0,0 @@ - - - - -ExternalStreamHandler - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class ExternalStreamHandler

-
-
java.lang.Object -
org.framework.router.Router -
org.stream.external.handler.ExternalStreamHandler
-
-
-
-
-
public final class ExternalStreamHandler -extends Router
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    - -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      ExternalStreamHandler

      -
      public ExternalStreamHandler()
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    - -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/ExternalStreamManager.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/ExternalStreamManager.html deleted file mode 100644 index 4f752605..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/ExternalStreamManager.html +++ /dev/null @@ -1,602 +0,0 @@ - - - - -ExternalStreamManager - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class ExternalStreamManager

-
-
java.lang.Object -
org.stream.external.handler.ExternalStreamManager
-
-
-
-
public class ExternalStreamManager -extends Object
-
The ExternalStreamManager is a class which handles all - external stream connections and requests. This class contains - the functionality to reflect all ExternalStreamConnection - templates stored in org.stream.external.connected.connections - and create streams based on their parameters. -
- All subprocesses sent to the ExternalStreamHandler interact with this - class and are documented as such. All Response objects are created - in the ExternalStreamHandler, as this class returns objects that can - be interpreted into responses. Please view ExternalStreamHandler for - more information regarding the processes.
-
-
Author:
-
Conor Flynn
-
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    - -
    -
  • - -
  • -
    -

    Constructor Details

    - -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      reflect

      - -
      Private function which utilizes the org.reflections library to reflect - all classes stored in org.stream.external.connected.connections. -
      - All thrown exceptions are from the reflections library. For more documentation please - go to the following link: https://github.com/ronmamo/reflections
      -
      -
      Throws:
      -
      InstantiationException
      -
      IllegalAccessException
      -
      IllegalArgumentException
      -
      InvocationTargetException
      -
      NoSuchMethodException
      -
      SecurityException
      -
      -
      -
    • -
    • -
      -

      containsTemplate

      -
      protected boolean containsTemplate(String type)
      -
      Determines if the given template was reflected on initialization. View - ExternalStreamHandler for more information on reflection.
      -
      -
      Parameters:
      -
      type - Type referring to the UUID of the template found in UUID.getUUID().
      -
      Returns:
      -
      Boolean determining if the UUID exists within the manager.
      -
      -
      -
    • -
    • -
      -

      containsStream

      -
      protected boolean containsStream(String hash)
      -
      Determines if a stream with the given hash exists in the manager. Hashes - are generated on initialization and should be stored for future stream references.
      -
      -
      Parameters:
      -
      hash - Hash of the stream returned by the Hash.getHash(String) function.
      -
      Returns:
      -
      Boolean determining if a stream with the given hash exists within the manager.
      -
      -
      -
    • -
    • -
      -

      isStreamAuthorized

      -
      protected boolean isStreamAuthorized(String hash)
      -
      Determines if a stream with the given hash has been successfully authorized. -
      - If a stream with the given hash does not exist, the function returns false.
      -
      -
      Parameters:
      -
      hash - Hash of the stream returned by the Hash.getHash(String) function.
      -
      Returns:
      -
      Boolean determining if a stream with the given hash has been successfully authorized.
      -
      -
      -
    • -
    • -
      -

      isStreamReady

      -
      protected boolean isStreamReady(String hash)
      -
      Determines if a stream with the given hash is ready for deployment or a static request. -
      - If a stream with the given hash does not exist, the function returns false.
      -
      -
      Parameters:
      -
      hash - Hash of the stream returned by the Hash.getHash(String) function.
      -
      Returns:
      -
      Boolean determining if a stream with the given hash is ready for deployment or static requests.
      -
      -
      -
    • -
    • -
      -

      isStreamActive

      -
      protected boolean isStreamActive(String hash)
      -
      Determines if a stream with the given hash is currently active. Active streams have been successfully - executed through the ExternalStreamConnection.start() function. -
      - If a stream with the given hash does not exist, the function returns false.
      -
      -
      Parameters:
      -
      hash - Hash of the stream returned by the Hash.getHash(String) function.
      -
      Returns:
      -
      Boolean determining if a stream with the given hash is currently active.
      -
      -
      -
    • -
    • -
      -

      addStream

      -
      protected Object[] addStream(String type, - String data)
      -
      Adds a new stream of the given type to the manager. New streams types are generated from the - reflection of org.stream.external.connected.connections package. The type parameter - refers to the return of the UUID.getUUID() function. -
      - After initialization, the manager will attempt to authorize the stream using the data passed in the - data parameter. If failed, the method will return false.
      -
      -
      Parameters:
      -
      type - Type of the stream the user wants to initialize. See UUID.getUUID() for more information.
      -
      data - Data of the stream used for the authorization of the stream and for the random generation of - ExternalStreamConnection.getHash(). Data should be formatted exactly as specified in the documentation otherwise the - stream will be unable to authorize.
      -
      Returns:
      -
      The function returns an Object array containing 2 objects. The first is a Boolean that determines if - the action was successful. The second object will return a String which contains the generated hash of the new stream. - If the initialization is unsuccessful, the second object will be null.
      -
      -
      -
    • -
    • -
      -

      removeStream

      -
      @Deprecated -protected boolean removeStream(String hash)
      -
      Deprecated.
      -
      Removes a stream with the given has from the manager. This function is currently deprecated and not used - however future implementations will include usage for it.
      -
      -
      Parameters:
      -
      hash - Hash of the stream returned by the Hash.getHash(String) function.
      -
      Returns:
      -
      Boolean determining if the removal was successful.
      -
      -
      -
    • -
    • -
      -

      authorizeStream

      -
      protected boolean authorizeStream(String hash)
      -
      Authorizes a stream for execution. Uses the data passed by the addStream(String, String) - function. That data is then processed in the ExternalStreamConnection.authorize() function to determine if authorization - is successful. -
      - This function is explicitly called in addStream(String, String). Failure to authorize successfully - as determined by ExternalStreamConnection.isAuthorized() will prevent the new stream from being added.
      -
      -
      Parameters:
      -
      hash - Hash of the stream returned by the Hash.getHash(String) function.
      -
      Returns:
      -
      Boolean determining if the stream with the passed hash was successfully authorized.
      -
      -
      -
    • -
    • -
      -

      containsSubscriptionType

      -
      protected boolean containsSubscriptionType(String hash, - String type)
      -
      Determines if a stream with the given hash contains the given subscription type. - Utilizes the ExternalStreamConnection.containsSubscriptionType(String) for - determining if the subscription exists. -
      - If a stream with the given hash does not exist, this function returns false.
      -
      -
      Parameters:
      -
      hash - Hash of the stream returned by the Hash.getHash(String) function.
      -
      type - Type of subscription requested.
      -
      Returns:
      -
      Boolean determining if the stream with the given hash contains the given subscription type.
      -
      -
      -
    • -
    • -
      -

      subscribe

      -
      protected Object[] subscribe(String hash, - String data)
      -
      Subscribes the stream to the given subscription type passed in the data - parameter. Subscriptions are live data feeds that push to the output handler - class. From there they are distributed to the according external sources. -
      - If a stream with the given hash does not exist, this function returns false.
      -
      -
      Parameters:
      -
      hash - Hash of the stream returned by the Hash.getHash(String) function.
      -
      data - Data required for processing the new subscription.
      -
      Returns:
      -
      The function returns an Object array containing 2 objects. The first is a Boolean that determines if - the action was successful. The second item is a String containing any irregular message given when attempting to subscribe - to the new subscription. If the action is successful and the first item is true, the second object is null and is not used in the - given response.
      -
      -
      -
    • -
    • -
      -

      containsRequestType

      -
      protected boolean containsRequestType(String hash, - String type)
      -
      Determines if a stream with the given hash contains the given request type. - Utilizes the ExternalStreamConnection.containsRequestType(String) for - determining if the subscription exists. -
      - If a stream with the given hash does not exist, this function returns false.
      -
      -
      Parameters:
      -
      hash - Hash of the stream returned by the Hash.getHash(String) function.
      -
      type - Type of request requested.
      -
      Returns:
      -
      Boolean determining if the stream with the given hash contains the given request type.
      -
      -
      -
    • -
    • -
      -

      request

      -
      protected Object[] request(String hash, - String request)
      -
      Sends a data request from the stream with the given hash. This request is in the form of a single - (typically REST API) request, which will then return a series of data presented. -
      - If a stream with the given hash does not exist, this function returns false.
      -
      -
      Parameters:
      -
      hash - Hash of the stream returned by the Hash.getHash(String) function.
      -
      request - Request data used for processing the single request.
      -
      Returns:
      -
      Returns a string object containing all data returned by the request.
      -
      -
      -
    • -
    • -
      -

      executeStream

      -
      protected boolean executeStream(String hash)
      -
      Executes a stream to start processing live data. Live data subscriptions must be called through - subscribe(String, String) which will then add a new data subscription - to the stream. -
      - If a stream with the given hash does not exist, is not authorized, is not ready, or is already - executed, this function returns false.
      -
      -
      Parameters:
      -
      hash - Hash of the stream returned by the Hash.getHash(String) function.
      -
      Returns:
      -
      Boolean determining if the stream execution is successful.
      -
      -
      -
    • -
    • -
      -

      killStream

      -
      protected boolean killStream(String hash)
      -
      Kills a currently active stream. This function will terminate any connection to the external stream - and will immediately stop sending data to the output service. Even if the stream is unable to be killed, - the connection between the data and the output service will be severed. -
      - If a stream with the given hash does not exist or is not active, this function returns false.
      -
      -
      Parameters:
      -
      hash - Hash of the stream returned by the Hash.getHash(String) function.
      -
      Returns:
      -
      Boolean determining if the stream was successfully killed.
      -
      -
      -
    • -
    • -
      -

      process

      -
      protected void process(String hash, - String subscription, - String data)
      -
      Function used for processing external data and sending it to the output handler. - Uses the protocol EDAT for processing external data.
      -
      -
      Parameters:
      -
      hash - Hash of the stream returned by the Hash.getHash(String) function.
      -
      subscription - Subscription which the data was received by.
      -
      data - Data sent by the given subscription.
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/class-use/ExternalStreamConnection.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/class-use/ExternalStreamConnection.html deleted file mode 100644 index b8ee5dec..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/class-use/ExternalStreamConnection.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - -Uses of Class org.stream.external.handler.ExternalStreamConnection - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.stream.external.handler.ExternalStreamConnection

-
-
Packages that use ExternalStreamConnection
- -
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/class-use/ExternalStreamHandler.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/class-use/ExternalStreamHandler.html deleted file mode 100644 index 2cb45db9..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/class-use/ExternalStreamHandler.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - -Uses of Class org.stream.external.handler.ExternalStreamHandler - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.stream.external.handler.ExternalStreamHandler

-
-
Packages that use ExternalStreamHandler
-
-
Package
-
Description
- -
 
-
-
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/class-use/ExternalStreamManager.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/class-use/ExternalStreamManager.html deleted file mode 100644 index f08017d6..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/class-use/ExternalStreamManager.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - -Uses of Class org.stream.external.handler.ExternalStreamManager - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.stream.external.handler.ExternalStreamManager

-
-
Packages that use ExternalStreamManager
- -
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/package-summary.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/package-summary.html deleted file mode 100644 index 7e3e5a03..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/package-summary.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - -org.stream.external.handler - - - - - - - - - - - - - - - -
- -
-
-
-

Package org.stream.external.handler

-
-
-
package org.stream.external.handler
-
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/package-tree.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/package-tree.html deleted file mode 100644 index 53502e1f..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/package-tree.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - -org.stream.external.handler Class Hierarchy - - - - - - - - - - - - - - - -
- -
-
-
-

Hierarchy For Package org.stream.external.handler

-Package Hierarchies: - -
-
-

Class Hierarchy

- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/package-use.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/package-use.html deleted file mode 100644 index 56e4c3fc..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/external/handler/package-use.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - -Uses of Package org.stream.external.handler - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Package
org.stream.external.handler

-
-
Packages that use org.stream.external.handler
- -
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/connected/connections/TemplateConnection.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/connected/connections/TemplateConnection.html deleted file mode 100644 index a65e66a2..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/connected/connections/TemplateConnection.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - -TemplateConnection - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class TemplateConnection

-
-
java.lang.Object -
org.stream.local.connected.connections.TemplateConnection
-
-
-
-
public class TemplateConnection -extends Object
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      TemplateConnection

      -
      public TemplateConnection()
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/connected/connections/class-use/TemplateConnection.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/connected/connections/class-use/TemplateConnection.html deleted file mode 100644 index 4b0c7b55..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/connected/connections/class-use/TemplateConnection.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class org.stream.local.connected.connections.TemplateConnection - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.stream.local.connected.connections.TemplateConnection

-
-No usage of org.stream.local.connected.connections.TemplateConnection
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/connected/connections/package-summary.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/connected/connections/package-summary.html deleted file mode 100644 index fbe39519..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/connected/connections/package-summary.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - -org.stream.local.connected.connections - - - - - - - - - - - - - - - -
- -
-
-
-

Package org.stream.local.connected.connections

-
-
-
package org.stream.local.connected.connections
-
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/connected/connections/package-tree.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/connected/connections/package-tree.html deleted file mode 100644 index d40516d7..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/connected/connections/package-tree.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - -org.stream.local.connected.connections Class Hierarchy - - - - - - - - - - - - - - - -
- -
-
-
-

Hierarchy For Package org.stream.local.connected.connections

-Package Hierarchies: - -
-
-

Class Hierarchy

- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/connected/connections/package-use.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/connected/connections/package-use.html deleted file mode 100644 index 8e6aa0f0..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/connected/connections/package-use.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Package org.stream.local.connected.connections - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Package
org.stream.local.connected.connections

-
-No usage of org.stream.local.connected.connections
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/LocalStreamConnection.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/LocalStreamConnection.html deleted file mode 100644 index 4c88b4f1..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/LocalStreamConnection.html +++ /dev/null @@ -1,312 +0,0 @@ - - - - -LocalStreamConnection - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class LocalStreamConnection

-
-
java.lang.Object -
org.stream.local.handler.LocalStreamConnection
-
-
-
-
All Implemented Interfaces:
-
Hash, UUID
-
-
-
public abstract class LocalStreamConnection -extends Object -implements UUID, Hash
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      hash

      -
      private final String hash
      -
      -
    • -
    • -
      -

      manager

      -
      private final LocalStreamManager manager
      -
      -
    • -
    • -
      -

      data

      -
      protected final String data
      -
      -
    • -
    • -
      -

      requestTypes

      -
      protected final TreeSet<String> requestTypes
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    - -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      init

      -
      public void init()
      -
      -
    • -
    • -
      -

      getHash

      -
      public final String getHash()
      -
      -
    • -
    • -
      -

      process

      -
      public final void process(String request, - String data)
      -
      -
    • -
    • -
      -

      authorize

      -
      public abstract boolean authorize()
      -
      -
    • -
    • -
      -

      isAuthorized

      -
      public abstract boolean isAuthorized()
      -
      -
    • -
    • -
      -

      isReady

      -
      public abstract boolean isReady()
      -
      -
    • -
    • -
      -

      defineRequestTypes

      -
      public abstract void defineRequestTypes()
      -
      -
    • -
    • -
      -

      addRequestType

      -
      public final void addRequestType(String type)
      -
      -
    • -
    • -
      -

      containsRequestType

      -
      public final boolean containsRequestType(String type)
      -
      -
    • -
    • -
      -

      request

      -
      public abstract Object[] request(String request)
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/LocalStreamHandler.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/LocalStreamHandler.html deleted file mode 100644 index 15ca406e..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/LocalStreamHandler.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - -LocalStreamHandler - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class LocalStreamHandler

-
-
java.lang.Object -
org.framework.router.Router -
org.stream.local.handler.LocalStreamHandler
-
-
-
-
-
public class LocalStreamHandler -extends Router
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      LocalStreamHandler

      -
      public LocalStreamHandler()
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/LocalStreamManager.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/LocalStreamManager.html deleted file mode 100644 index 22bb55b1..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/LocalStreamManager.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - -LocalStreamManager - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class LocalStreamManager

-
-
java.lang.Object -
org.stream.local.handler.LocalStreamManager
-
-
-
-
public class LocalStreamManager -extends Object
-
-
- -
-
- -
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/class-use/LocalStreamConnection.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/class-use/LocalStreamConnection.html deleted file mode 100644 index f465f12a..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/class-use/LocalStreamConnection.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - -Uses of Class org.stream.local.handler.LocalStreamConnection - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.stream.local.handler.LocalStreamConnection

-
-
Packages that use LocalStreamConnection
-
-
Package
-
Description
- -
 
-
-
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/class-use/LocalStreamHandler.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/class-use/LocalStreamHandler.html deleted file mode 100644 index 2d880140..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/class-use/LocalStreamHandler.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - -Uses of Class org.stream.local.handler.LocalStreamHandler - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.stream.local.handler.LocalStreamHandler

-
-
Packages that use LocalStreamHandler
-
-
Package
-
Description
- -
 
-
-
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/class-use/LocalStreamManager.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/class-use/LocalStreamManager.html deleted file mode 100644 index bc6d6b81..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/class-use/LocalStreamManager.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - -Uses of Class org.stream.local.handler.LocalStreamManager - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.stream.local.handler.LocalStreamManager

-
-
Packages that use LocalStreamManager
-
-
Package
-
Description
- -
 
-
-
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/package-summary.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/package-summary.html deleted file mode 100644 index 0b182432..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/package-summary.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - -org.stream.local.handler - - - - - - - - - - - - - - - -
- -
-
-
-

Package org.stream.local.handler

-
-
-
package org.stream.local.handler
-
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/package-tree.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/package-tree.html deleted file mode 100644 index 2adbb30f..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/package-tree.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - -org.stream.local.handler Class Hierarchy - - - - - - - - - - - - - - - -
- -
-
-
-

Hierarchy For Package org.stream.local.handler

-Package Hierarchies: - -
-
-

Class Hierarchy

- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/package-use.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/package-use.html deleted file mode 100644 index b6e4ecef..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/local/handler/package-use.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - -Uses of Package org.stream.local.handler - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Package
org.stream.local.handler

-
-
Packages that use org.stream.local.handler
-
-
Package
-
Description
- -
 
-
-
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/manager/StreamManager.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/manager/StreamManager.html deleted file mode 100644 index ba12af52..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/manager/StreamManager.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - -StreamManager - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class StreamManager

-
-
java.lang.Object -
org.framework.router.Router -
org.stream.manager.StreamManager
-
-
-
-
-
public class StreamManager -extends Router
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      StreamManager

      -
      public StreamManager()
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/manager/class-use/StreamManager.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/manager/class-use/StreamManager.html deleted file mode 100644 index 867a1e84..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/manager/class-use/StreamManager.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class org.stream.manager.StreamManager - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.stream.manager.StreamManager

-
-No usage of org.stream.manager.StreamManager
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/manager/package-summary.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/manager/package-summary.html deleted file mode 100644 index af92d70e..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/manager/package-summary.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - -org.stream.manager - - - - - - - - - - - - - - - -
- -
-
-
-

Package org.stream.manager

-
-
-
package org.stream.manager
-
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/manager/package-tree.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/manager/package-tree.html deleted file mode 100644 index e08bca82..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/manager/package-tree.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - -org.stream.manager Class Hierarchy - - - - - - - - - - - - - - - -
- -
-
-
-

Hierarchy For Package org.stream.manager

-Package Hierarchies: - -
-
-

Class Hierarchy

- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/manager/package-use.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/manager/package-use.html deleted file mode 100644 index 21e9f7c1..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/manager/package-use.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Package org.stream.manager - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Package
org.stream.manager

-
-No usage of org.stream.manager
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/registry/StreamAuthorization.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/registry/StreamAuthorization.html deleted file mode 100644 index 8c6b0970..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/registry/StreamAuthorization.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - -StreamAuthorization - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class StreamAuthorization

-
-
java.lang.Object -
org.stream.registry.StreamAuthorization
-
-
-
-
public class StreamAuthorization -extends Object
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      StreamAuthorization

      -
      public StreamAuthorization()
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/registry/StreamRegistryController.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/registry/StreamRegistryController.html deleted file mode 100644 index 9b0c42cc..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/registry/StreamRegistryController.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - -StreamRegistryController - - - - - - - - - - - - - - - -
- -
-
- -
- -

Class StreamRegistryController

-
-
java.lang.Object -
org.framework.router.Router -
org.stream.registry.StreamRegistryController
-
-
-
-
-
public class StreamRegistryController -extends Router
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      StreamRegistryController

      -
      public StreamRegistryController()
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    - -
    -
  • -
-
- -
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/registry/class-use/StreamAuthorization.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/registry/class-use/StreamAuthorization.html deleted file mode 100644 index 66b6beae..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/registry/class-use/StreamAuthorization.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class org.stream.registry.StreamAuthorization - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.stream.registry.StreamAuthorization

-
-No usage of org.stream.registry.StreamAuthorization
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/registry/class-use/StreamRegistryController.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/registry/class-use/StreamRegistryController.html deleted file mode 100644 index 8fe02ac3..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/registry/class-use/StreamRegistryController.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class org.stream.registry.StreamRegistryController - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Class
org.stream.registry.StreamRegistryController

-
-No usage of org.stream.registry.StreamRegistryController
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/registry/package-summary.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/registry/package-summary.html deleted file mode 100644 index cf20e31d..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/registry/package-summary.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - -org.stream.registry - - - - - - - - - - - - - - - -
- -
-
-
-

Package org.stream.registry

-
-
-
package org.stream.registry
-
- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/registry/package-tree.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/registry/package-tree.html deleted file mode 100644 index 56017fc0..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/registry/package-tree.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - -org.stream.registry Class Hierarchy - - - - - - - - - - - - - - - -
- -
-
-
-

Hierarchy For Package org.stream.registry

-Package Hierarchies: - -
-
-

Class Hierarchy

- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/registry/package-use.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/registry/package-use.html deleted file mode 100644 index fdd81115..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/stream/registry/package-use.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Package org.stream.registry - - - - - - - - - - - - - - - -
- -
-
-
-

Uses of Package
org.stream.registry

-
-No usage of org.stream.registry
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/overview-summary.html b/DeFi-Data-Engine/DeFi Data Engine/doc/overview-summary.html deleted file mode 100644 index 043e247c..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/overview-summary.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - -Generated Documentation (Untitled) - - - - - - - - - - - -
- -

index.html

-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/overview-tree.html b/DeFi-Data-Engine/DeFi Data Engine/doc/overview-tree.html deleted file mode 100644 index 209aec94..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/overview-tree.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - -Class Hierarchy - - - - - - - - - - - - - - - -
- -
-
- -
-

Class Hierarchy

- -
-
-

Interface Hierarchy

-
    -
  • org.framework.interfaces.Hash
  • -
  • org.framework.interfaces.UUID
  • -
-
-
-

Enum Class Hierarchy

- -
-
-
-
- - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/package-search-index.js b/DeFi-Data-Engine/DeFi Data Engine/doc/package-search-index.js deleted file mode 100644 index e8f3bde2..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/package-search-index.js +++ /dev/null @@ -1 +0,0 @@ -packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"org.core.core"},{"l":"org.core.engine"},{"l":"org.core.logger"},{"l":"org.framework.interfaces"},{"l":"org.framework.router"},{"l":"org.main"},{"l":"org.out.controller"},{"l":"org.out.handler"},{"l":"org.stream.external.connected.connections"},{"l":"org.stream.external.handler"},{"l":"org.stream.local.connected.connections"},{"l":"org.stream.local.handler"},{"l":"org.stream.manager"},{"l":"org.stream.registry"},{"l":"test.framework.router"},{"l":"test.protocols"},{"l":"test.speed"}];updateSearchResults(); \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/resources/glass.png b/DeFi-Data-Engine/DeFi Data Engine/doc/resources/glass.png deleted file mode 100644 index a7f591f4..00000000 Binary files a/DeFi-Data-Engine/DeFi Data Engine/doc/resources/glass.png and /dev/null differ diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/resources/x.png b/DeFi-Data-Engine/DeFi Data Engine/doc/resources/x.png deleted file mode 100644 index 30548a75..00000000 Binary files a/DeFi-Data-Engine/DeFi Data Engine/doc/resources/x.png and /dev/null differ diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png b/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png deleted file mode 100644 index 34abd18f..00000000 Binary files a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png and /dev/null differ diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-bg_glass_65_dadada_1x400.png b/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-bg_glass_65_dadada_1x400.png deleted file mode 100644 index f058a938..00000000 Binary files a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-bg_glass_65_dadada_1x400.png and /dev/null differ diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-bg_glass_75_dadada_1x400.png b/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-bg_glass_75_dadada_1x400.png deleted file mode 100644 index 2ce04c16..00000000 Binary files a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-bg_glass_75_dadada_1x400.png and /dev/null differ diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png b/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png deleted file mode 100644 index a90afb8b..00000000 Binary files a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png and /dev/null differ diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png b/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png deleted file mode 100644 index dbe091f6..00000000 Binary files a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png and /dev/null differ diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png deleted file mode 100644 index 5dc3593e..00000000 Binary files a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png and /dev/null differ diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-icons_222222_256x240.png b/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-icons_222222_256x240.png deleted file mode 100644 index e723e17c..00000000 Binary files a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-icons_222222_256x240.png and /dev/null differ diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-icons_2e83ff_256x240.png b/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-icons_2e83ff_256x240.png deleted file mode 100644 index 1f5f4975..00000000 Binary files a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-icons_2e83ff_256x240.png and /dev/null differ diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-icons_454545_256x240.png b/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-icons_454545_256x240.png deleted file mode 100644 index 618f5b0c..00000000 Binary files a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-icons_454545_256x240.png and /dev/null differ diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-icons_888888_256x240.png b/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-icons_888888_256x240.png deleted file mode 100644 index ee5e33f2..00000000 Binary files a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-icons_888888_256x240.png and /dev/null differ diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-icons_cd0a0a_256x240.png b/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-icons_cd0a0a_256x240.png deleted file mode 100644 index 7e8ebc18..00000000 Binary files a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/images/ui-icons_cd0a0a_256x240.png and /dev/null differ diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/jquery-3.5.1.min.js b/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/jquery-3.5.1.min.js deleted file mode 100644 index b0614034..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/jquery-3.5.1.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0a;a++)for(s in o[a])n=o[a][s],o[a].hasOwnProperty(s)&&void 0!==n&&(e[s]=t.isPlainObject(n)?t.isPlainObject(e[s])?t.widget.extend({},e[s],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,s){var n=s.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=i.call(arguments,1),l=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(l=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):l=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new s(o,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{classes:{},disabled:!1,create:null},_createWidget:function(i,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,c=l[2];c?n.on(h,c,r):i.on(h,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,l=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};h>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),l.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"
    ",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,l=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=l.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=l.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("
      ").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("
      ").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("
      ",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length").append(t("
      ").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("
      ").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete}); \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/jquery-ui.structure.min.css b/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/jquery-ui.structure.min.css deleted file mode 100644 index e8808927..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/script-dir/jquery-ui.structure.min.css +++ /dev/null @@ -1,5 +0,0 @@ -/*! jQuery UI - v1.12.1 - 2018-12-06 -* http://jqueryui.com -* Copyright jQuery Foundation and other contributors; Licensed MIT */ - -.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0} \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/script.js b/DeFi-Data-Engine/DeFi Data Engine/doc/script.js deleted file mode 100644 index 0765364e..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/script.js +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. - * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ - -var moduleSearchIndex; -var packageSearchIndex; -var typeSearchIndex; -var memberSearchIndex; -var tagSearchIndex; -function loadScripts(doc, tag) { - createElem(doc, tag, 'search.js'); - - createElem(doc, tag, 'module-search-index.js'); - createElem(doc, tag, 'package-search-index.js'); - createElem(doc, tag, 'type-search-index.js'); - createElem(doc, tag, 'member-search-index.js'); - createElem(doc, tag, 'tag-search-index.js'); -} - -function createElem(doc, tag, path) { - var script = doc.createElement(tag); - var scriptElement = doc.getElementsByTagName(tag)[0]; - script.src = pathtoroot + path; - scriptElement.parentNode.insertBefore(script, scriptElement); -} - -function show(tableId, selected, columns) { - if (tableId !== selected) { - document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')') - .forEach(function(elem) { - elem.style.display = 'none'; - }); - } - document.querySelectorAll('div.' + selected) - .forEach(function(elem, index) { - elem.style.display = ''; - var isEvenRow = index % (columns * 2) < columns; - elem.classList.remove(isEvenRow ? oddRowColor : evenRowColor); - elem.classList.add(isEvenRow ? evenRowColor : oddRowColor); - }); - updateTabs(tableId, selected); -} - -function updateTabs(tableId, selected) { - document.querySelector('div#' + tableId +' .summary-table') - .setAttribute('aria-labelledby', selected); - document.querySelectorAll('button[id^="' + tableId + '"]') - .forEach(function(tab, index) { - if (selected === tab.id || (tableId === selected && index === 0)) { - tab.className = activeTableTab; - tab.setAttribute('aria-selected', true); - tab.setAttribute('tabindex',0); - } else { - tab.className = tableTab; - tab.setAttribute('aria-selected', false); - tab.setAttribute('tabindex',-1); - } - }); -} - -function switchTab(e) { - var selected = document.querySelector('[aria-selected=true]'); - if (selected) { - if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) { - // left or up arrow key pressed: move focus to previous tab - selected.previousSibling.click(); - selected.previousSibling.focus(); - e.preventDefault(); - } else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) { - // right or down arrow key pressed: move focus to next tab - selected.nextSibling.click(); - selected.nextSibling.focus(); - e.preventDefault(); - } - } -} - -var updateSearchResults = function() {}; - -function indexFilesLoaded() { - return moduleSearchIndex - && packageSearchIndex - && typeSearchIndex - && memberSearchIndex - && tagSearchIndex; -} - -// Workaround for scroll position not being included in browser history (8249133) -document.addEventListener("DOMContentLoaded", function(e) { - var contentDiv = document.querySelector("div.flex-content"); - window.addEventListener("popstate", function(e) { - if (e.state !== null) { - contentDiv.scrollTop = e.state; - } - }); - window.addEventListener("hashchange", function(e) { - history.replaceState(contentDiv.scrollTop, document.title); - }); - contentDiv.addEventListener("scroll", function(e) { - var timeoutID; - if (!timeoutID) { - timeoutID = setTimeout(function() { - history.replaceState(contentDiv.scrollTop, document.title); - timeoutID = null; - }, 100); - } - }); - if (!location.hash) { - history.replaceState(contentDiv.scrollTop, document.title); - } -}); diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/search.js b/DeFi-Data-Engine/DeFi Data Engine/doc/search.js deleted file mode 100644 index 13aba853..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/search.js +++ /dev/null @@ -1,354 +0,0 @@ -/* - * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. - * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ - -var noResult = {l: "No results found"}; -var loading = {l: "Loading search index..."}; -var catModules = "Modules"; -var catPackages = "Packages"; -var catTypes = "Classes and Interfaces"; -var catMembers = "Members"; -var catSearchTags = "Search Tags"; -var highlight = "$&"; -var searchPattern = ""; -var fallbackPattern = ""; -var RANKING_THRESHOLD = 2; -var NO_MATCH = 0xffff; -var MIN_RESULTS = 3; -var MAX_RESULTS = 500; -var UNNAMED = ""; -function escapeHtml(str) { - return str.replace(//g, ">"); -} -function getHighlightedText(item, matcher, fallbackMatcher) { - var escapedItem = escapeHtml(item); - var highlighted = escapedItem.replace(matcher, highlight); - if (highlighted === escapedItem) { - highlighted = escapedItem.replace(fallbackMatcher, highlight) - } - return highlighted; -} -function getURLPrefix(ui) { - var urlPrefix=""; - var slash = "/"; - if (ui.item.category === catModules) { - return ui.item.l + slash; - } else if (ui.item.category === catPackages && ui.item.m) { - return ui.item.m + slash; - } else if (ui.item.category === catTypes || ui.item.category === catMembers) { - if (ui.item.m) { - urlPrefix = ui.item.m + slash; - } else { - $.each(packageSearchIndex, function(index, item) { - if (item.m && ui.item.p === item.l) { - urlPrefix = item.m + slash; - } - }); - } - } - return urlPrefix; -} -function createSearchPattern(term) { - var pattern = ""; - var isWordToken = false; - term.replace(/,\s*/g, ", ").trim().split(/\s+/).forEach(function(w, index) { - if (index > 0) { - // whitespace between identifiers is significant - pattern += (isWordToken && /^\w/.test(w)) ? "\\s+" : "\\s*"; - } - var tokens = w.split(/(?=[A-Z,.()<>[\/])/); - for (var i = 0; i < tokens.length; i++) { - var s = tokens[i]; - if (s === "") { - continue; - } - pattern += $.ui.autocomplete.escapeRegex(s); - isWordToken = /\w$/.test(s); - if (isWordToken) { - pattern += "([a-z0-9_$<>\\[\\]]*?)"; - } - } - }); - return pattern; -} -function createMatcher(pattern, flags) { - var isCamelCase = /[A-Z]/.test(pattern); - return new RegExp(pattern, flags + (isCamelCase ? "" : "i")); -} -var watermark = 'Search'; -$(function() { - var search = $("#search-input"); - var reset = $("#reset-button"); - search.val(''); - search.prop("disabled", false); - reset.prop("disabled", false); - search.val(watermark).addClass('watermark'); - search.blur(function() { - if ($(this).val().length === 0) { - $(this).val(watermark).addClass('watermark'); - } - }); - search.on('click keydown paste', function() { - if ($(this).val() === watermark) { - $(this).val('').removeClass('watermark'); - } - }); - reset.click(function() { - search.val('').focus(); - }); - search.focus()[0].setSelectionRange(0, 0); -}); -$.widget("custom.catcomplete", $.ui.autocomplete, { - _create: function() { - this._super(); - this.widget().menu("option", "items", "> :not(.ui-autocomplete-category)"); - }, - _renderMenu: function(ul, items) { - var rMenu = this; - var currentCategory = ""; - rMenu.menu.bindings = $(); - $.each(items, function(index, item) { - var li; - if (item.category && item.category !== currentCategory) { - ul.append("
    • " + item.category + "
    • "); - currentCategory = item.category; - } - li = rMenu._renderItemData(ul, item); - if (item.category) { - li.attr("aria-label", item.category + " : " + item.l); - li.attr("class", "result-item"); - } else { - li.attr("aria-label", item.l); - li.attr("class", "result-item"); - } - }); - }, - _renderItem: function(ul, item) { - var label = ""; - var matcher = createMatcher(escapeHtml(searchPattern), "g"); - var fallbackMatcher = new RegExp(fallbackPattern, "gi") - if (item.category === catModules) { - label = getHighlightedText(item.l, matcher, fallbackMatcher); - } else if (item.category === catPackages) { - label = getHighlightedText(item.l, matcher, fallbackMatcher); - } else if (item.category === catTypes) { - label = (item.p && item.p !== UNNAMED) - ? getHighlightedText(item.p + "." + item.l, matcher, fallbackMatcher) - : getHighlightedText(item.l, matcher, fallbackMatcher); - } else if (item.category === catMembers) { - label = (item.p && item.p !== UNNAMED) - ? getHighlightedText(item.p + "." + item.c + "." + item.l, matcher, fallbackMatcher) - : getHighlightedText(item.c + "." + item.l, matcher, fallbackMatcher); - } else if (item.category === catSearchTags) { - label = getHighlightedText(item.l, matcher, fallbackMatcher); - } else { - label = item.l; - } - var li = $("
    • ").appendTo(ul); - var div = $("
      ").appendTo(li); - if (item.category === catSearchTags && item.h) { - if (item.d) { - div.html(label + " (" + item.h + ")
      " - + item.d + "
      "); - } else { - div.html(label + " (" + item.h + ")"); - } - } else { - if (item.m) { - div.html(item.m + "/" + label); - } else { - div.html(label); - } - } - return li; - } -}); -function rankMatch(match, category) { - if (!match) { - return NO_MATCH; - } - var index = match.index; - var input = match.input; - var leftBoundaryMatch = 2; - var periferalMatch = 0; - // make sure match is anchored on a left word boundary - if (index === 0 || /\W/.test(input[index - 1]) || "_" === input[index]) { - leftBoundaryMatch = 0; - } else if ("_" === input[index - 1] || (input[index] === input[index].toUpperCase() && !/^[A-Z0-9_$]+$/.test(input))) { - leftBoundaryMatch = 1; - } - var matchEnd = index + match[0].length; - var leftParen = input.indexOf("("); - var endOfName = leftParen > -1 ? leftParen : input.length; - // exclude peripheral matches - if (category !== catModules && category !== catSearchTags) { - var delim = category === catPackages ? "/" : "."; - if (leftParen > -1 && leftParen < index) { - periferalMatch += 2; - } else if (input.lastIndexOf(delim, endOfName) >= matchEnd) { - periferalMatch += 2; - } - } - var delta = match[0].length === endOfName ? 0 : 1; // rank full match higher than partial match - for (var i = 1; i < match.length; i++) { - // lower ranking if parts of the name are missing - if (match[i]) - delta += match[i].length; - } - if (category === catTypes) { - // lower ranking if a type name contains unmatched camel-case parts - if (/[A-Z]/.test(input.substring(matchEnd))) - delta += 5; - if (/[A-Z]/.test(input.substring(0, index))) - delta += 5; - } - return leftBoundaryMatch + periferalMatch + (delta / 200); - -} -function doSearch(request, response) { - var result = []; - searchPattern = createSearchPattern(request.term); - fallbackPattern = createSearchPattern(request.term.toLowerCase()); - if (searchPattern === "") { - return this.close(); - } - var camelCaseMatcher = createMatcher(searchPattern, ""); - var fallbackMatcher = new RegExp(fallbackPattern, "i"); - - function searchIndexWithMatcher(indexArray, matcher, category, nameFunc) { - if (indexArray) { - var newResults = []; - $.each(indexArray, function (i, item) { - item.category = category; - var ranking = rankMatch(matcher.exec(nameFunc(item)), category); - if (ranking < RANKING_THRESHOLD) { - newResults.push({ranking: ranking, item: item}); - } - return newResults.length <= MAX_RESULTS; - }); - return newResults.sort(function(e1, e2) { - return e1.ranking - e2.ranking; - }).map(function(e) { - return e.item; - }); - } - return []; - } - function searchIndex(indexArray, category, nameFunc) { - var primaryResults = searchIndexWithMatcher(indexArray, camelCaseMatcher, category, nameFunc); - result = result.concat(primaryResults); - if (primaryResults.length <= MIN_RESULTS && !camelCaseMatcher.ignoreCase) { - var secondaryResults = searchIndexWithMatcher(indexArray, fallbackMatcher, category, nameFunc); - result = result.concat(secondaryResults.filter(function (item) { - return primaryResults.indexOf(item) === -1; - })); - } - } - - searchIndex(moduleSearchIndex, catModules, function(item) { return item.l; }); - searchIndex(packageSearchIndex, catPackages, function(item) { - return (item.m && request.term.indexOf("/") > -1) - ? (item.m + "/" + item.l) : item.l; - }); - searchIndex(typeSearchIndex, catTypes, function(item) { - return request.term.indexOf(".") > -1 ? item.p + "." + item.l : item.l; - }); - searchIndex(memberSearchIndex, catMembers, function(item) { - return request.term.indexOf(".") > -1 - ? item.p + "." + item.c + "." + item.l : item.l; - }); - searchIndex(tagSearchIndex, catSearchTags, function(item) { return item.l; }); - - if (!indexFilesLoaded()) { - updateSearchResults = function() { - doSearch(request, response); - } - result.unshift(loading); - } else { - updateSearchResults = function() {}; - } - response(result); -} -$(function() { - $("#search-input").catcomplete({ - minLength: 1, - delay: 300, - source: doSearch, - response: function(event, ui) { - if (!ui.content.length) { - ui.content.push(noResult); - } else { - $("#search-input").empty(); - } - }, - autoFocus: true, - focus: function(event, ui) { - return false; - }, - position: { - collision: "flip" - }, - select: function(event, ui) { - if (ui.item.category) { - var url = getURLPrefix(ui); - if (ui.item.category === catModules) { - url += "module-summary.html"; - } else if (ui.item.category === catPackages) { - if (ui.item.u) { - url = ui.item.u; - } else { - url += ui.item.l.replace(/\./g, '/') + "/package-summary.html"; - } - } else if (ui.item.category === catTypes) { - if (ui.item.u) { - url = ui.item.u; - } else if (ui.item.p === UNNAMED) { - url += ui.item.l + ".html"; - } else { - url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.l + ".html"; - } - } else if (ui.item.category === catMembers) { - if (ui.item.p === UNNAMED) { - url += ui.item.c + ".html" + "#"; - } else { - url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.c + ".html" + "#"; - } - if (ui.item.u) { - url += ui.item.u; - } else { - url += ui.item.l; - } - } else if (ui.item.category === catSearchTags) { - url += ui.item.u; - } - if (top !== window) { - parent.classFrame.location = pathtoroot + url; - } else { - window.location.href = pathtoroot + url; - } - $("#search-input").focus(); - } - } - }); -}); diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/stylesheet.css b/DeFi-Data-Engine/DeFi Data Engine/doc/stylesheet.css deleted file mode 100644 index 836c62da..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/stylesheet.css +++ /dev/null @@ -1,865 +0,0 @@ -/* - * Javadoc style sheet - */ - -@import url('resources/fonts/dejavu.css'); - -/* - * Styles for individual HTML elements. - * - * These are styles that are specific to individual HTML elements. Changing them affects the style of a particular - * HTML element throughout the page. - */ - -body { - background-color:#ffffff; - color:#353833; - font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; - font-size:14px; - margin:0; - padding:0; - height:100%; - width:100%; -} -iframe { - margin:0; - padding:0; - height:100%; - width:100%; - overflow-y:scroll; - border:none; -} -a:link, a:visited { - text-decoration:none; - color:#4A6782; -} -a[href]:hover, a[href]:focus { - text-decoration:none; - color:#bb7a2a; -} -a[name] { - color:#353833; -} -pre { - font-family:'DejaVu Sans Mono', monospace; - font-size:14px; -} -h1 { - font-size:20px; -} -h2 { - font-size:18px; -} -h3 { - font-size:16px; -} -h4 { - font-size:15px; -} -h5 { - font-size:14px; -} -h6 { - font-size:13px; -} -ul { - list-style-type:disc; -} -code, tt { - font-family:'DejaVu Sans Mono', monospace; -} -:not(h1, h2, h3, h4, h5, h6) > code, -:not(h1, h2, h3, h4, h5, h6) > tt { - font-size:14px; - padding-top:4px; - margin-top:8px; - line-height:1.4em; -} -dt code { - font-family:'DejaVu Sans Mono', monospace; - font-size:14px; - padding-top:4px; -} -.summary-table dt code { - font-family:'DejaVu Sans Mono', monospace; - font-size:14px; - vertical-align:top; - padding-top:4px; -} -sup { - font-size:8px; -} -button { - font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; - font-size: 14px; -} -/* - * Styles for HTML generated by javadoc. - * - * These are style classes that are used by the standard doclet to generate HTML documentation. - */ - -/* - * Styles for document title and copyright. - */ -.clear { - clear:both; - height:0; - overflow:hidden; -} -.about-language { - float:right; - padding:0 21px 8px 8px; - font-size:11px; - margin-top:-9px; - height:2.9em; -} -.legal-copy { - margin-left:.5em; -} -.tab { - background-color:#0066FF; - color:#ffffff; - padding:8px; - width:5em; - font-weight:bold; -} -/* - * Styles for navigation bar. - */ -@media screen { - .flex-box { - position:fixed; - display:flex; - flex-direction:column; - height: 100%; - width: 100%; - } - .flex-header { - flex: 0 0 auto; - } - .flex-content { - flex: 1 1 auto; - overflow-y: auto; - } -} -.top-nav { - background-color:#4D7A97; - color:#FFFFFF; - float:left; - padding:0; - width:100%; - clear:right; - min-height:2.8em; - padding-top:10px; - overflow:hidden; - font-size:12px; -} -.sub-nav { - background-color:#dee3e9; - float:left; - width:100%; - overflow:hidden; - font-size:12px; -} -.sub-nav div { - clear:left; - float:left; - padding:0 0 5px 6px; - text-transform:uppercase; -} -.sub-nav .nav-list { - padding-top:5px; -} -ul.nav-list { - display:block; - margin:0 25px 0 0; - padding:0; -} -ul.sub-nav-list { - float:left; - margin:0 25px 0 0; - padding:0; -} -ul.nav-list li { - list-style:none; - float:left; - padding: 5px 6px; - text-transform:uppercase; -} -.sub-nav .nav-list-search { - float:right; - margin:0 0 0 0; - padding:5px 6px; - clear:none; -} -.nav-list-search label { - position:relative; - right:-16px; -} -ul.sub-nav-list li { - list-style:none; - float:left; - padding-top:10px; -} -.top-nav a:link, .top-nav a:active, .top-nav a:visited { - color:#FFFFFF; - text-decoration:none; - text-transform:uppercase; -} -.top-nav a:hover { - text-decoration:none; - color:#bb7a2a; - text-transform:uppercase; -} -.nav-bar-cell1-rev { - background-color:#F8981D; - color:#253441; - margin: auto 5px; -} -.skip-nav { - position:absolute; - top:auto; - left:-9999px; - overflow:hidden; -} -/* - * Hide navigation links and search box in print layout - */ -@media print { - ul.nav-list, div.sub-nav { - display:none; - } -} -/* - * Styles for page header and footer. - */ -.title { - color:#2c4557; - margin:10px 0; -} -.sub-title { - margin:5px 0 0 0; -} -.header ul { - margin:0 0 15px 0; - padding:0; -} -.header ul li, .footer ul li { - list-style:none; - font-size:13px; -} -/* - * Styles for headings. - */ -body.class-declaration-page .summary h2, -body.class-declaration-page .details h2, -body.class-use-page h2, -body.module-declaration-page .block-list h2 { - font-style: italic; - padding:0; - margin:15px 0; -} -body.class-declaration-page .summary h3, -body.class-declaration-page .details h3, -body.class-declaration-page .summary .inherited-list h2 { - background-color:#dee3e9; - border:1px solid #d0d9e0; - margin:0 0 6px -8px; - padding:7px 5px; -} -/* - * Styles for page layout containers. - */ -main { - clear:both; - padding:10px 20px; - position:relative; -} -dl.notes > dt { - font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; - font-size:12px; - font-weight:bold; - margin:10px 0 0 0; - color:#4E4E4E; -} -dl.notes > dd { - margin:5px 10px 10px 0; - font-size:14px; - font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; -} -dl.name-value > dt { - margin-left:1px; - font-size:1.1em; - display:inline; - font-weight:bold; -} -dl.name-value > dd { - margin:0 0 0 1px; - font-size:1.1em; - display:inline; -} -/* - * Styles for lists. - */ -li.circle { - list-style:circle; -} -ul.horizontal li { - display:inline; - font-size:0.9em; -} -div.inheritance { - margin:0; - padding:0; -} -div.inheritance div.inheritance { - margin-left:2em; -} -ul.block-list, -ul.details-list, -ul.member-list, -ul.summary-list { - margin:10px 0 10px 0; - padding:0; -} -ul.block-list > li, -ul.details-list > li, -ul.member-list > li, -ul.summary-list > li { - list-style:none; - margin-bottom:15px; - line-height:1.4; -} -.summary-table dl, .summary-table dl dt, .summary-table dl dd { - margin-top:0; - margin-bottom:1px; -} -ul.see-list, ul.see-list-long { - padding-left: 0; - list-style: none; -} -ul.see-list li { - display: inline; -} -ul.see-list li:not(:last-child):after, -ul.see-list-long li:not(:last-child):after { - content: ", "; - white-space: pre-wrap; -} -/* - * Styles for tables. - */ -.summary-table, .details-table { - width:100%; - border-spacing:0; - border-left:1px solid #EEE; - border-right:1px solid #EEE; - border-bottom:1px solid #EEE; - padding:0; -} -.caption { - position:relative; - text-align:left; - background-repeat:no-repeat; - color:#253441; - font-weight:bold; - clear:none; - overflow:hidden; - padding:0; - padding-top:10px; - padding-left:1px; - margin:0; - white-space:pre; -} -.caption a:link, .caption a:visited { - color:#1f389c; -} -.caption a:hover, -.caption a:active { - color:#FFFFFF; -} -.caption span { - white-space:nowrap; - padding-top:5px; - padding-left:12px; - padding-right:12px; - padding-bottom:7px; - display:inline-block; - float:left; - background-color:#F8981D; - border: none; - height:16px; -} -div.table-tabs { - padding:10px 0 0 1px; - margin:0; -} -div.table-tabs > button { - border: none; - cursor: pointer; - padding: 5px 12px 7px 12px; - font-weight: bold; - margin-right: 3px; -} -div.table-tabs > button.active-table-tab { - background: #F8981D; - color: #253441; -} -div.table-tabs > button.table-tab { - background: #4D7A97; - color: #FFFFFF; -} -.two-column-summary { - display: grid; - grid-template-columns: minmax(15%, max-content) minmax(15%, auto); -} -.three-column-summary { - display: grid; - grid-template-columns: minmax(10%, max-content) minmax(15%, max-content) minmax(15%, auto); -} -.four-column-summary { - display: grid; - grid-template-columns: minmax(10%, max-content) minmax(10%, max-content) minmax(10%, max-content) minmax(10%, auto); -} -@media screen and (max-width: 600px) { - .two-column-summary { - display: grid; - grid-template-columns: 1fr; - } -} -@media screen and (max-width: 800px) { - .three-column-summary { - display: grid; - grid-template-columns: minmax(10%, max-content) minmax(25%, auto); - } - .three-column-summary .col-last { - grid-column-end: span 2; - } -} -@media screen and (max-width: 1000px) { - .four-column-summary { - display: grid; - grid-template-columns: minmax(15%, max-content) minmax(15%, auto); - } -} -.summary-table > div, .details-table > div { - text-align:left; - padding: 8px 3px 3px 7px; -} -.col-first, .col-second, .col-last, .col-constructor-name, .col-summary-item-name { - vertical-align:top; - padding-right:0; - padding-top:8px; - padding-bottom:3px; -} -.table-header { - background:#dee3e9; - font-weight: bold; -} -.col-first, .col-first { - font-size:13px; -} -.col-second, .col-second, .col-last, .col-constructor-name, .col-summary-item-name, .col-last { - font-size:13px; -} -.col-first, .col-second, .col-constructor-name { - vertical-align:top; - overflow: auto; -} -.col-last { - white-space:normal; -} -.col-first a:link, .col-first a:visited, -.col-second a:link, .col-second a:visited, -.col-first a:link, .col-first a:visited, -.col-second a:link, .col-second a:visited, -.col-constructor-name a:link, .col-constructor-name a:visited, -.col-summary-item-name a:link, .col-summary-item-name a:visited, -.constant-values-container a:link, .constant-values-container a:visited, -.all-classes-container a:link, .all-classes-container a:visited, -.all-packages-container a:link, .all-packages-container a:visited { - font-weight:bold; -} -.table-sub-heading-color { - background-color:#EEEEFF; -} -.even-row-color, .even-row-color .table-header { - background-color:#FFFFFF; -} -.odd-row-color, .odd-row-color .table-header { - background-color:#EEEEEF; -} -/* - * Styles for contents. - */ -.deprecated-content { - margin:0; - padding:10px 0; -} -div.block { - font-size:14px; - font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; -} -.col-last div { - padding-top:0; -} -.col-last a { - padding-bottom:3px; -} -.module-signature, -.package-signature, -.type-signature, -.member-signature { - font-family:'DejaVu Sans Mono', monospace; - font-size:14px; - margin:14px 0; - white-space: pre-wrap; -} -.module-signature, -.package-signature, -.type-signature { - margin-top: 0; -} -.member-signature .type-parameters-long, -.member-signature .parameters, -.member-signature .exceptions { - display: inline-block; - vertical-align: top; - white-space: pre; -} -.member-signature .type-parameters { - white-space: normal; -} -/* - * Styles for formatting effect. - */ -.source-line-no { - color:green; - padding:0 30px 0 0; -} -h1.hidden { - visibility:hidden; - overflow:hidden; - font-size:10px; -} -.block { - display:block; - margin:0 10px 5px 0; - color:#474747; -} -.deprecated-label, .descfrm-type-label, .implementation-label, .member-name-label, .member-name-link, -.module-label-in-package, .module-label-in-type, .override-specify-label, .package-label-in-type, -.package-hierarchy-label, .type-name-label, .type-name-link, .search-tag-link, .preview-label { - font-weight:bold; -} -.deprecation-comment, .help-footnote, .preview-comment { - font-style:italic; -} -.deprecation-block { - font-size:14px; - font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; - border-style:solid; - border-width:thin; - border-radius:10px; - padding:10px; - margin-bottom:10px; - margin-right:10px; - display:inline-block; -} -.preview-block { - font-size:14px; - font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; - border-style:solid; - border-width:thin; - border-radius:10px; - padding:10px; - margin-bottom:10px; - margin-right:10px; - display:inline-block; -} -div.block div.deprecation-comment { - font-style:normal; -} -/* - * Styles specific to HTML5 elements. - */ -main, nav, header, footer, section { - display:block; -} -/* - * Styles for javadoc search. - */ -.ui-autocomplete-category { - font-weight:bold; - font-size:15px; - padding:7px 0 7px 3px; - background-color:#4D7A97; - color:#FFFFFF; -} -.result-item { - font-size:13px; -} -.ui-autocomplete { - max-height:85%; - max-width:65%; - overflow-y:scroll; - overflow-x:scroll; - white-space:nowrap; - box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); -} -ul.ui-autocomplete { - position:fixed; - z-index:999999; -} -ul.ui-autocomplete li { - float:left; - clear:both; - width:100%; -} -.result-highlight { - font-weight:bold; -} -#search-input { - background-image:url('resources/glass.png'); - background-size:13px; - background-repeat:no-repeat; - background-position:2px 3px; - padding-left:20px; - position:relative; - right:-18px; - width:400px; -} -#reset-button { - background-color: rgb(255,255,255); - background-image:url('resources/x.png'); - background-position:center; - background-repeat:no-repeat; - background-size:12px; - border:0 none; - width:16px; - height:16px; - position:relative; - left:-4px; - top:-4px; - font-size:0px; -} -.watermark { - color:#545454; -} -.search-tag-desc-result { - font-style:italic; - font-size:11px; -} -.search-tag-holder-result { - font-style:italic; - font-size:12px; -} -.search-tag-result:target { - background-color:yellow; -} -.module-graph span { - display:none; - position:absolute; -} -.module-graph:hover span { - display:block; - margin: -100px 0 0 100px; - z-index: 1; -} -.inherited-list { - margin: 10px 0 10px 0; -} -section.class-description { - line-height: 1.4; -} -.summary section[class$="-summary"], .details section[class$="-details"], -.class-uses .detail, .serialized-class-details { - padding: 0px 20px 5px 10px; - border: 1px solid #ededed; - background-color: #f8f8f8; -} -.inherited-list, section[class$="-details"] .detail { - padding:0 0 5px 8px; - background-color:#ffffff; - border:none; -} -.vertical-separator { - padding: 0 5px; -} -ul.help-section-list { - margin: 0; -} -ul.help-subtoc > li { - display: inline-block; - padding-right: 5px; - font-size: smaller; -} -ul.help-subtoc > li::before { - content: "\2022" ; - padding-right:2px; -} -span.help-note { - font-style: italic; -} -/* - * Indicator icon for external links. - */ -main a[href*="://"]::after { - content:""; - display:inline-block; - background-image:url('data:image/svg+xml; utf8, \ - \ - \ - '); - background-size:100% 100%; - width:7px; - height:7px; - margin-left:2px; - margin-bottom:4px; -} -main a[href*="://"]:hover::after, -main a[href*="://"]:focus::after { - background-image:url('data:image/svg+xml; utf8, \ - \ - \ - '); -} - -/* - * Styles for user-provided tables. - * - * borderless: - * No borders, vertical margins, styled caption. - * This style is provided for use with existing doc comments. - * In general, borderless tables should not be used for layout purposes. - * - * plain: - * Plain borders around table and cells, vertical margins, styled caption. - * Best for small tables or for complex tables for tables with cells that span - * rows and columns, when the "striped" style does not work well. - * - * striped: - * Borders around the table and vertical borders between cells, striped rows, - * vertical margins, styled caption. - * Best for tables that have a header row, and a body containing a series of simple rows. - */ - -table.borderless, -table.plain, -table.striped { - margin-top: 10px; - margin-bottom: 10px; -} -table.borderless > caption, -table.plain > caption, -table.striped > caption { - font-weight: bold; - font-size: smaller; -} -table.borderless th, table.borderless td, -table.plain th, table.plain td, -table.striped th, table.striped td { - padding: 2px 5px; -} -table.borderless, -table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th, -table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td { - border: none; -} -table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr { - background-color: transparent; -} -table.plain { - border-collapse: collapse; - border: 1px solid black; -} -table.plain > thead > tr, table.plain > tbody tr, table.plain > tr { - background-color: transparent; -} -table.plain > thead > tr > th, table.plain > tbody > tr > th, table.plain > tr > th, -table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td { - border: 1px solid black; -} -table.striped { - border-collapse: collapse; - border: 1px solid black; -} -table.striped > thead { - background-color: #E3E3E3; -} -table.striped > thead > tr > th, table.striped > thead > tr > td { - border: 1px solid black; -} -table.striped > tbody > tr:nth-child(even) { - background-color: #EEE -} -table.striped > tbody > tr:nth-child(odd) { - background-color: #FFF -} -table.striped > tbody > tr > th, table.striped > tbody > tr > td { - border-left: 1px solid black; - border-right: 1px solid black; -} -table.striped > tbody > tr > th { - font-weight: normal; -} -/** - * Tweak font sizes and paddings for small screens. - */ -@media screen and (max-width: 1050px) { - #search-input { - width: 300px; - } -} -@media screen and (max-width: 800px) { - #search-input { - width: 200px; - } - .top-nav, - .bottom-nav { - font-size: 11px; - padding-top: 6px; - } - .sub-nav { - font-size: 11px; - } - .about-language { - padding-right: 16px; - } - ul.nav-list li, - .sub-nav .nav-list-search { - padding: 6px; - } - ul.sub-nav-list li { - padding-top: 5px; - } - main { - padding: 10px; - } - .summary section[class$="-summary"], .details section[class$="-details"], - .class-uses .detail, .serialized-class-details { - padding: 0 8px 5px 8px; - } - body { - -webkit-text-size-adjust: none; - } -} -@media screen and (max-width: 500px) { - #search-input { - width: 150px; - } - .top-nav, - .bottom-nav { - font-size: 10px; - } - .sub-nav { - font-size: 10px; - } - .about-language { - font-size: 10px; - padding-right: 12px; - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/tag-search-index.js b/DeFi-Data-Engine/DeFi Data Engine/doc/tag-search-index.js deleted file mode 100644 index 0367dae6..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/tag-search-index.js +++ /dev/null @@ -1 +0,0 @@ -tagSearchIndex = [];updateSearchResults(); \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/Router1.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/Router1.html deleted file mode 100644 index 1d662465..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/Router1.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - -Router1 - - - - - - - - - - - - - - - -
      - -
      -
      - -
      - -

      Class Router1

      -
      -
      java.lang.Object -
      org.framework.router.Router -
      test.framework.router.Router1
      -
      -
      -
      -
      -
      class Router1 -extends Router
      -
      -
      - -
      -
      -
        - -
      • -
        -

        Constructor Details

        -
          -
        • -
          -

          Router1

          -
          public Router1()
          -
          -
        • -
        -
        -
      • - -
      • -
        -

        Method Details

        - -
        -
      • -
      -
      - -
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/Router2.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/Router2.html deleted file mode 100644 index 5459de53..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/Router2.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - -Router2 - - - - - - - - - - - - - - - -
      - -
      -
      - -
      - -

      Class Router2

      -
      -
      java.lang.Object -
      org.framework.router.Router -
      test.framework.router.Router2
      -
      -
      -
      -
      -
      class Router2 -extends Router
      -
      -
      - -
      -
      -
        - -
      • -
        -

        Constructor Details

        -
          -
        • -
          -

          Router2

          -
          public Router2()
          -
          -
        • -
        -
        -
      • - -
      • -
        -

        Method Details

        - -
        -
      • -
      -
      - -
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/RouterTemp.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/RouterTemp.html deleted file mode 100644 index 407ff049..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/RouterTemp.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - -RouterTemp - - - - - - - - - - - - - - - -
      - -
      -
      - -
      - -

      Class RouterTemp

      -
      -
      java.lang.Object -
      org.framework.router.Router -
      test.framework.router.RouterTemp
      -
      -
      -
      -
      -
      class RouterTemp -extends Router
      -
      -
      - -
      -
      -
        - -
      • -
        -

        Constructor Details

        -
          -
        • -
          -

          RouterTemp

          -
          public RouterTemp(String uuid, - String tag)
          -
          -
        • -
        -
        -
      • - -
      • -
        -

        Method Details

        - -
        -
      • -
      -
      - -
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/RouterTemplate.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/RouterTemplate.html deleted file mode 100644 index b1dacac0..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/RouterTemplate.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - -RouterTemplate - - - - - - - - - - - - - - - -
      - -
      -
      - -
      - -

      Class RouterTemplate

      -
      -
      java.lang.Object -
      org.framework.router.Router -
      test.framework.router.RouterTemplate
      -
      -
      -
      -
      -
      class RouterTemplate -extends Router
      -
      -
      - -
      -
      -
        - -
      • -
        -

        Field Details

        -
          -
        • -
          -

          num

          -
          private int num
          -
          -
        • -
        -
        -
      • - -
      • -
        -

        Constructor Details

        -
          -
        • -
          -

          RouterTemplate

          -
          public RouterTemplate(String uuid, - String tag)
          -
          -
        • -
        • -
          -

          RouterTemplate

          -
          public RouterTemplate(int num, - String uuid, - String tag)
          -
          -
        • -
        -
        -
      • - -
      • -
        -

        Method Details

        - -
        -
      • -
      -
      - -
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/TestManager.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/TestManager.html deleted file mode 100644 index 3b4d25d3..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/TestManager.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - -TestManager - - - - - - - - - - - - - - - -
      - -
      -
      - -
      - -

      Class TestManager

      -
      -
      java.lang.Object -
      test.framework.router.TestManager
      -
      -
      -
      -
      public class TestManager -extends Object
      -
      -
      - -
      -
      -
        - -
      • -
        -

        Constructor Details

        -
          -
        • -
          -

          TestManager

          -
          public TestManager()
          -
          -
        • -
        -
        -
      • - -
      • -
        -

        Method Details

        -
          -
        • -
          -

          TestConnection

          -
          public void TestConnection()
          -
          -
        • -
        • -
          -

          TestExistingConnection

          -
          public void TestExistingConnection()
          -
          -
        • -
        • -
          -

          TestSends

          -
          public void TestSends()
          -
          -
        • -
        -
        -
      • -
      -
      - -
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/TestPacket.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/TestPacket.html deleted file mode 100644 index e17a790e..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/TestPacket.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - -TestPacket - - - - - - - - - - - - - - - -
      - -
      -
      - -
      - -

      Class TestPacket

      -
      -
      java.lang.Object -
      test.framework.router.TestPacket
      -
      -
      -
      -
      public class TestPacket -extends Object
      -
      -
      - -
      -
      -
        - -
      • -
        -

        Constructor Details

        -
          -
        • -
          -

          TestPacket

          -
          public TestPacket()
          -
          -
        • -
        -
        -
      • - -
      • -
        -

        Method Details

        -
          -
        • -
          -

          TestCreatePacket

          -
          public void TestCreatePacket()
          -
          -
        • -
        -
        -
      • -
      -
      - -
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/TestPacketRouter.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/TestPacketRouter.html deleted file mode 100644 index 202e21b4..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/TestPacketRouter.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - -TestPacketRouter - - - - - - - - - - - - - - - -
      - -
      -
      - -
      - -

      Class TestPacketRouter

      -
      -
      java.lang.Object -
      org.framework.router.Router -
      test.framework.router.TestPacketRouter
      -
      -
      -
      -
      -
      class TestPacketRouter -extends Router
      -
      -
      - -
      -
      -
        - -
      • -
        -

        Constructor Details

        -
          -
        • -
          -

          TestPacketRouter

          -
          public TestPacketRouter()
          -
          -
        • -
        -
        -
      • - -
      • -
        -

        Method Details

        - -
        -
      • -
      -
      - -
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/TestRouter.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/TestRouter.html deleted file mode 100644 index e77ddf05..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/TestRouter.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - -TestRouter - - - - - - - - - - - - - - - -
      - -
      -
      - -
      - -

      Class TestRouter

      -
      -
      java.lang.Object -
      test.framework.router.TestRouter
      -
      -
      -
      -
      public class TestRouter -extends Object
      -
      -
      - -
      -
      -
        - -
      • -
        -

        Constructor Details

        -
          -
        • -
          -

          TestRouter

          -
          public TestRouter()
          -
          -
        • -
        -
        -
      • - -
      • -
        -

        Method Details

        -
          -
        • -
          -

          TestSimpleRouterConnection

          -
          public void TestSimpleRouterConnection()
          -
          -
        • -
        • -
          -

          TestSimpleRouterSendPacket

          -
          public void TestSimpleRouterSendPacket()
          -
          -
        • -
        • -
          -

          TestCentralRouterConnection

          -
          public void TestCentralRouterConnection()
          -
          -
        • -
        • -
          -

          TestComplexRouterConnection

          -
          public void TestComplexRouterConnection()
          -
          -
        • -
        • -
          -

          TestComplexRouterSend

          -
          public void TestComplexRouterSend()
          -
          -
        • -
        • -
          -

          TestExistingConnection

          -
          public void TestExistingConnection()
          -
          -
        • -
        -
        -
      • -
      -
      - -
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/Router1.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/Router1.html deleted file mode 100644 index d4709d54..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/Router1.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class test.framework.router.Router1 - - - - - - - - - - - - - - - -
      - -
      -
      -
      -

      Uses of Class
      test.framework.router.Router1

      -
      -No usage of test.framework.router.Router1
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/Router2.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/Router2.html deleted file mode 100644 index d468b91c..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/Router2.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class test.framework.router.Router2 - - - - - - - - - - - - - - - -
      - -
      -
      -
      -

      Uses of Class
      test.framework.router.Router2

      -
      -No usage of test.framework.router.Router2
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/RouterTemp.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/RouterTemp.html deleted file mode 100644 index 78ab400a..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/RouterTemp.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class test.framework.router.RouterTemp - - - - - - - - - - - - - - - -
      - -
      -
      -
      -

      Uses of Class
      test.framework.router.RouterTemp

      -
      -No usage of test.framework.router.RouterTemp
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/RouterTemplate.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/RouterTemplate.html deleted file mode 100644 index 13e4c73a..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/RouterTemplate.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class test.framework.router.RouterTemplate - - - - - - - - - - - - - - - -
      - -
      -
      -
      -

      Uses of Class
      test.framework.router.RouterTemplate

      -
      -No usage of test.framework.router.RouterTemplate
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/TestManager.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/TestManager.html deleted file mode 100644 index d3e788b3..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/TestManager.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class test.framework.router.TestManager - - - - - - - - - - - - - - - -
      - -
      -
      -
      -

      Uses of Class
      test.framework.router.TestManager

      -
      -No usage of test.framework.router.TestManager
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/TestPacket.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/TestPacket.html deleted file mode 100644 index 7c55d7a0..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/TestPacket.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class test.framework.router.TestPacket - - - - - - - - - - - - - - - -
      - -
      -
      -
      -

      Uses of Class
      test.framework.router.TestPacket

      -
      -No usage of test.framework.router.TestPacket
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/TestPacketRouter.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/TestPacketRouter.html deleted file mode 100644 index 8d305604..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/TestPacketRouter.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class test.framework.router.TestPacketRouter - - - - - - - - - - - - - - - -
      - -
      -
      -
      -

      Uses of Class
      test.framework.router.TestPacketRouter

      -
      -No usage of test.framework.router.TestPacketRouter
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/TestRouter.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/TestRouter.html deleted file mode 100644 index 533f30cc..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/class-use/TestRouter.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class test.framework.router.TestRouter - - - - - - - - - - - - - - - -
      - -
      -
      -
      -

      Uses of Class
      test.framework.router.TestRouter

      -
      -No usage of test.framework.router.TestRouter
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/package-summary.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/package-summary.html deleted file mode 100644 index 09eadf47..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/package-summary.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - -test.framework.router - - - - - - - - - - - - - - - -
      - -
      -
      -
      -

      Package test.framework.router

      -
      -
      -
      package test.framework.router
      -
      - -
      -
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/package-tree.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/package-tree.html deleted file mode 100644 index a86a5f99..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/package-tree.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - -test.framework.router Class Hierarchy - - - - - - - - - - - - - - - -
      - -
      -
      -
      -

      Hierarchy For Package test.framework.router

      -Package Hierarchies: - -
      -
      -

      Class Hierarchy

      - -
      -
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/package-use.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/package-use.html deleted file mode 100644 index 1325b330..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/framework/router/package-use.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Package test.framework.router - - - - - - - - - - - - - - - -
      - -
      -
      -
      -

      Uses of Package
      test.framework.router

      -
      -No usage of test.framework.router
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/protocols/TestESH.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/protocols/TestESH.html deleted file mode 100644 index ed4d4fb3..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/protocols/TestESH.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - -TestESH - - - - - - - - - - - - - - - -
      - -
      -
      - -
      - -

      Class TestESH

      -
      -
      java.lang.Object -
      test.protocols.TestESH
      -
      -
      -
      -
      public class TestESH -extends Object
      -
      -
      - -
      -
      -
        - -
      • -
        -

        Constructor Details

        -
          -
        • -
          -

          TestESH

          -
          public TestESH()
          -
          -
        • -
        -
        -
      • - -
      • -
        -

        Method Details

        -
          -
        • -
          -

          TestEXSR

          -
          public void TestEXSR()
          -
          -
        • -
        • -
          -

          TestEXST

          -
          public void TestEXST()
          -
          -
        • -
        • -
          -

          TestINIT

          -
          public void TestINIT()
          -
          -
        • -
        • -
          -

          TestIATH

          -
          public void TestIATH()
          -
          -
        • -
        • -
          -

          TestIATV

          -
          public void TestIATV()
          -
          -
        • -
        • -
          -

          TestEXEC

          -
          public void TestEXEC()
          -
          -
        • -
        • -
          -

          TestKILL

          -
          public void TestKILL()
          -
          -
        • -
        -
        -
      • -
      -
      - -
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/protocols/TestSRC.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/protocols/TestSRC.html deleted file mode 100644 index a57b0724..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/protocols/TestSRC.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - -TestSRC - - - - - - - - - - - - - - - -
      - -
      -
      - -
      - -

      Class TestSRC

      -
      -
      java.lang.Object -
      test.protocols.TestSRC
      -
      -
      -
      -
      public class TestSRC -extends Object
      -
      -
      - -
      -
      -
        - -
      • -
        -

        Constructor Details

        -
          -
        • -
          -

          TestSRC

          -
          public TestSRC()
          -
          -
        • -
        -
        -
      • - -
      • -
        -

        Method Details

        -
          -
        • -
          -

          TestEXSR

          -
          public void TestEXSR()
          -
          -
        • -
        • -
          -

          TestEXST

          -
          public void TestEXST()
          -
          -
        • -
        • -
          -

          TestINIT

          -
          public void TestINIT()
          -
          -
        • -
        • -
          -

          TestIATH

          -
          public void TestIATH()
          -
          -
        • -
        • -
          -

          TestIATV

          -
          public void TestIATV()
          -
          -
        • -
        • -
          -

          TestEXEC

          -
          public void TestEXEC()
          -
          -
        • -
        • -
          -

          TestKILL

          -
          public void TestKILL()
          -
          -
        • -
        • -
          -

          TestSUBS

          -
          public void TestSUBS()
          -
          -
        • -
        • -
          -

          TestRQST

          -
          public void TestRQST()
          -
          -
        • -
        -
        -
      • -
      -
      - -
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/protocols/class-use/TestESH.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/protocols/class-use/TestESH.html deleted file mode 100644 index ebb67409..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/protocols/class-use/TestESH.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class test.protocols.TestESH - - - - - - - - - - - - - - - -
      - -
      -
      -
      -

      Uses of Class
      test.protocols.TestESH

      -
      -No usage of test.protocols.TestESH
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/protocols/class-use/TestSRC.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/protocols/class-use/TestSRC.html deleted file mode 100644 index 881b548d..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/protocols/class-use/TestSRC.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class test.protocols.TestSRC - - - - - - - - - - - - - - - -
      - -
      -
      -
      -

      Uses of Class
      test.protocols.TestSRC

      -
      -No usage of test.protocols.TestSRC
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/protocols/package-summary.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/protocols/package-summary.html deleted file mode 100644 index 69fda867..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/protocols/package-summary.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - -test.protocols - - - - - - - - - - - - - - - -
      - -
      -
      -
      -

      Package test.protocols

      -
      -
      -
      package test.protocols
      -
      - -
      -
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/protocols/package-tree.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/protocols/package-tree.html deleted file mode 100644 index d1a3a0ba..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/protocols/package-tree.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - -test.protocols Class Hierarchy - - - - - - - - - - - - - - - -
      - -
      -
      -
      -

      Hierarchy For Package test.protocols

      -Package Hierarchies: - -
      -
      -

      Class Hierarchy

      - -
      -
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/protocols/package-use.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/protocols/package-use.html deleted file mode 100644 index a92fd068..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/protocols/package-use.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Package test.protocols - - - - - - - - - - - - - - - -
      - -
      -
      -
      -

      Uses of Package
      test.protocols

      -
      -No usage of test.protocols
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/RouterTemplate.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/RouterTemplate.html deleted file mode 100644 index 1c0f120b..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/RouterTemplate.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - -RouterTemplate - - - - - - - - - - - - - - - -
      - -
      -
      - -
      -
      Package test.speed
      -

      Class RouterTemplate

      -
      -
      java.lang.Object -
      org.framework.router.Router -
      test.speed.RouterTemplate
      -
      -
      -
      -
      -
      class RouterTemplate -extends Router
      -
      -
      - -
      -
      -
        - -
      • -
        -

        Field Details

        -
          -
        • -
          -

          num

          -
          private int num
          -
          -
        • -
        -
        -
      • - -
      • -
        -

        Constructor Details

        -
          -
        • -
          -

          RouterTemplate

          -
          public RouterTemplate(String uuid, - String tag)
          -
          -
        • -
        • -
          -

          RouterTemplate

          -
          public RouterTemplate(int num, - String uuid, - String tag)
          -
          -
        • -
        -
        -
      • - -
      • -
        -

        Method Details

        - -
        -
      • -
      -
      - -
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/TestRouterSendSpeed.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/TestRouterSendSpeed.html deleted file mode 100644 index a41317fa..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/TestRouterSendSpeed.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - -TestRouterSendSpeed - - - - - - - - - - - - - - - -
      - -
      -
      - -
      -
      Package test.speed
      -

      Class TestRouterSendSpeed

      -
      -
      java.lang.Object -
      test.speed.TestRouterSendSpeed
      -
      -
      -
      -
      public class TestRouterSendSpeed -extends Object
      -
      -
      - -
      -
      -
        - -
      • -
        -

        Constructor Details

        -
          -
        • -
          -

          TestRouterSendSpeed

          -
          public TestRouterSendSpeed()
          -
          -
        • -
        -
        -
      • - -
      • -
        -

        Method Details

        -
          -
        • -
          -

          main

          -
          public static void main(String[] args)
          -
          -
        • -
        -
        -
      • -
      -
      - -
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/class-use/RouterTemplate.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/class-use/RouterTemplate.html deleted file mode 100644 index 0a25bd2b..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/class-use/RouterTemplate.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class test.speed.RouterTemplate - - - - - - - - - - - - - - - -
      - -
      -
      -
      -

      Uses of Class
      test.speed.RouterTemplate

      -
      -No usage of test.speed.RouterTemplate
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/class-use/TestRouterSendSpeed.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/class-use/TestRouterSendSpeed.html deleted file mode 100644 index fc1bf5c9..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/class-use/TestRouterSendSpeed.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Class test.speed.TestRouterSendSpeed - - - - - - - - - - - - - - - -
      - -
      -
      -
      -

      Uses of Class
      test.speed.TestRouterSendSpeed

      -
      -No usage of test.speed.TestRouterSendSpeed
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/package-summary.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/package-summary.html deleted file mode 100644 index be813c9a..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/package-summary.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - -test.speed - - - - - - - - - - - - - - - -
      - -
      -
      -
      -

      Package test.speed

      -
      -
      -
      package test.speed
      -
      - -
      -
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/package-tree.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/package-tree.html deleted file mode 100644 index 46c8524e..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/package-tree.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - -test.speed Class Hierarchy - - - - - - - - - - - - - - - -
      - -
      -
      -
      -

      Hierarchy For Package test.speed

      -Package Hierarchies: - -
      -
      -

      Class Hierarchy

      - -
      -
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/package-use.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/package-use.html deleted file mode 100644 index 1aec186d..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/package-use.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Uses of Package test.speed - - - - - - - - - - - - - - - -
      - -
      -
      -
      -

      Uses of Package
      test.speed

      -
      -No usage of test.speed
      -
      -
      - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/type-search-index.js b/DeFi-Data-Engine/DeFi Data Engine/doc/type-search-index.js deleted file mode 100644 index b2a677c6..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/doc/type-search-index.js +++ /dev/null @@ -1 +0,0 @@ -typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"org.stream.external.connected.connections","l":"AmberDataConnection"},{"p":"org.out.controller","l":"Controller"},{"p":"org.core.core","l":"Core"},{"p":"org.core.engine","l":"Engine"},{"p":"org.stream.external.handler","l":"ExternalStreamConnection"},{"p":"org.stream.external.handler","l":"ExternalStreamHandler"},{"p":"org.stream.external.handler","l":"ExternalStreamManager"},{"p":"org.framework.interfaces","l":"Hash"},{"p":"org.stream.local.handler","l":"LocalStreamConnection"},{"p":"org.stream.local.handler","l":"LocalStreamHandler"},{"p":"org.stream.local.handler","l":"LocalStreamManager"},{"p":"org.core.logger","l":"Logger"},{"p":"org.core.logger","l":"LogSeverity"},{"p":"org.main","l":"Main"},{"p":"org.framework.router","l":"Manager"},{"p":"org.out.handler","l":"OutputHandler"},{"p":"org.out.handler","l":"OutputLiveConnection"},{"p":"org.out.handler","l":"OutputStaticConnection"},{"p":"org.framework.router","l":"Packet"},{"p":"org.framework.router","l":"Response"},{"p":"org.framework.router","l":"ResponseFactory"},{"p":"org.framework.router","l":"Router"},{"p":"test.framework.router","l":"Router1"},{"p":"test.framework.router","l":"Router2"},{"p":"test.framework.router","l":"RouterTemp"},{"p":"test.framework.router","l":"RouterTemplate"},{"p":"test.speed","l":"RouterTemplate"},{"p":"org.stream.registry","l":"StreamAuthorization"},{"p":"org.stream.manager","l":"StreamManager"},{"p":"org.stream.registry","l":"StreamRegistryController"},{"p":"org.stream.external.connected.connections","l":"TemplateConnection"},{"p":"org.stream.local.connected.connections","l":"TemplateConnection"},{"p":"test.protocols","l":"TestESH"},{"p":"test.framework.router","l":"TestManager"},{"p":"test.framework.router","l":"TestPacket"},{"p":"test.framework.router","l":"TestPacketRouter"},{"p":"test.framework.router","l":"TestRouter"},{"p":"test.speed","l":"TestRouterSendSpeed"},{"p":"test.protocols","l":"TestSRC"},{"p":"org.framework.interfaces","l":"UUID"}];updateSearchResults(); \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/pom.xml b/DeFi-Data-Engine/DeFi Data Engine/pom.xml deleted file mode 100644 index 972a27ff..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/pom.xml +++ /dev/null @@ -1,95 +0,0 @@ - - 4.0.0 - DeFiDataEngine - defi-data-engine - 0.0.1 - jar - - - - org.reflections - reflections - 0.10.2 - - - org.slf4j - slf4j-api - 1.7.5 - - - org.slf4j - slf4j-log4j12 - 1.7.5 - - - log4j - log4j - 1.2.17 - - - org.mongodb - mongo-java-driver - 3.12.11 - - - com.squareup.okhttp3 - okhttp - 4.2.0 - - - org.json - json - 20220320 - - - junit - junit - 4.13.2 - - - - - com.datastax.oss - java-driver-core - 4.9.0 - - - - - - - - - maven-surefire-plugin - 3.0.0-M5 - - - log4j.xml - - - - - - maven-assembly-plugin - - - - org.main.Main - - - - jar-with-dependencies - - - - - - - - 17 - 1.8 - 1.8 - - - - diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/core/Core.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/core/Core.java deleted file mode 100644 index 36debac0..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/core/Core.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.core.core; - -import org.core.engine.Engine; -import org.core.logger.Logger; -import org.framework.router.Response; -import org.framework.router.Router; -import org.out.controller.Controller; -import org.out.handler.OutputHandler; -import org.stream.manager.StreamManager; - -public class Core extends Router { - - public Core() { - super("core", "COR"); - - OutputHandler out = new OutputHandler(); - Controller crl = new Controller(); - Engine eng = new Engine(); - StreamManager str = new StreamManager(); - - this.connect(out, crl, eng, str); - - Response response = this.send("ENG", "STRT"); - if(response.code() != 200) - Logger.terminate(response); - } -} \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/engine/Engine.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/engine/Engine.java deleted file mode 100644 index d5315ff0..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/engine/Engine.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.core.engine; - -import org.framework.router.Packet; -import org.framework.router.Response; -import org.framework.router.ResponseFactory; -import org.framework.router.Router; -import org.properties.Config; - -public class Engine extends Router { - - public Engine() { - super("engine", "ENG"); - } - - // source: source of the local stream to initialize - public Response processSTRT(Packet packet) { - // start output processes: - Response out_response = send("OUT", "STRT"); - if(out_response.code() != 200) - return out_response; - - // start local stream handler processes: - String lsh_type = Config.getProperty("stream", "local.stream.type"); - if(!lsh_type.equals("null")) { - Response lsh_response = send("LSH", "INIT", "source", lsh_type); - if(lsh_response.code() != 200) - return lsh_response; - } - - return ResponseFactory.response200(); - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/logger/LogSeverity.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/logger/LogSeverity.java deleted file mode 100644 index 49701500..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/logger/LogSeverity.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.core.logger; - -/** - * {@link LogSeverity} is a enum class used by all processes that interact - * with the {@link Logger} class. There are several values which are used - * to determine the severity of the message passed to the {@link Logger}. - * - * {@link LogSeverity#INFO}: General information regarding the system. - * {@link LogSeverity#WARNING}: Warnings about system inconsistencies. - * {@link LogSeverity#ERROR}: Errors that cause system failure. - * - * @author Conor Flynn - * - */ -public enum LogSeverity { - - INFO("INFO"), - WARNING("WARNING"), - ERROR("ERROR"); - - private final String tag; - - private LogSeverity(String tag) { - this.tag = tag; - } - - /** - * Tag related to the enum for printing. - * - * @return String corresponding to the given enum. - */ - public String getTag() { - return tag; - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/logger/Logger.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/logger/Logger.java deleted file mode 100644 index 4b849f56..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/logger/Logger.java +++ /dev/null @@ -1,80 +0,0 @@ -package org.core.logger; - -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; - -import org.framework.router.Packet; -import org.framework.router.Response; - -public class Logger { - - public static final void log(String message) { - System.out.println(messageFormat("INFO", message)); - } - - public static final void log(Packet packet) { - System.out.println(packetFormat(packet)); - } - - public static final void log(Response response) { - System.out.println(responseFormat(response)); - } - - public static final void warn(String message) { - System.out.println(messageFormat("WARN", message)); - } - - public static final void warn(Packet packet) { - System.err.println(packetFormat(packet)); - } - - public static final void warn(Response response) { - System.err.println(responseFormat(response)); - } - - public static final void terminate(String message) { - System.err.println(messageFormat("ERROR", message)); - } - - public static final void terminate(Packet packet) { - System.err.println(packetFormat(packet)); - System.exit(1); - } - - public static final void terminate(Response response) { - System.err.println(responseFormat(response)); - System.exit(1); - } - - private static final String messageFormat(String type, String message) { - return String.format("[%s] [%-10s] %-9s- [%s]", - time(), - Thread.currentThread().getName(), - type, - message); - } - - private static final String packetFormat(Packet packet) { - return String.format("[%s] [%-10s] PACKET - [%3s -> %3s] [%4s] [%s]", - time(), - Thread.currentThread().getName(), - packet.getSender(), - packet.getTag(), - packet.getSubTag(), - packet.getData()); - } - - private static final String responseFormat(Response response) { - return String.format("[%s] [%-10s] RESPONSE - [%3d] [%s] [%s]", - time(), - Thread.currentThread().getName(), - response.code(), - response.message(), - response.data()); - } - - private static final String time() { - return LocalDateTime.now() - .format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.nnnnnnnnn")); - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/interfaces/Hash.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/interfaces/Hash.java deleted file mode 100644 index 4be60859..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/interfaces/Hash.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.framework.interfaces; - -import java.util.HashMap; - -/** - * Interface used for requiring components to have a unique hash based on the passed data. - * The hash does not require any standard formatting so long as it is unique. - *
      - * The standard algorithm that will be used is a salted SHA-512. - * - * @author Conor Flynn - */ -public interface Hash { - /** - * Unique hash based on the passed data for identification. Algorithm is recommended to be - * a salted SHA-512. - * - * @param data {@link HashMap} which holds all data, primarily that used for authorization. - * @return {@link String} that contains the newly created hash. - */ - public String getHash(HashMap data); -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/interfaces/UUID.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/interfaces/UUID.java deleted file mode 100644 index 78b6ffca..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/interfaces/UUID.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.framework.interfaces; - -/** - * The UUID interface is used for requiring reflected classes to have a unique id that - * they can be referenced by. - *
      - * Standard syntax for a UUID is all lower case, no numbers, and words being separated - * by _. - */ -public interface UUID { - - /** - * UUID of the implementing class. Recommended to follow standard syntax - * as referenced by {@link UUID}. - * - * @return {@link String} representing the UUID of the implementing class. - */ - public String getUUID(); -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Manager.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Manager.java deleted file mode 100644 index 209085e3..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Manager.java +++ /dev/null @@ -1,132 +0,0 @@ -package org.framework.router; - -import java.util.Collection; -import java.util.HashMap; -import java.util.UUID; - -/** - * The {@link Manager} class is used to handle all {@link Router} connections. - * {@link Manager} objects have the ability to merge and combine networks of - * {@link Router} objects efficiently and effectively. - * - * @author Conor Flynn - * - */ -public class Manager { - - private final String uuid; - private final HashMap routers; - - /** - * Private constructor used to create a new {@link Manager} object. - * Used by {@link Manager#create(Router)} to connect the newly created - * object to a {@link Router}. - */ - private Manager() { - uuid = UUID.randomUUID().toString(); - routers = new HashMap(); - } - - /** - * Uniquely generated UUID created on object initialization. - * - * @return String representing the UUID of the object. - */ - public String getUUID() { - return uuid; - } - - /** - * String representation of the {@link Manager} object. - * - * @return UUID of the object. See {@link Manager#getUUID()} for more information. - */ - public String toString() { - return getUUID(); - } - - /** - * Connects a {@link Router} object to the {@link Manager} object. Allows it to send - * {@link Packet} object's to any {@link Router} on the network through {@link Manager#send(Packet)}. - * - * @param router {@link Router} object to connect to the {@link Manager} object. - */ - protected void connect(Router router) { - if(isConnected(router.getTag())) - return; - - routers.put(router.getTag(), router); - } - - /** - * Disconnects a {@link Router} object from the {@link Manager} object. Removes access from - * sending any {@link Packet} object's to any {@link Router} connected to the network. - * - * @param router {@link Router} object to disconnect from the {@link Manager} object. - */ - protected void disconnect(Router router) { - if(!isConnected(router.getTag())) - return; - - routers.remove(router.getTag()); - } - - /** - * Checks to see if a {@link Router} object with the specified tag is connected - * to the network. - * - * @param tag Tag of the {@link Router} object to determine if it is connected to the network. - * @return Boolean determining if a {@link Router} with the given tag exists on the network. - */ - public boolean isConnected(String tag) { - return routers.containsKey(tag); - } - - /** - * Collection of all {@link Router} objects connected to the {@link Manager} object. - * - * @return Collection of all {@link Router} objects stored within the {@link Manager}. - */ - public Collection connected() { - return routers.values(); - } - - /** - * Collection of all {@link Router} object tags connected to the {@link Manager} object. - * - * @return Collection of all {@link Router} object tags stored within the {@link Manager}. - */ - protected Collection tags() { - return routers.keySet(); - } - - /** - * Sends a {@link Packet} object between two {@link Router} objects stored in the network. Sent - * packets are required to return a {@link Response} to the sender that determines the result - * of the sent {@link Packet}. - * - * @param packet {@link Packet} object to send to the {@link Router}. - * @return {@link Response} object returned from the receiver determining the state of the action performed - * by the sent packet. - */ - public Response send(Packet packet) { - if(!routers.containsKey(packet.getTag())) - return ResponseFactory.response404(packet.getSender(), packet.getTag()); - - return routers.get(packet.getTag()).receive(packet); - } - - /** - * Static function used to create a new {@link Manager} object. Called by a {@link Router} - * object when necessary. Automatically connects the passed {@link Router} to the {@link Manager} - * upon initialization. - * - * @param router {@link Router} object that creates the {@link Manager} and then automatically connects to it. - * @return New {@link Manager} object with the parameterized {@code router} object connected. - */ - protected static Manager create(Router router) { - Manager manager = new Manager(); - manager.connect(router); - return manager; - } -} \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Packet.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Packet.java deleted file mode 100644 index 6ed0eff8..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Packet.java +++ /dev/null @@ -1,147 +0,0 @@ -package org.framework.router; - -import java.util.HashMap; - -import org.core.logger.Logger; -import org.properties.Config; - -/** - * The {@link Packet} class represents a standardized data transfer object - * used throughout the engine. It contains a series of values which help to - * route it to different processes. This class interacts heavily with the - * {@link Router} class. - * - * @author Conor Flynn - * - */ -public class Packet { - - private final static boolean log = Config.getProperty("app", "general.logging.packets").equals("true"); - - private final String sender; - private final String tag; - private final String sub_tag; - private final HashMap data; - - /** - * Initializes a new {@link Packet} object. - * - * @param router {@link Router} object the {@link Packet} was sent from. - * @param tag Tag of the destination the {@link Packet} will be sent to. - * @param sub_tag Sub tag describing the action performed at the destination. - * @param data Data transmitted through the {@link Packet} for processing at the destination. - */ - private Packet(Router router, String tag, String sub_tag, HashMap data) { - this.sender = router.getTag(); - this.tag = tag; - this.sub_tag = sub_tag; - this.data = data; - } - - /** - * Tag of the {@link Router} object that sent the {@link Packet}. - * - * @return Tag of the sending {@link Router} object. - */ - public final String getSender() { - return sender; - } - - /** - * Tag of the destination the {@link Packet} will be sent to. - * - * @return Tag of the {@link Router} the {@link Packet} is being sent to. - */ - public final String getTag() { - return tag; - } - - /** - * Sub tag determining the action of the {@link Packet} at the destination. - * - * @return Sub tag of the {@link Packet} object. - */ - public final String getSubTag() { - return sub_tag; - } - - public final boolean containsKey(String key) { - return data.containsKey(key); - } - - /** - * Data transmitted through the {@link Packet} for processing at the destination. - * - * @return String containing all data sent. - */ - public final HashMap getData() { - return data; - } - - /** - * Retrieves data point stored within {@link Packet}. - * - * @param key Key that the data point is stored under. - * @return {@link String} containing data stored. - */ - public final String getData(String key) { - if(data.containsKey(key)) - return data.get(key); - - return null; - } - - public final String validate(String... keys) { - if(keys == null) - return null; - - for(String key : keys) - if(!data.containsKey(key) || data.get(key).equals("")) - return key; - - return null; - } - - /** - * Factory method used to create a {@link Packet} object. - * - * @param router {@link Router} object the {@link Packet} was sent from. - * @param tag Tag of the destination the {@link Packet} will be sent to. - * @param sub_tag Sub tag describing the action performed at the destination. - * @param data Data transmitted through the {@link Packet} for processing at the destination. - * @return New {@link Packet} object. - */ - public static Packet packet(Router router, String tag, String sub_tag, HashMap data) { - if(data == null) - return null; - - Packet packet = new Packet(router, tag, sub_tag, data); - if(log) - Logger.log(packet); - return packet; - } - - /** - * Factory method used to create a {@link Packet} object. - * - * @param router {@link Router} object the {@link Packet} was sent from. - * @param tag Tag of the destination the {@link Packet} will be sent to. - * @param sub_tag Sub tag describing the action performed at the destination. - * @param data Data transmitted through the {@link Packet} for processing at the destination. - * @param sub_data Supporting data used for processing and transmitting from {@code data}. - * @return New {@link Packet} object. - */ - public static Packet packet(Router router, String tag, String sub_tag, String... data) { - if(data.length % 2 != 0) - return null; - - HashMap map = new HashMap(); - for(int i = 0; i < data.length; i+=2) - map.put(data[i], data[i + 1]); - - Packet packet = new Packet(router, tag, sub_tag, map); - if(log) - Logger.log(packet); - return packet; - } -} \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Response.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Response.java deleted file mode 100644 index cc71631a..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Response.java +++ /dev/null @@ -1,120 +0,0 @@ -package org.framework.router; - -import org.core.logger.Logger; -import org.properties.Config; - -/** - * The {@link Response} class is used to relay information from a - * given {@link Packet} sent through a {@link Router}. {@link Response} - * objects contain two fields: code and message. - * - * The code refers to the response code listed in the documentation, which - * can be used to determine certain interactions the sent {@link Packet} may - * have had. - * - * The message refers to the message sent with the response code, which may - * contain more detailed information of the response. This value may be left - * blank based on the response code as some codes do not need any more information - * than what is provided. - * - * @author Conor Flynn - * - */ -public final class Response { - - private final static boolean log = Config.getProperty("app", "general.logging.responses").equals("true"); - - private final int code; - private final String message; - private final String data; - - /** - * Constructor used for creating a new {@link Response} object. Must - * be accessed through the {@link Response#create(int, String, String)} function. - * - * @param code Response code to be sent. - * @param message Message to be sent to accompany the response code. - */ - private Response(int code, String message) { - this.code = code; - this.message = message; - this.data = ""; - } - - /** - * Constructor used for creating a new {@link Response} object. Must - * be accessed through the {@link Response#create(int, String, String)} function. - * - * @param code Response code to be sent. - * @param message Message to be sent to accompany the response code. - * @param data {@link String} of data to be returned in the response. - */ - private Response(int code, String message, String data) { - this.code = code; - this.message = message; - this.data = data; - } - - /** - * Response code of the {@link Response} object. Gives high level overview of the - * sent {@link Packet} object's response. - * - * See documentation for more detailed explanation of all response codes. - * - * @return {@link Integer} value representing response from {@link Packet} submission. - */ - public int code() { - return code; - } - - /** - * Response message which is used for containing more detailed information about the - * response code if necessary. This field may be left blank if not needed. - * - * @return {@link String} value representing the response message. - */ - public String message() { - return message; - } - - /** - * {@link String} of all data contained within the {@link Response} object. Parameter - * is optional and will return an empty {@link String} if not defined on initialization. - * - * @return {@link String} containing all returned data by the {@link Response} object. - */ - public String data() { - return data; - } - - /** - * Static function used for creating a new {@link Response} object. Formats and returns - * the new response based on the parameters included below. - * - * @param code Response code of the {@link Response} object. - * @param message Response message of the {@link Response} object. Uses {@link String#format(String, Object...)} for formatting with {@code args} parameter. - * @return New {@link Response} object formatted based on the passed parameters. - */ - protected static Response create(int code, String message) { - Response response = new Response(code, message); - if(log) - Logger.log(response); - return response; - } - - /** - * Static function used for creating a new {@link Response} object. Formats and returns - * the new response based on the parameters included below. - * - * @param code Response code of the {@link Response} object. - * @param message Response message of the {@link Response} object. Uses {@link String#format(String, Object...)} for formatting with {@code args} parameter. - * @param data {@link String} of data to be returned in the response. - * @return New {@link Response} object formatted based on the passed parameters. - */ - protected static Response create(int code, String message, String data) { - Response response = new Response(code, message, data); - if(log) - Logger.log(response); - return response; - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/ResponseFactory.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/ResponseFactory.java deleted file mode 100644 index d90fc193..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/ResponseFactory.java +++ /dev/null @@ -1,179 +0,0 @@ -package org.framework.router; - -import java.util.Arrays; -import java.util.HashMap; - -public class ResponseFactory { - - public static void responseNotHandled(String message) { - System.err.println(message); - System.exit(1); - } - - /** - * Blank template response used for sending non-required responses - * - * @return A new {@link Response} object with a response code of 0 and a blank response message. - */ - public static Response response0() { - return Response.create(0, ""); - } - - public static Response response200() { - return Response.create(200, "Successful Response."); - } - - public static Response response200(String data) { - return Response.create(200, "", data); - } - - public static Response response220(String hash) { - return Response.create(220, String.format("Stream with generated hash <%s> already exists. Using existing stream for connections.", hash), String.format("%s", hash)); - } - - public static Response response400(String router) { - return Response.create(400, String.format("Router <%s> has not been connected to a network and cannot send Packets. " - + "Connect to another Router before sending Packets.", router)); - } - - public static Response response404(String router, String destination) { - return Response.create(404, String.format("Destination with tag <%s> was not found within Router <%s>. Check Router " - + "connections to make sure all necessary connections are made.", router, destination)); - } - - public static Response response405(String router, String subtag) { - return Response.create(405, String.format("Router <%s> does not contain sub process <%s>. Check to make sure subtag " - + "is written properly.", router, subtag)); - } - - public static Response response407(String router, String tag, String sub_tag, String... data) { - return Response.create(407, String.format("Malformed packet when sending data from <%s> to <%s> using protocol " - + "<%s>. Data does not contain an even amount of pairs. Data <%s>.", - router, tag, sub_tag, Arrays.toString(data))); - } - - public static Response response410(String router, String subtag) { - return Response.create(410, String.format("Router <%s> process <%s> is formatted incorrectly. Check to make sure the process' " - + "method contains the proper format of .", router, subtag)); - } - - public static Response response420(String source) { - return Response.create(420, String.format("Requested data source <%s> does not exist in cache.", source)); - } - - public static Response response421(String hash) { - return Response.create(421, String.format("Requested data stream with given hash <%s> does not exist in cache.", hash)); - } - - public static Response response422(String source) { - return Response.create(422, String.format("Failure to authorize the external data source <%s> with the given properties.", source)); - } - - public static Response response423(String hash) { - return Response.create(423, String.format("Stream with hash <%s> is not ready and cannot be executed.", hash)); - } - - public static Response response424(String hash) { - return Response.create(424, String.format("Stream with hash <%s> is already active and cannot be executed again.", hash)); - } - - public static Response response425(String hash) { - return Response.create(425, String.format("Stream with hash <%s> is not active and cannot be killed.", hash)); - } - - public static Response response426(String hash, String subscription) { - return Response.create(426, String.format("Stream with hash <%s> does not contain a subscription request of type <%s>.", hash, subscription)); - } - - public static Response response427(String type, String response) { - return Response.create(427, String.format("Stream of type <%s> returned an irregular response when attempting to send request. Response returned is: <%s>", type, response)); - } - - public static Response response428(String hash, String request) { - return Response.create(428, String.format("Stream with hash <%s> does not contain a request type of <%s>", hash, request)); - } - - public static Response response429(String hash, String request, String response) { - return Response.create(429, String.format("Stream with hash <%s> returned an irregular response when attempting to subscribe to <%s>. Response returned is: <%s>", hash, request, response)); - } - - public static Response response430(HashMap data) { - return Response.create(430, String.format("Stream hash could not be generated with the given properties: <%s>", data)); - } - - public static Response response440(String source) { - return Response.create(440, String.format("Requested data source <%s> does not exist in cache.", source)); - } - - public static Response response441(String source) { - return Response.create(441, String.format("Local data stream with source <%s> is not ready to handle queries.", source)); - } - - public static Response response442(String source) { - return Response.create(442, String.format("Failed to add local data source <%s>.", source)); - } - - public static Response response443(String source) { - return Response.create(443, String.format("Local data stream with source <%s> already exists.", source)); - } - - public static Response response444(String source) { - return Response.create(444, String.format("Failure to authorize the local data source <%s> with the given properties.", source)); - } - - public static Response response445(String source, String query) { - return Response.create(445, String.format("Local data stream with source <%s> could not validate passed query <%s>.", source, query)); - } - - public static Response response446(String source, String query) { - return Response.create(446, String.format("Local data stream with source <%s> does not contain data from requested query <%s>.", source, query)); - } - - public static Response response447(String source, String query) { - return Response.create(447, String.format("Local data stream with source <%s> failed to process the query <%s>.", source, query)); - } - - public static Response response448(String source, String query) { - return Response.create(448, String.format("Local data stream with source <%s> failed to retrieve state with the query <%s>.", source, query)); - } - - public static Response response449(String source, String data, String... location) { - return Response.create(449, String.format("Local data stream with source <%s> failed to push data point <%s> to given location <%s>", source, data, Arrays.toString(location))); - } - - public static Response response460(String consumer) { - return Response.create(460, String.format("Output consumer <%s> failed to listen to consumption channel.", consumer)); - } - - public static Response response470(String producer) { - return Response.create(470, String.format("Output producer <%s> failed to listen to production channel.", producer)); - } - - public static Response response471(String key) { - return Response.create(471, String.format("Output manager does not contain destination with key <%s>", key)); - } - - public static Response response472(String key) { - return Response.create(472, String.format("Output producer failed to send data to external connection <%s>.", key)); - } - - public static Response response500(String loc, String parameter) { - return Response.create(500, String.format("Engine component <%s> missing required parameter <%s>. Recall action with proper formatting.", loc, parameter)); - } - - public static Response response501() { - return Response.create(501, String.format("Fatal error occurred. This response should not be displayed.")); - } - - public static Response response501(String message) { - return Response.create(501, String.format("Fatal error occurred. This response should not be displayed. Message: <%s>", message)); - } - - public static Response response502() { - return Response.create(502, String.format("Internal language failure. This error is commonly causes by a static protocol being treated as a live protocol or vice versa.")); - } - - public static Response response503(String format, String... dates) { - return Response.create(503, String.format("Local data stream failed to process date of the format <%s> from given strings <%s>", format, Arrays.toString(dates))); - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Router.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Router.java deleted file mode 100644 index f839548e..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Router.java +++ /dev/null @@ -1,269 +0,0 @@ -package org.framework.router; - -import java.lang.reflect.Method; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; - -/** - * The Router is a super class that every process inherits. It is used to route data in a - * standardized manner throughout the engine. Each process that inherits the Router super class - * will be required to supply several types of information. See documentation for further - * details. - * - * @author Conor Flynn - * - */ -public abstract class Router { - - private final String uuid; - private final String tag; - private Manager manager; - private final HashMap processes; - - /** - * Initializes the Router object to handle processing packets. Router - * does not have any contained tags other than identifying tag. - * - * @param uuid Unique identifier of the inheriting process. - * @param tag Unique tag of the inheriting process. - */ - public Router(String uuid, String tag) { - this(uuid, tag, null); - } - - /** - * Initializes the Router object to handle processing {@link Packet} objects. - * - * @param uuid Unique identifier of the inheriting process. - * @param tag Unique tag of the inheriting process. - * @param manager {@link Manager} object which determines the network of processes the router is connected to. - * - * @throws IllegalArgumentException Thrown if {@link Router} object's tag already exists within the - * contained_tags list passed in the constructor. - */ - public Router(String uuid, String tag, Manager manager) { - this.uuid = uuid; - this.tag = tag; - this.manager = manager; - this.processes = new HashMap(); - - try { - defineProcesses(); - } catch (NoSuchMethodException e) { - e.printStackTrace(); - } catch (SecurityException e) { - e.printStackTrace(); - } - } - - /** - * Unique identifier of the inheriting process. - * - * @return String representation of UUID. - */ - public final String getUUID() { - return uuid; - } - - /** - * Unique tag of the inheriting process. - * - * @return Unique 3 character string representing tag. - */ - public final String getTag() { - return tag; - } - - /** - * {@link Manager} that this {@link Router} is connected to. - * - * @return {@link Manager} object of the {@link Router}. - */ - public final Manager getManager() { - return manager; - } - - /** - * Updates the {@link Manager} this {@link Router} is connected to. - * Disconnects from the old {@link Manager} as well if it is not - * {@code null}. - * - * @param manager {@link Manager} object to connect this {@link Router} to. - */ - protected final void setManager(Manager manager) { - // disconnect from previous manager if non-null - if(this.manager != null) - this.manager.disconnect(this); - - // update new manager and connect - this.manager = manager; - this.manager.connect(this); - } - - /** - * Connects all passed {@link Router} objects to this {@link Router} object's {@link Manager}. - * Merges all {@link Router} objects within both networks such that they can all communicate with - * each other. - *
      - * Creates a new {@link Manager} object for this {@link Router} if it is {@code null}. - * - * @param routers {@link Router} objects to connect to this {@link Router} object's network. - */ - public final void connect(Router... routers) { - // connect all routers in list to current manager - // if manager is null then create new manager - if(manager == null) - manager = Manager.create(this); - - HashSet network = new HashSet(); - - for(Router router : routers) { - if(router.manager == null) - network.add(router); - else - for(Router managed : router.manager.connected()) - network.add(managed); - } - - for(Router router : network) - router.setManager(manager); - } - - /** - * Determines if a {@link Router} object with the passed tag - * exists on the network. - * - * @param tag Tag of the {@link Router} object to search for. - * @return Boolean determining if {@link Router} object with passed tag exists. - */ - public final boolean isConnected(String tag) { - return manager.isConnected(tag); - } - - /** - * Determines if a {@link Router} object exists on the network. Uses - * the passed {@link Router} object's tag to determine existence and references - * {@link Router#isConnected(String)}. - * - * @param router {@link Router} object to search for. - * @return Boolean determining if {@link Router} object exists. - */ - public final boolean isConnected(Router router) { - return isConnected(router.tag); - } - - /** - * Collection of all {@link Router} object's tags that are connected to the network. - * See {@link Router#getTag()} for more information. - * - * @return Collection of all connected {@link Router} object's tags. - */ - protected final Collection connectedTags() { - return manager.tags(); - } - - /** - * Function used to send a {@link Packet} object to the desired destination. - * - * @param tag Tag Tag of the destination's {@link Router} object. - * @param sub_tag Sub tag describing the action performed at the destination. - * @param data Data transmitted through the {@link Packet} for processing at the destination. - * @return Integer representing the return code of the sent {@link Packet}. - */ - public final Response send(String tag, String sub_tag, HashMap data) { - if(manager == null) - return ResponseFactory.response400(this.getTag()); - - Packet packet = Packet.packet(this, tag, sub_tag, data); - if(packet == null) - return ResponseFactory.response407(this.tag, tag, sub_tag, data.toString()); - - return manager.send(packet); - } - - /** - * Function used to send a {@link Packet} object to the desired destination. - * - * @param tag Tag Tag of the destination's {@link Router} object. - * @param sub_tag Sub tag describing the action performed at the destination. - * @param data Data transmitted through the {@link Packet} for processing at the destination. - * @param sub_data Supporting data used for processing and transmitting from {@code data}. This parameter is optional. - * @return Integer representing the return code of the sent {@link Packet}. - */ - public final Response send(String tag, String sub_tag, String... data) { - if(manager == null) - return ResponseFactory.response400(this.getTag()); - - // create packet and push to receive method - Packet packet = Packet.packet(this, tag, sub_tag, data); - if(packet == null) - return ResponseFactory.response407(this.tag, tag, sub_tag, data); - - return manager.send(packet); - } - - /** - * Function used for receiving {@link Packet} objects and determining whether - * to route them to a connected {@link Router} or to process them through the - * {@link Router#process(Packet)} function. - * - * @param packet {@link Packet} object received by the {@link Router}. - * @return Integer representing the return code of the sent {@link Packet}. - */ - public final Response receive(Packet packet) { - return process(packet); - } - - /** - * Adds a process to the {@link Router} object under the given {@code subtag}. - * When the {@link Router} object receives a {@link Packet} with the given - * {@code subtag}, it will auto route the {@link Packet} to the stored method. - *
      - * All {@link Method} objects must contain a single parameter, a {@link Packet} object, - * and return a {@link Response} object. - * - * @param sub_tag Subtag of the process to handle the incoming {@link Packet} object. - * @param method {@link Method} to pass the {@link Packet} object to. - */ - public final void addProcess(String sub_tag, Method method) { - processes.put(sub_tag, method); - } - - /** - * Function used to handle incoming {@link Packet} objects. - *
      - * Returns a 405 response code should the {@link Router} not support the - * given {@link Packet#getSubTag()} process. - * - * @param packet {@link} Packet object to be processed. - * @return Integer representing the return code of the sent {@link Packet} - */ - private final Response process(Packet packet) { - if(!processes.containsKey(packet.getSubTag())) - return ResponseFactory.response405(this.getTag(), packet.getSubTag()); - - try { - return (Response)processes.get(packet.getSubTag()).invoke(this, packet); - } catch (Exception e) { - e.printStackTrace(); - } - - return ResponseFactory.response410(this.getTag(), packet.getSubTag()); - } - - /** - * Defines all processes used within the {@link Router}. All added processes must contain - * the explicit subtag they are listed under and the associated method to handle the subtag from. - */ - private final void defineProcesses() throws NoSuchMethodException, SecurityException { - Method[] methods = getClass().getMethods(); - for(Method method : methods) { - if(!method.getName().contains("process")) - continue; - - method.setAccessible(true); - addProcess(method.getName().replace("process", ""), method); - } - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/main/Main.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/main/Main.java deleted file mode 100644 index c818b504..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/main/Main.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.main; - -import org.apache.log4j.Level; -import org.apache.log4j.LogManager; -import org.core.core.Core; - -public class Main { - - public static void main(String[] args) throws InterruptedException { - // disable loggers - LogManager.getRootLogger().setLevel(Level.OFF); - - // initialize new Core - Thread thread = new Thread() { - public void run() { - new Core(); - } - }; - - // start thread - thread.start(); - - while(true) { - Thread.sleep(10000); - } - } -} \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/consumers/SocketConsumer.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/consumers/SocketConsumer.java deleted file mode 100644 index 366a0ad8..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/consumers/SocketConsumer.java +++ /dev/null @@ -1,115 +0,0 @@ -package org.out.consumers; - -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; -import java.net.SocketException; -import java.util.Arrays; - -import org.framework.router.Response; -import org.json.JSONObject; -import org.out.handler.OutputConsumer; -import org.out.handler.OutputManager; -import org.out.socket.SocketManager; -import org.properties.Config; - -public class SocketConsumer extends OutputConsumer { - - private Thread listener; - - public SocketConsumer(OutputManager manager) { - super(manager); - } - - public String getUUID() { - return "socket_consumer"; - } - - @Override - protected boolean init() { - int port = Integer.parseInt(Config.getProperty("stream", "rest.socket.port")); - - // create server - if(!SocketManager.createServer(port)) - return false; - - // accept inflow from REST - final String key = Config.getProperty("stream", "rest.socket.key"); - - if(!SocketManager.accept(port, key)) - return false; - - listener = new Thread() { - public void run() { - try { - DataInputStream in = SocketManager.read(key); - DataOutputStream out = SocketManager.write(key); - - // listen for data packets from rest socket - while(true) { - String[] input = ((String)in.readUTF()).split(Config.getProperty("app", "general.transfer.delim")); - - Thread thread = new Thread() { - public void run() { - try { - // validate length is greater than 2 - if(input.length <= 2) { - out.writeUTF(new JSONObject() - .put("response", "502") - .put("message", "Packet processed from REST API does not contain a TAG or SUB_TAG. Review REST API endpoint code.") - .toString()); - } - - // extract non-essential data - String[] data = Arrays.copyOfRange(input, 2, input.length); - String tag = input[0]; - String sub_tag = input[1]; - - // execute valid response to engine - Response response = send(tag, sub_tag, data); - out.writeUTF(new JSONObject() - .put("response", "200") - .put("code", response.code()) - .put("message", response.message()) - .put("data", response.data()) - .toString()); - out.flush(); - - } catch(SocketException e) { - System.err.println("Rest Application has unexpectedly closed."); - System.exit(1); - } catch (IOException e) { - e.printStackTrace(); - System.exit(1); - } - } - }; - - thread.start(); - } - } catch(Exception e) { - e.printStackTrace(); - System.exit(1); - } - } - }; - - return true; - } - - @Override - protected boolean listen() { - // server not initialized - if(listener == null) - return false; - - listener.start(); - return true; - } - - @Override - protected boolean kill() { - listener.interrupt(); - return true; - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/controller/Controller.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/controller/Controller.java deleted file mode 100644 index ffba5104..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/controller/Controller.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.out.controller; - -import org.framework.router.Router; - -public class Controller extends Router { - - public Controller() { - super("controller", "CRL"); - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/destinations/SocketDestination.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/destinations/SocketDestination.java deleted file mode 100644 index 2b23eab4..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/destinations/SocketDestination.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.out.destinations; - -import java.io.DataOutputStream; -import java.io.IOException; - -import org.framework.router.Packet; -import org.json.JSONException; -import org.out.handler.OutputDestination; - -public class SocketDestination extends OutputDestination { - - private final DataOutputStream out; - - public SocketDestination(String key, DataOutputStream out) { - super(key); - - this.out = out; - } - - public final synchronized boolean send(Packet packet) { - try { - out.write(packet.getData("data").getBytes()); - out.write(10); - out.flush(); - } catch (JSONException | IOException e) { - return false; - } - - return true; - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputConsumer.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputConsumer.java deleted file mode 100644 index 12fb4274..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputConsumer.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.out.handler; - -import org.framework.interfaces.UUID; -import org.framework.router.Response; - -public abstract class OutputConsumer implements UUID { - - private final OutputManager manager; - - public OutputConsumer(OutputManager manager) { - this.manager = manager; - } - - protected final Response send(String tag, String sub_tag, String... data) { - return manager.send(tag, sub_tag, data); - } - - protected abstract boolean init(); - protected abstract boolean listen(); - protected abstract boolean kill(); -} \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputDestination.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputDestination.java deleted file mode 100644 index 4b725310..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputDestination.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.out.handler; - -import org.framework.router.Packet; - -public abstract class OutputDestination { - - private final String key; - - public OutputDestination(String key) { - this.key = key; - } - - public final String getKey() { - return key; - } - - public abstract boolean send(Packet packet); -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputHandler.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputHandler.java deleted file mode 100644 index 26d99db9..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputHandler.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.out.handler; - -import org.framework.router.Packet; -import org.framework.router.Response; -import org.framework.router.ResponseFactory; -import org.framework.router.Router; - -public class OutputHandler extends Router { - - private final OutputManager manager; - - public OutputHandler() { - super("output_handler", "OUT"); - - manager = new OutputManager(this); - } - - public Response processSTRT(Packet packet) { - // activate all output connections - try { - Object[] consumer_response = manager.consumerListen(); - if(!(boolean)consumer_response[0]) - return ResponseFactory.response460(consumer_response[1].toString()); - - Object[] producer_response = manager.producerListen(); - if(!(boolean)producer_response[0]) - return ResponseFactory.response470(producer_response[1].toString()); - - return ResponseFactory.response200(); - } catch(Exception e) { - e.printStackTrace(); - System.exit(1); - } - - return ResponseFactory.response501(); - } - - public Response processEDAT(Packet packet) { - String destination = packet.getData("destination"); - if(destination == null) - return ResponseFactory.response500("OutputHandler", "destination"); - - if(destination.equals("null")) - return ResponseFactory.response200(); - - if(!manager.containsDestination(destination)) - return ResponseFactory.response471(destination); - - if(!manager.send(destination, packet)) - return ResponseFactory.response472(destination); - - return ResponseFactory.response200(); - } -} \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputManager.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputManager.java deleted file mode 100644 index ea376f9a..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputManager.java +++ /dev/null @@ -1,136 +0,0 @@ -package org.out.handler; - -import java.lang.reflect.InvocationTargetException; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Set; - -import org.framework.router.Packet; -import org.framework.router.Response; -import org.properties.Config; -import org.reflections.Reflections; - -public class OutputManager { - - private final OutputHandler handler; - private final HashMap> consumer_templates; - private final HashMap> producer_templates; - private final HashSet consumers; - private final HashSet producers; - - private final HashMap destinations; - - public OutputManager(OutputHandler handler) { - this.handler = handler; - this.consumer_templates = new HashMap>(); - this.producer_templates = new HashMap>(); - this.consumers = new HashSet(); - this.producers = new HashSet(); - this.destinations = new HashMap(); - - // reflect all consumer/producer types - try { - reflect(); - } catch(Exception e) { - e.printStackTrace(); - System.exit(1); - } - - // load all output connections - try { - load(); - } catch(Exception e) { - e.printStackTrace(); - System.exit(1); - } - - - } - - private void reflect() throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException { - Reflections consumer_reflection = new Reflections("org.out.consumers"); - Set> consumer_types = consumer_reflection.getSubTypesOf(OutputConsumer.class); - for(Class c : consumer_types) - consumer_templates.put(c.getDeclaredConstructor(OutputManager.class).newInstance(this).getUUID(), c); - - Reflections producer_reflection = new Reflections("org.out.producers"); - Set> producer_types = producer_reflection.getSubTypesOf(OutputProducer.class); - for(Class c : producer_types) - producer_templates.put(c.getDeclaredConstructor(OutputManager.class).newInstance(this).getUUID(), c); - } - - private void load() { - // load consumers: - String[] consumer_types = Config.getProperty("stream", "general.consumer.types").replaceAll(" ", "").split(","); - for(String type : consumer_types) { - if(type.equals("null")) - continue; - - OutputConsumer consumer = null; - try { - consumer = consumer_templates.get(type).getDeclaredConstructor(OutputManager.class).newInstance(this); - consumers.add(consumer); - } catch(Exception e) { - e.printStackTrace(); - System.exit(1); - } - } - - // load producers: - String[] producer_types = Config.getProperty("stream", "general.producer.types").replaceAll(" ", "").split(","); - for(String type : producer_types) { - if(type.equals("null")) - continue; - - OutputProducer producer = null; - try { - producer = producer_templates.get(type).getDeclaredConstructor(OutputManager.class).newInstance(this); - producers.add(producer); - } catch(Exception e) { - e.printStackTrace(); - System.exit(1); - } - } - } - - public Object[] consumerListen() { - // execute all consumers - for(OutputConsumer consumer : consumers) - if(!consumer.init() || !consumer.listen()) - return new Object[] {false, consumer.getUUID()}; - - return new Object[] {true, ""}; - } - - public Object[] producerListen() { - // execute all producers - for(OutputProducer producer : producers) - if(!producer.init() || !producer.listen()) - return new Object[] {false, producer.getUUID()}; - - return new Object[] {true, ""}; - } - - public final Response send(String tag, String sub_tag, String... data) { - return handler.send(tag, sub_tag, data); - } - - public final synchronized void add(OutputDestination destination) { - destinations.put(destination.getKey(), destination); - } - - public final synchronized void remove(String key) { - destinations.remove(key); - } - - public final boolean containsDestination(String key) { - return destinations.containsKey(key); - } - - public final boolean send(String key, Packet packet) { - if(!destinations.containsKey(key)) - return false; - - return destinations.get(key).send(packet); - } -} \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputProducer.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputProducer.java deleted file mode 100644 index 42b48038..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputProducer.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.out.handler; - -import org.framework.interfaces.UUID; -import org.framework.router.Response; - -public abstract class OutputProducer implements UUID { - - protected final OutputManager manager; - - public OutputProducer(OutputManager manager) { - this.manager = manager; - } - - protected final Response send(String tag, String sub_tag, String data) { - return manager.send(tag, sub_tag, data); - } - - protected abstract boolean init(); - protected abstract boolean listen(); - protected abstract boolean kill(); -} \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/producers/SocketProducer.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/producers/SocketProducer.java deleted file mode 100644 index 6c70167d..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/producers/SocketProducer.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.out.producers; - -import org.framework.router.Response; -import org.out.destinations.SocketDestination; -import org.out.handler.OutputManager; -import org.out.handler.OutputProducer; -import org.out.socket.SocketManager; -import org.properties.Config; - -public class SocketProducer extends OutputProducer { - - private Thread listener; - public final SocketProducer producer = this; - - public SocketProducer(OutputManager manager) { - super(manager); - } - - @Override - public String getUUID() { - return "socket_producer"; - } - - @Override - protected boolean init() { - listener = new Thread() { - public void run() { - while(true) { - String key = SocketManager.accept(Integer.parseInt(Config.getProperty("stream", "output.socket.port")), producer); - if(key == null) { - System.err.println("SocketProducer: Could not create connection to socket port."); - System.exit(1); - } - manager.add(new SocketDestination(key, SocketManager.write(key))); - } - } - }; - - return true; - } - - @Override - protected boolean listen() { - if(listener == null) - return false; - - listener.start(); - return true; - } - - @Override - protected boolean kill() { - try { - listener.interrupt(); - } catch(Exception e) {} - - return true; - } - - public Response send(String tag, String sub_tag, String... data) { - return manager.send(tag, sub_tag, data); - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/socket/SocketManager.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/socket/SocketManager.java deleted file mode 100644 index 0751cb62..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/socket/SocketManager.java +++ /dev/null @@ -1,262 +0,0 @@ -package org.out.socket; - -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; -import java.net.ServerSocket; -import java.net.Socket; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.UUID; - -import org.core.logger.Logger; -import org.framework.router.Response; -import org.json.JSONObject; -import org.out.producers.SocketProducer; -import org.properties.Config; - -public class SocketManager { - - private static final HashMap servers = new HashMap(); - private static final HashMap connections = new HashMap(); - private static final HashMap> registry = new HashMap>(); - private static final HashMap inflow = new HashMap(); - private static final HashMap outflow = new HashMap(); - - private static final long HEARTBEAT_OFFSET = 5000L; - - public synchronized static boolean createServer(int port) { - if(servers.containsKey(port)) - return true; - - try { - ServerSocket server = new ServerSocket(port); - servers.put(port, server); - registry.put(server.getInetAddress().toString(), new HashSet()); - return true; - } catch (IOException e) { - e.printStackTrace(); - return false; - } - } - - public synchronized static boolean exists(String key) { - return connections.containsKey(key); - } - - public synchronized static void createThread(String key, SocketProducer producer) { - Thread thread = new Thread() { - public void run() { - // perform logger verifications - Logger.log(String.format("Starting thread for Socket with key <%s>", key)); - if(!inflow.containsKey(key)) { - Logger.terminate(String.format("Key <%s> not found within inflow thread configuration, manual review recommended.", key)); - return; - } - - if(!outflow.containsKey(key)) { - Logger.terminate(String.format("Key <%s> not found within outflow thread configuration, manual review recommended.", key)); - return; - } - - // retrieve inflow stream and listen - DataInputStream in = inflow.get(key); - DataOutputStream out = outflow.get(key); - String str; - while(true) { - try { - str = readLine(in); - - // parse input - String[] input = str.split(Config.getProperty("app", "general.transfer.delim")); - - // validate input - if(input.length <= 2) { - out.writeUTF(new JSONObject() - .put("response", "502") - .put("message", "Packet processed from REST API does not contain a TAG or SUB_TAG. Review REST API endpoint code.") - .toString()); - } - - // extract non-essential data - String[] data = Arrays.copyOfRange(input, 2, input.length); - String tag = input[0]; - String sub_tag = input[1]; - - // retrieve destination - String temp_destination = ""; - for(int i = 0; i < data.length; i++) { - if(data[i].equals("destination") && data.length - 1 != i) - temp_destination = data[i + 1]; - } - - // if no destination found then continue - if(temp_destination.equals("")) - continue; - - final String destination = temp_destination; - - // create heartbeat connection - Thread heartbeat = new Thread() { - public void run() { - while(true) { - try { - Thread.sleep(HEARTBEAT_OFFSET); - producer.send("OUT", "EDAT", - "data", "<<>>", - "destination", destination); - } catch(Exception e) { - Logger.log(String.format("Heartbeat connection terminated for Socket with key <%s>", key)); - break; - } - } - } - }; - - // start heartbeat - heartbeat.start(); - - // execute valid response to engine - Response response = producer.send(tag, sub_tag, data); - - // send response signifier - producer.send("OUT", "EDAT", - "data", "<<>>", - "destination", destination); - // send response details - producer.send("OUT", "EDAT", - "data", new JSONObject() - .put("response", "200") - .put("code", response.code()) - .put("message", response.message()) - .put("data", response.data()) - .toString(), - "destination", destination); - - // terminate heartbeat - try { - heartbeat.interrupt(); - } catch(Exception e) {} - - } catch(Exception e) { - break; - } - } - - Logger.log(String.format("Terminating thread for Socket with key <%s>", key)); - } - }; - - thread.start(); - } - - // used for generic channel accepting - public synchronized static String accept(int port, SocketProducer producer) { - if(!servers.containsKey(port)) - if(!createServer(port)) - return null; - - try { - // accept new connection - Socket connection = servers.get(port).accept(); - - // validate new connection: - DataInputStream in = new DataInputStream(connection.getInputStream()); - DataOutputStream out = new DataOutputStream(connection.getOutputStream()); - String key = UUID.randomUUID().toString(); - out.write(key.getBytes()); - out.write(10); - - Logger.log("Successfully connected to external socket. Key <" + key + ">"); - - if(connections.containsKey(key)) - connections.get(key).close(); - - connections.put(key, connection); - inflow.put(key, in); - outflow.put(key, new DataOutputStream(connection.getOutputStream())); - registry.get(servers.get(port).getInetAddress().toString()).add(key); - - if(!synced(key)) - throw new Exception("Connection inflow and outflow not synchronized"); - - // start internal thread for socket information parsing - createThread(key, producer); - - return key; - } catch(Exception e) { - e.printStackTrace(); - return null; - } - } - - // used for reserved channel accepting - public synchronized static boolean accept(int port, String required_key) { - if(!servers.containsKey(port)) - if(!createServer(port)) - return false; - - try { - // accept new connection - Socket connection = servers.get(port).accept(); - // validate new connection: - DataInputStream in = new DataInputStream(connection.getInputStream()); - - String key = in.readUTF(); - - if(!required_key.equals(key)) { - connection.close(); - return false; - } - - if(connections.containsKey(key)) - return false; - - connections.put(key, connection); - inflow.put(key, in); - outflow.put(key, new DataOutputStream(connection.getOutputStream())); - registry.get(servers.get(port).getInetAddress().toString()).add(key); - - if(!synced(key)) - throw new Exception("Connection inflow and outflow not synchronized."); - - Logger.log("Successfully connected to reserved socket. Key <" + key + ">"); - - return true; - - } catch (Exception e) { - e.printStackTrace(); - return false; - } - } - - public static DataOutputStream write(String key) { - if(!exists(key)) - return null; - - return outflow.get(key); - } - - public static DataInputStream read(String key) { - if(!exists(key)) - return null; - - return inflow.get(key); - } - - private static boolean synced(String key) { - return connections.containsKey(key) && inflow.containsKey(key) && outflow.containsKey(key); - } - - private static final String readLine(DataInputStream in) throws IOException { - StringBuilder out = new StringBuilder(); - char c = 0; - while((c = (char)in.read()) != 10) { - if(out.length() > 200_000) - break; - out.append(c); - } - return out.toString(); - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/properties/Config.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/properties/Config.java deleted file mode 100644 index cbf67676..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/properties/Config.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.properties; - -import java.util.HashMap; -import java.util.Properties; - -public class Config { - - private static final HashMap properties; - -static { - properties = new HashMap(); - - Properties app_properties = new Properties(); - app_properties.put("general.internal.delim", ":::"); - app_properties.put("general.data.delim", ","); - app_properties.put("general.collection.delim", "="); - app_properties.put("general.transfer.delim", "&&&"); - app_properties.put("general.data.dateformat", "yyyy-MM-dd"); - app_properties.put("general.logging.packets", "false"); - app_properties.put("general.logging.responses", "false"); - properties.put("app", app_properties); - - Properties stream_properties = new Properties(); - stream_properties.put("general.consumer.types", "null"); - stream_properties.put("general.producer.types", "socket_producer"); - stream_properties.put("rest.socket.address", "DataEngine"); - //stream_properties.put("rest.socket.address", "localhost"); - stream_properties.put("rest.socket.port", "61100"); - stream_properties.put("rest.socket.key", "rest-key-reserved"); - stream_properties.put("output.socket.address", "RestApp"); - // stream_properties.put("output.socket.address", "localhost"); - stream_properties.put("output.socket.port", "61200"); - stream_properties.put("local.stream.type", "mongo_db"); - //stream_properties.put("local.stream.type", "null"); - stream_properties.put("mongodb.properties.uri", "mongodb://MONGO:27017"); - //stream_properties.put("mongodb.properties.uri", "mongodb://localhost:27017"); - stream_properties.put("mongodb.database.state", "main-state-db"); - stream_properties.put("mongodb.database.main", "main-db"); - stream_properties.put("mongodb.auth.collection", "auth-collection"); - stream_properties.put("mongodb.query.delim", ","); - stream_properties.put("polygon.request.delim", "-"); - properties.put("stream", stream_properties); - - Properties testing_properties = new Properties(); - testing_properties.put("lsh.authorized", "true"); - testing_properties.put("lsh.ready", "true"); - properties.put("testing", testing_properties); -} - - public static final Properties getProperties(String name) { - validate(name); - return properties.get(name); - } - - public static final String getProperty(String name, String property) { - validate(name, property); - return properties.get(name).getProperty(property); - } - - public static final void setProperty(String name, String property, String value) { - validate(name, property); - properties.get(name).setProperty(property, value); - } - - public static final void validate(String name, String... keys) { - if(!properties.containsKey(name)) { - new IllegalArgumentException(String.format("Property file <%s> does not exist. Program terminating.", name)).printStackTrace(); - System.exit(1); - } - - for(String key : keys) - if(!properties.get(name).containsKey(key)) { - new IllegalArgumentException(String.format("Missing property <%s> in file <%s>. Program terminating.", key, name)).printStackTrace(); - System.exit(1); - } - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/handler/ExternalStreamHandler.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/handler/ExternalStreamHandler.java deleted file mode 100644 index f70fa63f..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/handler/ExternalStreamHandler.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.stream.external.handler; - -import org.framework.router.Packet; -import org.framework.router.Response; -import org.framework.router.ResponseFactory; -import org.framework.router.Router; - -public final class ExternalStreamHandler extends Router { - - private final ExternalStreamManager manager; - - public ExternalStreamHandler() { - super("external_stream_handler", "ESH"); - - manager = new ExternalStreamManager(this); - } - - // type: type of data - public Response processEXSR(Packet packet) { - String validate; - if((validate = packet.validate("type")) != null) - return ResponseFactory.response500("ExternalStreamHandler", validate); - - return ResponseFactory.response200(String.format("%s", manager.containsType(packet.getData("type")))); - } - - // type: type of data - // url_path (opt): path of the url - // properties (opt):properties required for call - // headers (opt): headers required for call - public Response processRQST(Packet packet) { - String validate; - if((validate = packet.validate("type")) != null) - return ResponseFactory.response500("ExternalStreamHandler", validate); - - // validate type exists - if(!manager.containsType(packet.getData("type"))) - return ResponseFactory.response420(packet.getData("type")); - - Object[] response; - - // check to see if dated - // if not - if((validate = packet.validate("start_date", "end_date")) != null) - response = manager.request(packet.getData("type"), packet.getData()); - - // if dated - else - response = manager.request(packet.getData("type"), packet.getData(), packet.getData("start_date"), packet.getData("end_date")); - - // check to see if valid - if(!((boolean)response[0])) { - return ResponseFactory.response427(packet.getData("type"), response[1].toString()); - } - - // return valid - return ResponseFactory.response200(); - } -} \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/handler/ExternalStreamManager.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/handler/ExternalStreamManager.java deleted file mode 100644 index 3f66083d..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/handler/ExternalStreamManager.java +++ /dev/null @@ -1,107 +0,0 @@ -package org.stream.external.handler; - -import java.util.HashMap; -import java.util.TreeMap; - -import org.stream.external.requests.ExternalRequestFramework; -import org.stream.external.requests.ExternalRequestManager; - -public class ExternalStreamManager { - - private final ExternalStreamHandler handler; - private final ExternalRequestManager manager; - - protected ExternalStreamManager(ExternalStreamHandler handler) { - this.handler = handler; - this.manager = new ExternalRequestManager(); - - // initialize all available connections - try { - this.manager.initialize(this); - } catch(Exception e) { - e.printStackTrace(); - System.exit(1); - } - } - - public boolean containsType(String type) { - return manager.hasRequestFormat(type); - } - - protected Object[] request(String type, HashMap data) { - return request(type, data, null, null); - } - - protected Object[] request(String type, HashMap data, String startDate, String endDate) { - // validate that type exists - if(!manager.hasRequestFormat(type)) - return new Object[]{false, String.format("Missing request type <%s>", type)}; - - // parse data into required formatting - // retrieve url path - String[] url_path; - if(!data.containsKey("url_path")) { - url_path = new String[] {}; - } else { - url_path = data.get("url_path").split(","); - } - - // retrieve properties - HashMap properties = new HashMap(); - TreeMap user_properties = new TreeMap(); - if(data.containsKey("properties")) { - String[] raw_properties = data.get("properties").split(","); - if(raw_properties.length % 2 != 0) - return new Object[] {false, String.format("Properties must be in pairs.")}; - - for(int i = 0; i < raw_properties.length; i+=2) { - properties.put(raw_properties[i], raw_properties[i + 1]); - user_properties.put(raw_properties[i], raw_properties[i + 1]); - } - } - - // retrieve headers - HashMap headers = new HashMap(); - if(data.containsKey("headers")) { - String[] raw_headers = data.get("headers").split(","); - if(raw_headers.length % 2 != 0) - return new Object[] {false, String.format("Headers must be in pairs.")}; - - for(int i = 0; i < raw_headers.length; i+=2) - headers.put(raw_headers[i], raw_headers[i + 1]); - } - - // retrieve request framework - ExternalRequestFramework request = manager.getRequestFormat(type); - - // submit response - String response; - if(startDate == null || endDate == null) - response = request.request(url_path, properties, headers, user_properties); - else - response = request.request(url_path, properties, headers, startDate, endDate, user_properties); - - if(response != null) - return new Object[] {false, response}; - - return new Object[] {true, ""}; - } - - public void processRequest(String collection, HashMap data) { - // invalid hashmap - if(data == null) - return; - - // if empty then submit blank push - if(data.isEmpty()) { - handler.send("LSH", "PUSH", "collection", collection, "data", "<<>>"); - return; - } - - StringBuilder sb = new StringBuilder(); - for(String key : data.keySet()) - sb.append(key.replaceAll(",", ".") + "," + data.get(key).replaceAll(",", ".") + ","); - sb.delete(sb.length() - 1, sb.length()); - handler.send("LSH", "PUSH", "collection", collection, "data", sb.toString()); - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/handler/ExternalStreamManagerDeprecated.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/handler/ExternalStreamManagerDeprecated.java deleted file mode 100644 index ab0df95e..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/handler/ExternalStreamManagerDeprecated.java +++ /dev/null @@ -1,400 +0,0 @@ -package org.stream.external.handler; -//package org.stream.external.handler; -// -//import java.lang.reflect.InvocationTargetException; -//import java.time.LocalDate; -//import java.time.format.DateTimeFormatter; -//import java.util.HashMap; -//import java.util.Set; -// -//import org.core.logger.Logger; -//import org.framework.router.Response; -//import org.properties.Config; -//import org.reflections.Reflections; -// -///** -// * The {@link ExternalStreamManager} is a class which handles all -// * external stream connections and requests. This class contains -// * the functionality to reflect all {@link ExternalStreamConnection} -// * templates stored in {@code org.stream.external.connected.connections} -// * and create streams based on their parameters. -// *
      -// * All subprocesses sent to the {@link ExternalStreamHandler} interact with this -// * class and are documented as such. All {@link org.framework.router.Response} objects are created -// * in the {@link ExternalStreamHandler}, as this class returns objects that can -// * be interpreted into responses. Please view {@link ExternalStreamHandler} for -// * more information regarding the processes. -// * -// * @author Conor Flynn -// */ -//public class ExternalStreamManager { -// -// private final ExternalStreamHandler handler; -// private final HashMap> templates; -// private final HashMap streams; -// -// /** -// * Creates a new {@link ExternalStreamManager} object. Initializes the required -// * variables and reflects all classes stored in -// * {@code org.stream.external.connected.connections}. This constructor is called from -// * the {@link ExternalStreamHandler} and should not be initialized from any other point. -// * -// * @param handler {@link ExternalStreamHandler} object that the new {@link ExternalStreamManager} -// * is initialized by. -// */ -// protected ExternalStreamManager(ExternalStreamHandler handler) { -// this.handler = handler; -// -// templates = new HashMap>(); -// streams = new HashMap(); -// -// // initialize all available connections through reflections -// try { -// reflect(); -// } catch (Exception e) { -// e.printStackTrace(); -// System.exit(1); -// } -// } -// -// /** -// * Private function which utilizes the {@code org.reflections} library to reflect -// * all classes stored in {@code org.stream.external.connected.connections}. -// *
      -// * All thrown exceptions are from the reflections library. For more documentation please -// * go to the following link: https://github.com/ronmamo/reflections -// */ -// private void reflect() throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException { -// Reflections reflection = new Reflections("org.stream.external.connected.connections"); -// Set> types = reflection.getSubTypesOf(ExternalStreamConnection.class); -// for(Class c : types) -// templates.put(c.getDeclaredConstructor(ExternalStreamManager.class, HashMap.class).newInstance(this, new HashMap()).getUUID(), c); -// } -// -// /** -// * Function used to determine the hash of given {@code data} using an existing template's -// * hashing function. Primarily used to predetermine if a stream with the given hash already -// * exists in the system so that streams with the same credentials do not get duplicated. -// * -// * @param template Type referring to the UUID of the template found in {@link ExternalStreamConnection#getUUID()}. -// * @param data Data of the stream used for the authorization of the stream and for the random generation of -// * {@link ExternalStreamConnection#getHash()}. Data should be formatted exactly as specified in the documentation otherwise the -// * stream will be unable to authorize. -// * @return String containing the hashed {@code data}. -// */ -// protected String getHash(String template, HashMap data) { -// if(!templates.containsKey(template)) -// return null; -// -// try { -// return templates.get(template).getDeclaredConstructor(ExternalStreamManager.class, HashMap.class).newInstance(this, new HashMap()).getHash(data); -// } catch (Exception e) { -// e.printStackTrace(); -// } -// -// return null; -// } -// -// /** -// * Determines if the given template was reflected on initialization. View -// * {@link ExternalStreamHandler} for more information on reflection. -// * -// * @param type Type referring to the UUID of the template found in {@link ExternalStreamConnection#getUUID()}. -// * @return Boolean determining if the UUID exists within the manager. -// */ -// protected boolean containsTemplate(String type) { -// return templates.containsKey(type); -// } -// -// /** -// * Determines if a stream with the given hash exists in the manager. Hashes -// * are generated on initialization and should be stored for future stream references. -// * -// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function. -// * @return Boolean determining if a stream with the given hash exists within the manager. -// */ -// protected boolean containsStream(String hash) { -// return streams.containsKey(hash); -// } -// -// /** -// * Method for retrieving UUID of stream with the given key. -// * -// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function. -// * @return UUID of the stream with the given hash. -// */ -// protected String getStreamType(String hash) { -// if(!containsStream(hash)) -// return null; -// -// return streams.get(hash).getUUID(); -// } -// -// /** -// * Determines if a stream with the given hash has been successfully authorized. -// *
      -// * If a stream with the given hash does not exist, the function returns false. -// * -// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function. -// * @return Boolean determining if a stream with the given hash has been successfully authorized. -// */ -// protected boolean isStreamAuthorized(String hash) { -// if(!streams.containsKey(hash)) -// return false; -// -// return streams.get(hash).isAuthorized(); -// } -// -// /** -// * Determines if a stream with the given hash is ready for deployment or a static request. -// *
      -// * If a stream with the given hash does not exist, the function returns false. -// * -// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function. -// * @return Boolean determining if a stream with the given hash is ready for deployment or static requests. -// */ -// protected boolean isStreamReady(String hash) { -// if(!streams.containsKey(hash)) -// return false; -// -// return streams.get(hash).isReady(); -// } -// -// /** -// * Determines if a stream with the given hash is currently active. Active streams have been successfully -// * executed through the {@link ExternalStreamConnection#start()} function. -// *
      -// * If a stream with the given hash does not exist, the function returns false. -// * -// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function. -// * @return Boolean determining if a stream with the given hash is currently active. -// */ -// protected boolean isStreamActive(String hash) { -// if(!streams.containsKey(hash)) -// return false; -// -// return streams.get(hash).isActive(); -// } -// -// /** -// * Adds a new stream of the given type to the manager. New streams types are generated from the -// * reflection of {@code org.stream.external.connected.connections} package. The {@code type} parameter -// * refers to the return of the {@link ExternalStreamConnection#getUUID()} function. -// *
      -// * After initialization, the manager will attempt to authorize the stream using the data passed in the -// * {@code data} parameter. If failed, the method will return {@code false}. -// * -// * @param type Type of the stream the user wants to initialize. See {@link ExternalStreamConnection#getUUID()} for more information. -// * @param data Data of the stream used for the authorization of the stream and for the random generation of -// * {@link ExternalStreamConnection#getHash()}. Data should be formatted exactly as specified in the documentation otherwise the -// * stream will be unable to authorize. -// * @return The function returns an {@link Object} array containing 2 objects. The first is a {@link Boolean} that determines if -// * the action was successful. The second object will return a {@link String} which contains the generated hash of the new stream. -// * If the initialization is unsuccessful, the second object will be {@code null}. -// */ -// protected Object[] addStream(String type, HashMap data) { -// if(!templates.containsKey(type)) -// return new Object[] {false, null}; -// -// ExternalStreamConnection stream = null; -// try { -// stream = templates.get(type).getDeclaredConstructor(ExternalStreamManager.class, HashMap.class).newInstance(this, data); -// streams.put(stream.getHash(), stream); -// } catch (Exception e) { -// e.printStackTrace(); -// System.exit(1); -// } -// -// if(stream == null) -// return new Object[] {false, null}; -// -// return new Object[] {true, stream.getHash()}; -// } -// -// /** -// * Removes a stream with the given has from the manager. This function is currently deprecated and not used -// * however future implementations will include usage for it. -// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function. -// * @return Boolean determining if the removal was successful. -// */ -// protected boolean removeStream(String hash) { -// if(!streams.containsKey(hash)) -// return false; -// -// streams.remove(hash); -// return true; -// } -// -// /** -// * Authorizes a stream for execution. Uses the {@code data} passed by the {@link ExternalStreamManager#addStream(String, String)} -// * function. That data is then processed in the {@link ExternalStreamConnection#authorize()} function to determine if authorization -// * is successful. -// *
      -// * This function is explicitly called in {@link ExternalStreamManager#addStream(String, String)}. Failure to authorize successfully -// * as determined by {@link ExternalStreamConnection#isAuthorized()} will prevent the new stream from being added. -// * -// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function. -// * @return Boolean determining if the stream with the passed hash was successfully authorized. -// */ -// protected boolean authorizeStream(String hash) { -// if(!streams.containsKey(hash)) -// return false; -// -// ExternalStreamConnection stream = streams.get(hash); -// stream.authorize(); -// return stream.isAuthorized(); -// } -// -// /** -// * Determines if a stream with the given hash contains the given subscription type. -// * Utilizes the {@link ExternalStreamConnection#containsSubscriptionType(String)} for -// * determining if the subscription exists. -// *
      -// * If a stream with the given hash does not exist, this function returns false. -// * -// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function. -// * @param type Type of subscription requested. -// * @return Boolean determining if the stream with the given hash contains the given subscription type. -// */ -// protected boolean containsSubscriptionType(String hash, String type) { -// if(!streams.containsKey(hash)) -// return false; -// -// return streams.get(hash).containsSubscriptionType(type); -// } -// -// /** -// * Subscribes the stream to the given subscription type passed in the {@code data} -// * parameter. Subscriptions are live data feeds that push to the output handler -// * class. From there they are distributed to the according external sources. -// *
      -// * If a stream with the given hash does not exist, this function returns false. -// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function. -// * @param data Data required for processing the new subscription. -// * @return The function returns an {@link Object} array containing 2 objects. The first is a {@link Boolean} that determines if -// * the action was successful. The second item is a {@link String} containing any irregular message given when attempting to subscribe -// * to the new subscription. If the action is successful and the first item is true, the second object is null and is not used in the -// * given response. -// */ -// protected Object[] subscribe(String hash, String data) { -// if(!streams.containsKey(hash)) -// return new Object[] {false, null}; -// -// return streams.get(hash).subscribe(data); -// } -// -// /** -// * Determines if a stream with the given hash contains the given request type. -// * Utilizes the {@link ExternalStreamConnection#containsRequestType(String)} for -// * determining if the subscription exists. -// *
      -// * If a stream with the given hash does not exist, this function returns false. -// * -// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function. -// * @param type Type of request requested. -// * @return Boolean determining if the stream with the given hash contains the given request type. -// */ -// protected boolean containsRequestType(String hash, String type) { -// if(!streams.containsKey(hash)) -// return false; -// -// return streams.get(hash).containsRequestType(type); -// } -// -// /** -// * Sends a data request from the stream with the given hash. This request is in the form of a single -// * (typically REST API) request, which will then return a series of data presented. -// *
      -// * If a stream with the given hash does not exist, this function returns false. -// * -// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function. -// * @param destination Destination of the request to be processed by the {@link ExternalStreamManager#process(String, String, String)} function. -// * @param request Request data used for processing the single request. -// * @return Returns a string object containing all data returned by the request. -// */ -// protected Object[] request(String hash, HashMap request) { -// if(!streams.containsKey(hash)) -// return new Object[] {false, null}; -// -// ExternalStreamConnection stream = streams.get(hash); -// if(!stream.isAuthorized() || !stream.isReady()) -// return new Object[] {false, null}; -// -// return stream.request(request); -// } -// -// /** -// * Executes a stream to start processing live data. Live data subscriptions must be called through -// * {@link ExternalStreamManager#subscribe(String, String)} which will then add a new data subscription -// * to the stream. -// *
      -// * If a stream with the given hash does not exist, is not authorized, is not ready, or is already -// * executed, this function returns false. -// * -// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function. -// * @return Boolean determining if the stream execution is successful. -// */ -// protected boolean executeStream(String hash) { -// if(!streams.containsKey(hash)) -// return false; -// -// ExternalStreamConnection stream = streams.get(hash); -// if(!stream.isAuthorized() || !stream.isReady() || stream.isActive()) -// return false; -// -// return stream.start(); -// } -// -// /** -// * Kills a currently active stream. This function will terminate any connection to the external stream -// * and will immediately stop sending data to the output service. Even if the stream is unable to be killed, -// * the connection between the data and the output service will be severed. -// *
      -// * If a stream with the given hash does not exist or is not active, this function returns false. -// * -// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function. -// * @return Boolean determining if the stream was successfully killed. -// */ -// protected boolean killStream(String hash) { -// if(!streams.containsKey(hash)) -// return false; -// -// ExternalStreamConnection stream = streams.get(hash); -// if(!stream.isActive()) -// return false; -// -// return stream.stop(); -// } -// -// /** -// * Function used for processing external data and sending it to the output handler. -// * Uses the protocol {@code EDAT} for processing external data. -// * -// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function. -// * @param subscription Subscription which the data was received by. -// * @param data Data sent by the given subscription. -// */ -// private static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(Config.getProperty("app", "general.data.dateformat")); -// protected void processSubscription(String hash, String subscription, String data) { -// // define subscribed date -// String date = LocalDate.now().format(formatter); -// String collection = subscription + Config.getProperty("app", "general.collection.delim") + date; -// Response lsh_response = handler.send("LSH", "PUSH", "data", data, "collection", collection); -// if(lsh_response.code() != 200) -// Logger.warn(lsh_response); -// } -// -// /** -// * Function used for processing external data and sending it to the output handler. -// * Uses the protocol {@code EDAT} for processing external data. -// * -// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function. -// * @param request Request which the data was received by. -// * @param data Data sent by the given subscription. -// */ -// protected void processRequest(String collection, String data) { -// Response lsh_response = handler.send("LSH", "PUSH", "collection", collection, "data", data); -// if(lsh_response.code() != 200) -// Logger.warn(lsh_response); -// } -//} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/requests/ExternalRequestFramework.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/requests/ExternalRequestFramework.java deleted file mode 100644 index 18d68043..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/requests/ExternalRequestFramework.java +++ /dev/null @@ -1,442 +0,0 @@ -package org.stream.external.requests; - -import java.io.IOException; -import java.time.LocalDate; -import java.time.format.DateTimeFormatter; -import java.time.format.DateTimeParseException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Iterator; -import java.util.TreeMap; -import java.util.stream.Stream; - -import org.core.logger.Logger; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; -import org.stream.external.handler.ExternalStreamManager; - -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Request.Builder; -import okhttp3.Response; - -public abstract class ExternalRequestFramework { - - protected final static DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); - - protected final ExternalStreamManager manager; - - private String collection; - - private final String name; - private String url; - private final String[] url_path; - private final HashMap properties; - private final HashMap headers; - private final HashMap tags; - private final String[] recursive_location; - private final String recursive_replacement; - private final String[] path; - private final boolean is_dated; - private final String date_location; - protected final String date_start_var; - protected final String date_end_var; - private final DateTimeFormatter date_format; - - // default constructor used for templating - public ExternalRequestFramework() { - this.manager = null; - this.name = null; - this.url = null; - this.url_path = null; - this.properties = null; - this.headers = null; - this.tags = null; - this.recursive_location = null; - this.recursive_replacement = null; - this.path = null; - this.is_dated = false; - this.date_location = null; - this.date_start_var = null; - this.date_end_var = null; - this.date_format = null; - } - - public ExternalRequestFramework(ExternalStreamManager manager, String name, String url, String[] url_path, - HashMap properties, HashMap headers, - HashMap tags, String[] recursive_location, String recursive_replacement, String[] path, - boolean is_dated, String date_location, String date_start_var, String date_end_var, String date_format) { - this.manager = manager; - this.name = name; - this.url = url; - this.url_path = url_path; - this.properties = properties; - this.headers = headers; - this.tags = tags; - this.recursive_location = recursive_location; - this.recursive_replacement = recursive_replacement; - this.path = path; - this.is_dated = is_dated; - this.date_location = date_location; - this.date_start_var = date_start_var; - this.date_end_var = date_end_var; - if(is_dated) - this.date_format = DateTimeFormatter.ofPattern(date_format); - else - this.date_format = null; - } - - public final boolean hasTag(String tag) { - return this.tags.containsKey(tag); - } - - public final String getTag(String tag) { - return this.tags.get(tag); - } - - public final HashMap getTags() { - return this.tags; - } - - public final String getName() { - return name; - } - - public final String getCollection() { - return collection; - } - - public final String getUrl() { - return url; - } - - public final String[] getRecursiveLocation() { - return recursive_location; - } - - public final String getRecursiveReplacement() { - return recursive_replacement; - } - - public final String[] getPath() { - return path; - } - - protected final Request getRequest(HashMap properties, HashMap headers) { - return this.getRequest(this.url, properties, headers); - } - - protected final Request getRequest(String url, HashMap properties, HashMap headers) { - // define builder - Builder builder = new Builder(); - StringBuilder url_builder = new StringBuilder(url); - - // add properties delim if there are properties - if(!properties.isEmpty()) - url_builder.append("?"); - - // add all required/optional properties - for(String property : properties.keySet()) { - String value = properties.get(property); - - // check if empty - if(value == null || value.equals("")) { - Logger.warn(String.format("Property cannot be empty <%s>", property)); - return null; - } - - // check if required - if(value.equals(".") && this.properties.containsKey(property)) { - Logger.warn(String.format("Required property <%s> not defined.", property)); - return null; - } - - // add to url - url_builder.append(String.format("%s=%s&", property, value)); - } - - // remove final & and update builder - if(!properties.isEmpty()) - url_builder.deleteCharAt(url_builder.length() - 1); - builder = builder.url(url_builder.toString()); - - // add all headers - for(String header : headers.keySet()) { - String value = headers.get(header); - - // check if empty - if(value == null || value.equals("")) { - Logger.warn(String.format("Header cannot be empty <%s>", header)); - return null; - } - - // check if required - if(value.equals(".") && this.properties.containsKey(header)) { - Logger.warn(String.format("Required header <%s> not defined.", header)); - return null; - } - - builder = builder.addHeader(header, value); - } - - return builder.build(); - } - - public final synchronized String request(String[] url_path, HashMap properties, HashMap headers) { - // validate that url_path is correctly formatted - if(url_path.length % 2 != 0) { - Logger.warn("Url path is not formatted properly and must be in pairs."); - return "Url path is not formatted properly and must be in pairs."; - } - - // validate that url_path parameter is valid - if(this.url_path.length != url_path.length) { - Logger.warn("Url path does not match defined url path."); - return "Url path does not match defined url path."; - } - - // update path if there are url path extensions - StringBuilder url_builder = new StringBuilder(url); - if(url_path.length > 0) { - for(int i = 0; i < url_path.length; i+=2) { - if(!url_path[i].equals(this.url_path[i])) { - Logger.warn(String.format("Url path key <%s> does not match defined key <%s>", url_path[i], this.url_path[i])); - return String.format("Url path key <%s> does not match defined key <%s>", url_path[i], this.url_path[i]); - } - - url_builder.append("/").append(url_path[i+1]); - } - } - - return process(url_builder.toString(), properties, headers); - } - - public final synchronized String request(String[] url_path, HashMap properties, HashMap headers, TreeMap user_properties) { - // update collection to be dated - StringBuilder sb = new StringBuilder(); - sb.append(name); - if(!user_properties.isEmpty()) - sb.append("-").append(user_properties.toString()); - if(url_path.length != 0) - sb.append("-").append(Arrays.toString(url_path)); - this.collection = sb.toString(); - collection = sb.toString(); - return request(url_path, properties, headers); - } - - public final synchronized String request(String[] url_path, HashMap properties, HashMap headers, - String startDate, String endDate, TreeMap user_properties) { - - // validate that the request can be dated - if(!is_dated) { - Logger.warn("Request cannot be dated."); - return "Request cannot be dated."; - } - - // parse passed dates - LocalDate start, end; - try { - start = LocalDate.parse(startDate, formatter); - end = LocalDate.parse(endDate, formatter); - } catch (DateTimeParseException e) { - return "Unable to parse dates."; - } - - if(start == null || end == null) { - Logger.warn("Fatal error parsing dates."); - return "Fatal error parsing dates."; - } - - // retrieve all dates in-between - Stream dates = null; - - try { - dates = start.datesUntil(end); - } catch(Exception e) { - Logger.warn("End date must be after start date."); - return "End date must be after start date."; - } - - // submit requests for each date - Iterator itr = dates.iterator(); - while(itr.hasNext()) { - // retrieve date - LocalDate date = itr.next(); - - // retrieve start date var and update to location - switch(date_location) { - case "properties": - properties.put(date_start_var, date.format(date_format)); - break; - case "headers": - headers.put(date_start_var, date.format(date_format)); - break; - default: - Logger.warn("Invalid date.location parameter value."); - System.exit(1); - } - - // if end date is required add one day and push to properties - if(!date_end_var.equals(".")) { - LocalDate tmr = date.plusDays(1); - switch(date_location) { - case "properties": - properties.put(date_end_var, tmr.format(date_format)); - break; - case "headers": - headers.put(date_end_var, tmr.format(date_format)); - break; - default: - Logger.warn("Invalid date.location parameter value."); - System.exit(1); - } - } - - // submit request with updated properties - // update collection to be dated - String temp_collection = collection; - StringBuilder sb = new StringBuilder(); - sb.append(name); - sb.append("-").append(date.format(date_format).toString()); - if(!user_properties.isEmpty()) - sb.append("-").append(user_properties.toString()); - if(url_path.length != 0) - sb.append("-").append(Arrays.toString(url_path)); - this.collection = sb.toString(); - collection = sb.toString(); - String request = request(url_path, properties, headers); - collection = temp_collection; - if(request != null) - return request; - } - - return null; - } - - protected String processUrl(String url, HashMap headers) { - HashMap all_headers = new HashMap(); - - for(String header : this.headers.keySet()) - all_headers.put(header, this.headers.get(header)); - - for(String header : headers.keySet()) - all_headers.put(header, headers.get(header)); - - return processRequest(url, new HashMap(), all_headers); - } - - protected String process(String url, HashMap properties, HashMap headers) { - HashMap all_properties = new HashMap(); - HashMap all_headers = new HashMap(); - - // add all properties and headers - for(String property : this.properties.keySet()) - all_properties.put(property, this.properties.get(property)); - - for(String property : properties.keySet()) - all_properties.put(property, properties.get(property)); - - for(String header : this.headers.keySet()) - all_headers.put(header, this.headers.get(header)); - - for(String header : headers.keySet()) - all_headers.put(header, headers.get(header)); - - return processRequest(url, all_properties, all_headers); - } - - protected String processRequest(String url, HashMap properties, HashMap headers) { - OkHttpClient client = new OkHttpClient(); - Request request = getRequest(url, properties, headers); - if(request == null) { - Logger.warn("Malformed request, killing process."); - return "Malformed request, killing process."; - } - - Response response = null; - String body = null; - try { - response = client.newCall(request).execute(); - body = response.body().string().toString(); - if(response.code() != 200) { - Logger.warn(String.format("Request Failure code=<%d> url=<%s> body=<%s>", response.code(), request.url().toString(), body)); - return String.format("Request Failure code=<%d> url=<%s> body=<%s>", response.code(), request.url().toString(), body); - } - } catch (IOException e) { - e.printStackTrace(); - } - - if(body == null) { - Logger.warn("Response had fatal issue, killing process."); - return "Response had fatal issue, killing process."; - } - - // send to specific request handler - try { - handle(body, properties, headers); - } catch(Exception e) { - e.printStackTrace(); - return e.toString(); - } - - return null; - } - - protected abstract String handle(String json, HashMap properties, HashMap headers); - - public abstract String getType(); - - protected final HashMap parse(Object input) throws JSONException { - return parse(input, null); - } - - protected final HashMap parse(Object input, String parent) throws JSONException { - - HashMap out = new HashMap(); - - if (input instanceof JSONObject) { - Iterator keys = ((JSONObject) input).keys(); - - while (keys.hasNext()) { - - String key = (String) keys.next(); - - if (!(((JSONObject) input).get(key) instanceof JSONArray)) { - if (((JSONObject) input).get(key) instanceof JSONObject) { - HashMap parsed = parse(((JSONObject) input).get(key), key); - for(String parsedKey : parsed.keySet()) { - out.put(parent == null ? parsedKey : parent, parsed.get(parsedKey)); - } - } else { - out.put(parent == null ? key : parent, ((JSONObject) input).get(key).toString()); - } - } else { - HashMap parsed = parse(new JSONArray(((JSONObject) input).get(key).toString()), key); - for(String parsedKey : parsed.keySet()) { - out.put(parent == null ? parsedKey : parent, parsed.get(parsedKey)); - } - } - } - } - - if (input instanceof JSONArray) { - // check to see if objects are json, if not then create list - JSONArray arr = (JSONArray)input; - StringBuilder list = new StringBuilder(); - for (int i = 0; i < arr.length(); i++) { - try { - JSONObject a = arr.getJSONObject(i); - out.putAll(parse(a, parent)); - } catch(Exception e) { - list.append(arr.get(i).toString()).append(","); - } - } - - if(!list.isEmpty()) - out.put(parent == null ? "_placeholder" : parent, list.substring(0, list.length()-1)); - } - - return out; - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/requests/ExternalRequestGraphQL.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/requests/ExternalRequestGraphQL.java deleted file mode 100644 index 9bda2826..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/requests/ExternalRequestGraphQL.java +++ /dev/null @@ -1,268 +0,0 @@ -package org.stream.external.requests; - -import java.net.URI; -import java.net.http.HttpClient; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.time.LocalDate; -import java.util.HashMap; - -import org.core.logger.Logger; -import org.json.JSONArray; -import org.json.JSONObject; -import org.stream.external.handler.ExternalStreamManager; - -public class ExternalRequestGraphQL extends ExternalRequestFramework { - - public ExternalRequestGraphQL() { - super(); - } - - public ExternalRequestGraphQL(ExternalStreamManager manager, String name, String url, String[] url_path, HashMap properties, HashMap headers, - HashMap tags, String[] recursive_location, String recursive_replacement, String[] path, - boolean is_dated, String date_location, String date_start_var, String date_end_var, String date_format) { - - super(manager, name, url, url_path, properties, headers, tags, recursive_location, recursive_replacement, path, - is_dated, date_location, date_start_var, date_end_var, date_format); - } - - @Override - public String getType() { - return "graphql"; - } - - @Override - protected String processRequest(String url, HashMap properties, HashMap headers) { - // validate properties and url and not empty - if(url.isEmpty() || properties.isEmpty()) - return "Key parameter is empty"; - - // check for required tag -l - if(!hasTag("-l")) { - Logger.warn(String.format("Missing required recursive parameter <-l>")); - return "Missing required recursive parameter <-l>"; - } - - // check for -l being an integer - try { - Integer.parseInt(getTag("-l")); - } catch(Exception e) { - e.printStackTrace(); - Logger.warn(String.format("Value following <-l> must be an integer.")); - return "Value following <-l> must be an integer."; - } - - // validate all required properties exist - String[] req_properties = {"values", "method"}; - for(String key : req_properties) { - if(!properties.containsKey(key)) - return String.format("Required property <%s> not found.", key); - } - - // build query from properties: - - // generate values - String[] values_arr = properties.get("values").split(":"); - StringBuilder values = new StringBuilder(); - for(int i = 0; i < values_arr.length; i++) { - values.append(values_arr[i]); - if(i != values_arr.length - 1) - values.append(","); - } - - // generate timestamp/recursive values - String recursive_location = getRecursiveLocation()[0]; - StringBuilder where = new StringBuilder(); - if(properties.containsKey("gt")) { - where.append(String.format("{%s_gt:%s", recursive_location, properties.get("gt"))); - if(properties.containsKey("lt")) - where.append(String.format(" %s_lt:%s", recursive_location, properties.get("lt"))); - } - - // if no gt or lt detected, check if dated - else { - // if dated - if(properties.containsKey(date_start_var) && properties.containsKey(date_end_var)) { - // define timestamp definition based on recursive parameter for gt and lt - LocalDate start_date = LocalDate.parse(properties.get(date_start_var), formatter); - LocalDate end_date = LocalDate.parse(properties.get(date_end_var), formatter); - long start_epoch = start_date.toEpochDay() * 86400L; - long end_epoch = end_date.toEpochDay() * 86400L; - - // append - where.append(String.format("{%s_gt:%s %s_lt:%s", - recursive_location, start_epoch, - recursive_location, end_epoch)); - - // push gt and lt properties - properties.put("gt", "" + start_epoch); - properties.put("lt", "" + end_epoch); - } - - // if not dated then apply basic lt - else { - where.append(String.format("{%s_gt:0", recursive_location)); - properties.put("gt", "0"); - } - } - - // close recursion - where.append("}"); - - // append - String query = String.format("query {" - + "%s(first:%s orderBy:%s where:%s){%s}}", - properties.get("method"), - getTag("-l"), - recursive_location, - where, - values); - - // make request to server: - - // create client - HttpClient client = HttpClient.newHttpClient(); - - // create http request with POST method - HttpRequest.Builder builder = HttpRequest.newBuilder() - .uri(URI.create(getUrl())) - .POST(HttpRequest.BodyPublishers.ofString(new JSONObject().put("query", query).toString())); - - // add all headers - for(String key : headers.keySet()) { - builder = builder.header(key, headers.get(key)); - } - - // generate request - HttpRequest request = builder.build(); - - // submit request - HttpResponse response; - try { - response = client.send(request, HttpResponse.BodyHandlers.ofString()); - } catch(Exception e) { - e.printStackTrace(); - return "Invalid client request to server"; - } - - if(response.statusCode() != 200) { - return "GraphQL request failed with status code: " + response.statusCode(); - } - - // extract json body - String body = response.body(); - JSONObject json = new JSONObject(body); - if(json.has("errors")) { - return json.toString(); - } - - // process in handler - return handle(body, properties, headers); - } - - @Override - protected String handle(String json, HashMap properties, HashMap headers) { - // parse json formatting - JSONObject obj = new JSONObject(json); - - // validate all required parameters are present: - // check for required tag -l - if(!hasTag("-l")) { - Logger.warn(String.format("Missing required recursive parameter <-l>")); - return "Missing required recursive parameter <-l>"; - } - - // check for -l being an integer - int limit; - try { - limit = Integer.parseInt(getTag("-l")); - } catch(Exception e) { - e.printStackTrace(); - Logger.warn(String.format("Value following <-l> must be an integer.")); - return "Value following <-l> must be an integer."; - } - - // validate that the base has the proper data path - String[] path = getPath(); - JSONArray data = null; - for(int i = 0; i < path.length; i++) { - if(i == path.length - 1) { - if(obj.has(path[i])) { - try { - data = obj.getJSONArray(path[i]); - } catch(Exception e) { - Logger.warn("obj path type is not of type . Cannot parse"); - return "obj path type is not of type . Cannot parse"; - } - } - } - - else if(obj.has(path[i])) { - try { - obj = obj.getJSONObject(path[i]); - } catch(Exception e) { - Logger.warn("obj path type step is not of type . Cannot parse."); - return "obj path type step is not of type . Cannot parse."; - } - } - - else { - return "Data path is invalid. Please revise configuration."; - } - } - - // validate that data is non-empty - if(data == null) { - Logger.warn("Data array retrieval had fatal error, killing process."); - return "Data array retrieval had fatal error, killing process."; - } - - // if data is empty push empty data point - if(data.length() == 0) { - manager.processRequest(getCollection(), new HashMap()); - } - - // define recursive location - String recursive_location = getRecursiveLocation()[0]; - - // extract and print data - // validate recursive parameter with first data point and store value from last - // note that if dated then use date restrictive query - for(int i = 0; i < data.length(); i++) { - // retrieve values - HashMap point = parse(data.getJSONObject(i)); - - // if i == 0 then parse recursive parameter - if(i == 0 && !point.containsKey(recursive_location)) { - Logger.warn("Point does not contain recursive location."); - return "Point does not contain recursive location."; - } - - // push data - manager.processRequest(getCollection(), point); - - // if last data point then retrieve recursive parameter - if(i == data.length() - 1) { - if(!point.containsKey(recursive_location)) { - Logger.warn("Final point does not contain recursive location. Data collection may not be complete."); - return "Final point does not contain recursive location. Data collection may not be complete."; - } - - // update gt property with new value - // check for if gt uses a string parsing parameter. if so then add with parameter - try { - long gt = Long.parseLong(point.get(recursive_location)); - properties.put("gt", "" + gt); - } catch(Exception e) { - properties.put("gt", String.format("\"%s\"", point.get(recursive_location))); - } - } - } - - // if data is less than provided limit then return - if(data.length() < limit) - return null; - - return process(getUrl(), properties, headers); - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/requests/ExternalRequestManager.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/requests/ExternalRequestManager.java deleted file mode 100644 index 21fad5c7..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/requests/ExternalRequestManager.java +++ /dev/null @@ -1,228 +0,0 @@ -package org.stream.external.requests; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.lang.reflect.InvocationTargetException; -import java.net.URISyntaxException; -import java.util.HashMap; -import java.util.Properties; -import java.util.Set; - -import org.core.logger.Logger; -import org.reflections.Reflections; -import org.reflections.util.ConfigurationBuilder; -import org.stream.external.handler.ExternalStreamManager; - -public class ExternalRequestManager { - - private static final HashMap> templates = new HashMap>(); - private static final HashMap requests = new HashMap(); - - public void initialize(ExternalStreamManager manager) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException, URISyntaxException, IOException { - // load all templates - Reflections reflection = new Reflections(new ConfigurationBuilder().forPackages(ExternalRequestManager.class.getPackageName())); - Set> types = reflection.getSubTypesOf(ExternalRequestFramework.class); - for(Class c : types) { - templates.put(c.getDeclaredConstructor().newInstance().getType(), c); - } - - // load all property files - File directory = new File("target/classes/requests/"); - if(!directory.isDirectory()) { - System.err.println("Missing /target/classes/requests/ directory."); - System.exit(1); - } - - String[] requests = directory.list(); - for(String r : requests) { - // create file - Properties p = new Properties(); - p.load(new FileInputStream(directory.getPath() + "/" + r)); - - // extract all properties and parse - String name = null; - String url = null; - String[] url_path = {}; - HashMap properties = new HashMap(); - HashMap headers = new HashMap(); - String recursive_type = null; - HashMap tags = new HashMap(); - String[] recursive_location = {}; - String recursive_replacement = null; - String[] path = {}; - boolean is_dated = false; - String date_location = null; - String date_start_var = null; - String date_end_var = null; - String date_format = null; - - // parse name - if(p.containsKey("request.name")) { - name = p.getProperty("request.name"); - } else { - System.err.println(String.format("Missing required property <%s>.", "request.name")); - System.exit(1); - } - - // parse url base - if(p.containsKey("url.base")) { - url = p.getProperty("url.base"); - } else { - System.err.println(String.format("Missing required property <%s>.", "url.base")); - System.exit(1); - } - - // parse url base properties - if(p.containsKey("url.base.path")) { - url_path = p.getProperty("url.base.path").split(","); - if(url_path.length % 2 != 0) { - System.err.println("Url path must be formatted with pairs."); - System.exit(1); - } - } - - // parse url properties - if(p.containsKey("url.properties")) { - String[] arr = p.getProperty("url.properties").split(","); - if(arr.length % 2 != 0) { - System.err.println("Each property must be a pair."); - System.exit(1); - } - - for(int i = 0; i < arr.length; i+=2) - properties.put(arr[i], arr[i + 1]); - } else { - System.err.println(String.format("Missing required property <%s>.", "url.properties")); - System.exit(1); - } - - // parse url headers - if(p.containsKey("url.headers")) { - String[] arr = p.getProperty("url.headers").split(","); - if(arr.length % 2 != 0) { - System.err.println("Each property must be a pair."); - System.exit(1); - } - - for(int i = 0; i < arr.length; i+=2) - headers.put(arr[i], arr[i + 1]); - } else { - System.err.println(String.format("Missing required property <%s>.", "url.headers")); - System.exit(1); - } - - // parse data path - if(p.containsKey("data.path")) { - path = p.getProperty("data.path").split(","); - } else { - System.err.println(String.format("Missing required property <%s>.", "data.path")); - System.exit(1); - } - - // parse recursion type - if(p.containsKey("recursion.type")) { - recursive_type = p.getProperty("recursion.type"); - } else { - System.err.println(String.format("Missing required property <%s>.", "url.recursive.type")); - System.exit(1); - } - - // parse recursion tags - if(p.containsKey("recursion.tags")) { - String[] arr = p.getProperty("recursion.tags").split(","); - if(arr.length % 2 != 0) { - System.err.println("Each property must be a pair."); - System.exit(1); - } - - for(int i = 0; i < arr.length; i+=2) - tags.put(arr[i], arr[i + 1]); - } - - // parse recursive location - if(p.containsKey("recursion.location")) { - recursive_location = p.getProperty("recursion.location").split(","); - } - - // parse recursive replacement location - if(p.containsKey("recursion.replacement")) { - recursive_replacement = p.getProperty("recursive.replacement"); - } - - // parse date valid - if(p.containsKey("date.valid")) { - try { - is_dated = Boolean.parseBoolean(p.getProperty("date.valid")); - } catch(Exception e) { - System.err.println("Property date.valid is not of type boolean."); - System.exit(1); - } - } else { - System.err.println(String.format("Missing required property <%s>.", "date.valid")); - System.exit(1); - } - - // parse date location - if(p.containsKey("date.location")) { - date_location = p.getProperty("date.location"); - } else if(!p.containsKey("date.location") && is_dated) { - System.err.println("Missing required property date.location if date.valid=true."); - System.exit(1); - } - - // parse date start - if(p.containsKey("date.start")) { - date_start_var = p.getProperty("date.start"); - } else if(!p.containsKey("date.start") && is_dated) { - System.err.println("Missing required property date.start if date.valid=true."); - System.exit(1); - } - - // parse date end - if(p.containsKey("date.end")) { - date_end_var = p.getProperty("date.end"); - } else if(!p.containsKey("date.end") && is_dated) { - System.err.println("Missing required property date.end if date.valid=true."); - System.exit(1); - } - - // parse date format - if(p.containsKey("date.format")) { - date_format = p.getProperty("date.format"); - } else if(!p.containsKey("date.format") && is_dated) { - System.err.println("Missing required property date.format if date.valid=true."); - System.exit(1); - } - - // validate templates contains proper key - if(!templates.containsKey(recursive_type)) { - System.err.println(String.format("Template not found for <%s>.", recursive_type)); - System.exit(1); - } - - // validate that duplicate request doesn't exist - if(ExternalRequestManager.requests.containsKey(name)) { - System.err.println(String.format("Duplicate name found <%s>. Please modify one of the names to be unique.", name)); - System.exit(1); - } - - ExternalRequestManager.requests.put(name, templates.get(recursive_type).getDeclaredConstructor( - ExternalStreamManager.class, String.class, String.class, String[].class, HashMap.class, HashMap.class, - HashMap.class, String[].class, String.class, String[].class, - boolean.class, String.class, String.class, String.class, String.class).newInstance( - manager, name, url, url_path, properties, headers, tags, recursive_location, recursive_replacement, path, - is_dated, date_location, date_start_var, date_end_var, date_format)); - - Logger.log(String.format("[ExternalRequestManager] Successfully added Request Framework type [%s]", name)); - } - } - - public final boolean hasRequestFormat(String name) { - return requests.containsKey(name); - } - - public final ExternalRequestFramework getRequestFormat(String name) { - return requests.get(name); - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/requests/ExternalRequestREST.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/requests/ExternalRequestREST.java deleted file mode 100644 index 9b03c947..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/requests/ExternalRequestREST.java +++ /dev/null @@ -1,202 +0,0 @@ -package org.stream.external.requests; - -import java.util.HashMap; - -import org.core.logger.Logger; -import org.json.JSONArray; -import org.json.JSONObject; -import org.stream.external.handler.ExternalStreamManager; - -public class ExternalRequestREST extends ExternalRequestFramework { - - public ExternalRequestREST() { - super(); - } - - public ExternalRequestREST(ExternalStreamManager manager, String name, String url, String[] url_path, HashMap properties, HashMap headers, - HashMap tags, String[] recursive_location, String recursive_replacement, String[] path, - boolean is_dated, String date_location, String date_start_var, String date_end_var, String date_format) { - - super(manager, name, url, url_path, properties, headers, tags, recursive_location, recursive_replacement, path, - is_dated, date_location, date_start_var, date_end_var, date_format); - } - - @Override - public String getType() { - return "rest"; - } - - public String handle(String json, HashMap properties, HashMap headers) { - // parse json formatting - JSONObject obj = new JSONObject(json); - - // check for required tag -t - if(!hasTag("-t")) { - Logger.warn(String.format("Missing required recursive parameter <-t>")); - return "Missing required recursive parameter <-t>"; - } - - // validate all required parameters are present: - // check for required tag -l - int limit = 0; - if(!getTag("-t").equals("single")) { - if(!hasTag("-l")) { - Logger.warn(String.format("Missing required recursive parameter <-l>")); - return "Missing required recursive parameter <-l>"; - } else { - try { - limit = Integer.parseInt(getTag("-l")); - } catch(Exception e) { - e.printStackTrace(); - Logger.warn(String.format("Value following <-l> must be an integer.")); - return "Value following <-l> must be an integer."; - } - } - } - // check for -l being an integer - - - // validate that recursion location is valid - // should exist within json if url or static - // should exist within properties if type incremental - String recursive_parameter = null; - if(getTag("-t").equals("url") || getTag("-t").equals("static")) { - JSONObject base = obj; - String[] location = getRecursiveLocation(); - for(int i = 0; i < location.length - 1; i++) { - if(base.has(location[i])) { - base = base.getJSONObject(location[i]); - } else { - Logger.warn("Response does not contain proper recursive parameter location at: " + location[i]); - return "Response does not contain proper recursive parameter location at: " + location[i]; - } - } - - recursive_parameter = base.get(location[location.length - 1]).toString(); - } - - else if(getTag("-t").equals("incremental")) { - if(!properties.containsKey(getRecursiveLocation()[0])) { - Logger.warn("Properties do not contain incremental parameter listed in: " + getRecursiveLocation()[0]); - return "Properties do not contain incremental parameter listed in: " + getRecursiveLocation()[0]; - } - - recursive_parameter = properties.get(getRecursiveLocation()[0]); - } - - else if(getTag("-t").equals("single")) { - recursive_parameter = "<<>>"; - } - - else { - Logger.warn(String.format("Provided value <%s> for tag <-t> is not valid. Must be: url, incremental, static, or single", getTag("-t"))); - return String.format("Provided value <%s> for tag <-t> is not valid. Must be: url, incremental, static, or single", getTag("-t")); - } - - // validate that recursive parameter has been set - if(recursive_parameter == null) { - Logger.warn("Fatal error. Recursive parameter is null after successful initialization."); - return "Fatal error. Recursive parameter is null after successful initialization."; - } - - - // validate that the base has the proper obj path - String[] path = getPath(); - JSONArray data = null; - for(int i = 0; i < path.length; i++) { - if(i == path.length - 1) { - if(obj.has(path[i])) { - try { - data = obj.getJSONArray(path[i]); - } catch(Exception e) { - Logger.warn("obj path type is not of type . Cannot parse."); - return "obj path type is not of type . Cannot parse."; - } - } - } - - else if(obj.has(path[i])) { - try { - obj = obj.getJSONObject(path[i]); - } catch(Exception e) { - Logger.warn("obj path type step is not of type . Cannot parse."); - return "obj path type step is not of type . Cannot parse."; - } - } - } - - // validate that data is non-empty - if(data == null) { - Logger.warn("Data array retrieval had fatal error, killing process."); - return "Data array retrieval had fatal error, killing process."; - } - - // if data is empty push empty data point - if(data.length() == 0) { - manager.processRequest(getCollection(), new HashMap()); - } - - // extract and print data - for(int i = 0; i < data.length(); i++) { - HashMap point = parse(data.getJSONObject(i)); - manager.processRequest(getCollection(), point); - } - - // initiate recursive call - // if under limit requested or designated single call, terminate call - if(data.length() < limit || getTag("-t").equals("single")) - return null; - - // extract recursive parameter and apply to next call - String rec_type = getTag("-t"); - String url = getUrl(); - switch(rec_type) { - - // type url: - // - clear properties and set base to extracted url - // - execute - case "url": - properties.clear(); - url = recursive_parameter; - return processUrl(url, headers); - - // type incremental: - // - assert that parameter is an integer - // - increment parameter and update - // - execute - case "incremental": - int param = -1; - try { - param = Integer.parseInt(recursive_parameter); - } catch(Exception e) { - e.printStackTrace(); - Logger.warn(String.format("Recursive parameter <%s> is not of type integer.", recursive_parameter)); - return String.format("Recursive parameter <%s> is not of type integer.", recursive_parameter); - } - - if(param == -1) { - Logger.warn("Fatal parsing error occured."); - return "Fatal parsing error occured."; - } - - param += 1; - properties.put(getRecursiveLocation()[0], "" + param); - break; - - // type static: - // - check to see if replacement location exists - // - if so update replacement - // - execute - case "static": - if(getRecursiveReplacement() != null) { - properties.put(getRecursiveReplacement(), recursive_parameter); - } else { - properties.put(getRecursiveLocation()[0], recursive_parameter); - } - break; - } - - // increment param, replace, and execute - return process(url, properties, headers); - } -} \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/local/connected/connections/MongoDatabaseConnection.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/local/connected/connections/MongoDatabaseConnection.java deleted file mode 100644 index ba0df05d..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/local/connected/connections/MongoDatabaseConnection.java +++ /dev/null @@ -1,115 +0,0 @@ -package org.stream.local.connected.connections; - -import java.util.Set; - -import org.bson.Document; -import org.bson.conversions.Bson; -import org.properties.Config; -import org.stream.local.connected.mongodb.MongoDatabaseRequestHandler; -import org.stream.local.handler.DataState; -import org.stream.local.handler.LocalStreamConnection; -import org.stream.local.handler.LocalStreamManager; - -import com.mongodb.MongoClient; -import com.mongodb.MongoClientURI; -import com.mongodb.client.MongoCollection; -import com.mongodb.client.MongoDatabase; -import com.mongodb.client.model.Filters; - -// https://www.mongodb.com/docs/drivers/java/sync/current/fundamentals/builders/filters/ -public class MongoDatabaseConnection extends LocalStreamConnection { - - private MongoClient client; - private MongoDatabase state_db; - private MongoDatabase main_db; - - private boolean authorized = false; - - public MongoDatabaseConnection(LocalStreamManager manager) { - super(manager); - } - - @Override - public String getUUID() { - return "mongo_db"; - } - - public boolean init() { - client = new MongoClient(new MongoClientURI(Config.getProperty("stream", "mongodb.properties.uri"))); - state_db = client.getDatabase(Config.getProperty("stream", "mongodb.database.state")); - main_db = client.getDatabase(Config.getProperty("stream", "mongodb.database.main")); - return true; - } - - @Override - public boolean authorize() { - if(client == null || state_db == null || main_db == null) - return false; - - Bson filter = Filters.eq("title", "test"); - MongoCollection collection = main_db.getCollection(Config.getProperty("stream", "mongodb.auth.collection")); - collection.deleteOne(filter); - - Document document = new Document("title", "test"); - collection.insertOne(document); - - Document resolved = collection.find().filter(filter).first(); - - authorized = resolved != null && resolved.get("title").equals("test"); - - return authorized; - } - - @Override - public boolean isAuthorized() { - return authorized; - } - - @Override - public boolean isReady() { - return authorized; - } - - @Override - public boolean validate(String... query) { - // parse query - return MongoDatabaseRequestHandler.validate(query); - } - - @Override - public boolean contains(String... query) { - if(!validate(query)) - return false; - - return MongoDatabaseRequestHandler.contains(main_db, query); - } - - @Override - public DataState state(String... query) { - // TODO Integrate state handler - return null; - } - - @Override - public Set get(String... query) { - if(!validate(query)) - return null; - - return MongoDatabaseRequestHandler.get(main_db, query); - } - - @Override - public boolean push(String data, String collection) { - return MongoDatabaseRequestHandler.push(main_db, data, collection); - } - - @Override - public boolean modify(String data, String... query) { - // TODO Auto-generated method stub - return false; - } - - public Integer getParameterTranslation(String protocol, String parameter) { - return MongoDatabaseRequestHandler.getParameterTranslation(protocol, parameter); - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/local/connected/connections/TemplateLocalConnection.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/local/connected/connections/TemplateLocalConnection.java deleted file mode 100644 index c15004ab..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/local/connected/connections/TemplateLocalConnection.java +++ /dev/null @@ -1,92 +0,0 @@ -package org.stream.local.connected.connections; - -import java.util.HashSet; -import java.util.Set; - -import org.properties.Config; -import org.stream.local.handler.DataState; -import org.stream.local.handler.LocalStreamConnection; -import org.stream.local.handler.LocalStreamManager; - -public class TemplateLocalConnection extends LocalStreamConnection { - - public TemplateLocalConnection(LocalStreamManager manager) { - super(manager); - } - - @Override - public String getUUID() { - return "local_template"; - } - - public boolean init() { - return true; - } - - @Override - public boolean authorize() { - Config.setProperty("testing", "lsh.authorized", "true"); - return true; - } - - @Override - public boolean isAuthorized() { - return Config.getProperty("testing", "lsh.authorized").equals("true"); - } - - @Override - public boolean isReady() { - return Config.getProperty("testing", "lsh.ready").equals("true"); - } - - @Override - public boolean validate(String... query) { - return query[0].equals("valid") || - query[0].equals("dne") || - query[0].equals("irregular"); - } - - @Override - public boolean contains(String... query) { - return query[0].equals("valid") || query[0].equals("irregular"); - } - - @Override - public DataState state(String... query) { - if(query[0].equals("inv")) - return DataState.INVALID; - else if(query[0].equals("dne")) - return DataState.DOES_NOT_EXIST; - else if(query[0].equals("partial")) - return DataState.PARTIAL; - else if(query[0].equals("valid")) - return DataState.EXISTS; - else if(query[0].equals("modified")) - return DataState.MODIFIED; - else if(query[0].equals("corrupted")) - return DataState.CORRUPTED; - return DataState.INVALID; - } - - @Override - public Set get(String... query) { - if(query[0].equals("irregular")) - return null; - HashSet out = new HashSet(); - out.add("123"); - return out; - } - - public boolean push(String data, String collection) { - return collection.equals("valid"); - } - - @Override - public boolean modify(String data, String... query) { - return true; - } - - public Integer getParameterTranslation(String protocol, String parameter) { - return 1; - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/local/connected/mongodb/MongoDatabaseRequestHandler.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/local/connected/mongodb/MongoDatabaseRequestHandler.java deleted file mode 100644 index eca8ccf9..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/local/connected/mongodb/MongoDatabaseRequestHandler.java +++ /dev/null @@ -1,269 +0,0 @@ -package org.stream.local.connected.mongodb; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Set; - -import org.bson.Document; -import org.bson.conversions.Bson; -import org.properties.Config; - -import com.mongodb.client.MongoCollection; -import com.mongodb.client.MongoCursor; -import com.mongodb.client.MongoDatabase; -import com.mongodb.client.model.Filters; - -public class MongoDatabaseRequestHandler { - - private final static HashMap> translations; - private final static HashMap queries; - private final static HashMap requests; - -// define translation -// note translation maps all get, modify, and set queries to contains queries -// note alerts the engine to skip contains protocol -static { - translations = new HashMap>(); - - translations.put("contains_collection", new HashMap()); - translations.get("contains_collection").put("collection", 1); - - translations.put("contains_type", new HashMap()); - translations.get("contains_type").put("collection", 1); - translations.get("contains_type").put("type", 2); - - translations.put("contains_item", new HashMap()); - translations.get("contains_item").put("collection", 1); - translations.get("contains_item").put("type", 2); - translations.get("contains_item").put("id", 3); - - translations.put("get_all", new HashMap()); - translations.get("get_all").put("collection", 1); - - translations.put("get_item", new HashMap()); - translations.get("get_item").put("collection", 1); - translations.get("get_item").put("type", 2); - translations.get("get_item").put("id", 3); -} - -// define queries -static { - queries = new HashMap(); - - // contains queries: - queries.put("contains_collection", 1); - queries.put("contains_type", 2); - queries.put("contains_item", 3); - - // get queries: - queries.put("get_all", 1); - queries.put("get_item", 3); -} - -// define requests -static { - requests = new HashMap(); - - Class classobj = MongoDatabaseRequestHandler.class; - - try { - // contains requests: - requests.put("contains_collection", classobj.getMethod("containsCollection", MongoDatabase.class, String[].class)); - requests.put("contains_type", classobj.getMethod("containsType", MongoDatabase.class, String[].class)); - requests.put("contains_item", classobj.getMethod("containsItem", MongoDatabase.class, String[].class)); - - // get requests: - requests.put("get_all", classobj.getMethod("getAll", MongoDatabase.class, String[].class)); - requests.put("get_item", classobj.getMethod("getItem", MongoDatabase.class, String[].class)); - } catch(Exception e) { - e.printStackTrace(); - System.exit(1); - } -} - - public final static Integer getParameterTranslation(String protocol, String parameter) { - if(!translations.containsKey(protocol) || !translations.get(protocol).containsKey(parameter)) - return -1; - - return translations.get(protocol).get(parameter); - } - - public final static boolean validate(String... query) { - // validate not empty - if(query.length == 0) - return false; - - // validate contains query name - if(!queries.containsKey(query[0]) || !requests.containsKey(query[0]) || !translations.containsKey(query[0])) - return false; - - // validate parameter length - return query.length == queries.get(query[0]) + 1; - } - - // contains functions: - public final static boolean contains(MongoDatabase db, String... query) { - if(!validate(query)) - return false; - - for(int i = 0; i < query.length; i++) - query[i] = query[i].trim(); - - if(!translations.containsKey(query[0])) - return false; - - try { - // determine contains query depth - if(translations.get(query[0]).containsKey("id")) - return (boolean)requests.get("contains_item").invoke(null, db, - new String[] {"contains_item", - query[getParameterTranslation(query[0], "collection")], - query[getParameterTranslation(query[0], "type")], - query[getParameterTranslation(query[0], "id")] - }); - - else if(translations.get(query[0]).containsKey("type")) - return (boolean)requests.get("contains_type").invoke(null, db, - new String[] {"contains_type", - query[getParameterTranslation(query[0], "collection")], - query[getParameterTranslation(query[0], "type")] - }); - - else if(translations.get(query[0]).containsKey("collection")) - return (boolean)requests.get("contains_collection").invoke(null, db, - new String[] {"contains_collection", - query[getParameterTranslation(query[0], "collection")] - }); - - // non-canceling contains parameter to not falsely trigger query failure - else - //TODO implement catching for failed contains translation - return true; - - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - e.printStackTrace(); - System.exit(1); - } - - return false; - } - - public final static boolean containsCollection(MongoDatabase db, String[] query) { - if(!query[0].equals("contains_collection")) - return false; - - MongoCursor itr = db.listCollectionNames().iterator(); - while(itr.hasNext()) { - if(itr.next().equals(query[1])) - return true; - } - - return false; - } - - public final static boolean containsType(MongoDatabase db, String[] query) { - if(!query[0].equals("contains_type")) - return false; - - if(!containsCollection(db, new String[] {"contains_collection", query[1]})) - return false; - - Document document = db.getCollection(query[1]).find().first(); - for(Entry type : document.entrySet()) - if(type.getKey().equals(query[2])) - return true; - - return false; - } - - public final static boolean containsItem(MongoDatabase db, String[] query) { - if(!query[0].equals("contains_item")) - return false; - - if(!containsType(db, new String[] {"contains_type", query[1], query[2]})) - return false; - - return db.getCollection(query[1]).find(Filters.eq(query[2], query[3])).first() != null; - } - - // get functions: - @SuppressWarnings("unchecked") - public final static Set get(MongoDatabase db, String[] query) { - if(!validate(query)) - return null; - - try { - return (Set)requests.get(query[0]).invoke(null, db, query); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - e.printStackTrace(); - System.exit(1); - } - - return null; - } - - public final static Set getAll(MongoDatabase db, String[] query) { - if(!query[0].equals("get_all")) - return null; - - if(!containsCollection(db, new String[] {"contains_collection", query[1]})) - return null; - - MongoCollection collection = db.getCollection(query[1]); - Set out = new HashSet(); - MongoCursor itr = collection.find().iterator(); - while(itr.hasNext()) - out.add(itr.next().toJson()); - - return out; - } - - public final static Set getItem(MongoDatabase db, String... query) { - if(!query[0].equals("get_item")) - return null; - - if(!containsItem(db, new String[] {"contains_item", query[1], query[2], query[3]})) - return null; - - for(int i = 0; i < query.length; i++) - query[i] = query[i].trim(); - - MongoCollection collection = db.getCollection(query[1]); - Set out = new HashSet(); - MongoCursor itr = collection.find(Filters.eq(query[2], query[3])).iterator(); - while(itr.hasNext()) - out.add(itr.next().toJson()); - - return out; - } - - public final static boolean push(MongoDatabase db, String data, String collection_name) { - // retrieve created collection - MongoCollection collection = db.getCollection(collection_name); - - String[] split_data = data.split(Config.getProperty("app", "general.data.delim")); - // validate that every type has an id associated. - if(split_data.length % 2 != 0 && !data.equals("<<>>")) - return false; - - Document document = new Document(); - - // validate not empty - if(!data.equals("<<>>")) { - for(int i = 0; i < split_data.length; i+=2) - document.append(split_data[i], split_data[i + 1]); - document.append("_timestamp", System.nanoTime()); - collection.insertOne(document); - } else { - // create temporary object then remove - document.append("_empty", "holder"); - collection.insertOne(document); - Bson holder = Filters.eq("_empty", "holder"); - collection.deleteOne(holder); - } - return true; - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/local/handler/DataState.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/local/handler/DataState.java deleted file mode 100644 index da3b46fa..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/local/handler/DataState.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.stream.local.handler; - -public enum DataState { - DOES_NOT_EXIST, - PARTIAL, - EXISTS, - MODIFIED, - CORRUPTED, - INVALID; -} \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/local/handler/LocalStreamConnection.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/local/handler/LocalStreamConnection.java deleted file mode 100644 index 5cb1ce31..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/local/handler/LocalStreamConnection.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.stream.local.handler; - -import java.util.Set; - -import org.framework.interfaces.UUID; - -public abstract class LocalStreamConnection implements UUID { - - @SuppressWarnings("unused") - private final LocalStreamManager manager; - - public LocalStreamConnection(LocalStreamManager manager) { - this.manager = manager; - } - - public abstract boolean init(); - public abstract boolean authorize(); - public abstract boolean isAuthorized(); - public abstract boolean isReady(); - public abstract boolean validate(String... query); - public abstract boolean contains(String... query); - public abstract DataState state(String... query); - public abstract Set get(String... query); - public abstract boolean push(String data, String collection); - public abstract boolean modify(String data, String... query); - public abstract Integer getParameterTranslation(String protocol, String parameter); -} \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/local/handler/LocalStreamHandler.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/local/handler/LocalStreamHandler.java deleted file mode 100644 index cb15c340..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/local/handler/LocalStreamHandler.java +++ /dev/null @@ -1,134 +0,0 @@ -package org.stream.local.handler; - -import java.util.Set; -import org.framework.router.Packet; -import org.framework.router.Response; -import org.framework.router.ResponseFactory; -import org.framework.router.Router; -import org.properties.Config; - -public class LocalStreamHandler extends Router { - - private final LocalStreamManager manager; - - public LocalStreamHandler() { - super("local_stream_handler", "LSH"); - this.manager = new LocalStreamManager(this); - } - - public Response processINIT(Packet packet) { - String validate; - if((validate = packet.validate("source")) != null) - return ResponseFactory.response500("LocalStreamHandler", validate); - - String source = packet.getData("source"); - - if(!manager.containsTemplate(source)) - return ResponseFactory.response440(source); - - if(manager.isStreamDefined()) - return ResponseFactory.response443(source); - - if(!manager.setStream(source)) - return ResponseFactory.response442(source); - - if(!manager.authorize() || !manager.isAuthorized()) - return ResponseFactory.response444(source); - - if(!manager.isReady()) - return ResponseFactory.response441(source); - - return ResponseFactory.response200(); - } - - public Response processSCAN(Packet packet) { - String validate; - if((validate = packet.validate("query")) != null) - return ResponseFactory.response500("LocalStreamHandler", validate); - - if(!manager.isReady()) - return ResponseFactory.response441(manager.streamType()); - - String[] query = packet.getData("query").split(Config.getProperty("stream", "mongodb.query.delim")); - - if(!manager.validate(query)) - return ResponseFactory.response445(manager.streamType(), packet.getData("query")); - - if(manager.scan(query)) - return ResponseFactory.response200("true"); - - return ResponseFactory.response200("false"); - } - - //public Response process - public Response processRQST(Packet packet) { - String validate; - if((validate = packet.validate("type", "destination")) != null) - return ResponseFactory.response500("LocalStreamHandler", validate); - - String request = packet.getData("query"); - - String[] query = new String[] {"get_all", request}; - - if(request == null || request.isEmpty()) - return ResponseFactory.response501("Request was null when attempting to process."); - - if(!manager.validate(query)) - return ResponseFactory.response445(manager.streamType(), packet.getData("query")); - - if(!manager.scan(query)) - return ResponseFactory.response446(manager.streamType(), packet.getData("query")); - - Set output = manager.get(query); - - if(output == null) - return ResponseFactory.response447(manager.streamType(), packet.getData("query")); - - Response response; - for(String line : output) { - response = send("SRC", "EDAT", "data", line, "destination", packet.getData("destination")); - if(response.code() != 200) - return response; - } - - return ResponseFactory.response200(); - } - - public Response processSTAT(Packet packet) { - String validate; - if((validate = packet.validate("query")) != null) - return ResponseFactory.response500("LocalStreamHandler", validate); - - if(!manager.isReady()) - return ResponseFactory.response441(manager.streamType()); - - String[] query = packet.getData("query").split(Config.getProperty("stream", "mongodb.query.delim")); - - if(!manager.validate(query)) - return ResponseFactory.response445(manager.streamType(), packet.getData("query")); - - if(!manager.scan(query)) - return ResponseFactory.response446(manager.streamType(), packet.getData("query")); - - DataState state = manager.state(query); - if(state == DataState.INVALID) - return ResponseFactory.response448(manager.streamType(), packet.getData("query")); - - return ResponseFactory.response200(state.toString()); - } - - public Response processPUSH(Packet packet) { - // data format: data, location... - String validate; - if((validate = packet.validate("data", "collection")) != null) - return ResponseFactory.response500("LocalStreamHandler", validate); - - if(!manager.isReady()) - return ResponseFactory.response441(manager.streamType()); - - if(!manager.push(packet.getData("data"), packet.getData("collection"))) - return ResponseFactory.response449(manager.streamType(), packet.getData("data"), packet.getData("collection")); - - return ResponseFactory.response200(); - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/local/handler/LocalStreamManager.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/local/handler/LocalStreamManager.java deleted file mode 100644 index 0455a849..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/local/handler/LocalStreamManager.java +++ /dev/null @@ -1,132 +0,0 @@ -package org.stream.local.handler; - -import java.lang.reflect.InvocationTargetException; -import java.util.HashMap; -import java.util.Set; - -import org.reflections.Reflections; - -public class LocalStreamManager { - - @SuppressWarnings("unused") - private final LocalStreamHandler handler; - private final HashMap> templates; - private LocalStreamConnection stream; - - protected LocalStreamManager(LocalStreamHandler handler) { - this.handler = handler; - - templates = new HashMap>(); - - try { - reflect(); - } catch (Exception e) { - e.printStackTrace(); - System.exit(1); - } - } - - private void reflect() throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException { - Reflections reflection = new Reflections("org.stream.local.connected.connections"); - Set> types = reflection.getSubTypesOf(LocalStreamConnection.class); - for(Class c : types) { - String uuid = c.getDeclaredConstructor(LocalStreamManager.class).newInstance(this).getUUID(); - if(templates.containsKey(uuid)) { - System.err.println(String.format("Local stream UUID <%s> is not unique.", uuid)); - System.exit(1); - } - templates.put(uuid, c); - } - } - - protected boolean containsTemplate(String type) { - return templates.containsKey(type); - } - - protected boolean isStreamDefined() { - return stream != null; - } - - protected boolean setStream(String type) { - if(!templates.containsKey(type)) - return false; - - try { - stream = templates.get(type).getDeclaredConstructor(LocalStreamManager.class).newInstance(this); - } catch(Exception e) { - e.printStackTrace(); - System.exit(1); - } - - return stream.init(); - } - - protected String streamType() { - if(stream == null) - return null; - - return stream.getUUID(); - } - - protected boolean authorize() { - return stream.authorize(); - } - - protected boolean isAuthorized() { - return stream.isAuthorized(); - } - - protected boolean isReady() { - return stream.isReady(); - } - - protected boolean validate(String... query) { - return stream.validate(query); - } - - protected boolean scan(String... query) { - if(!stream.validate(query)) - return false; - - return stream.contains(query); - } - - protected boolean contains(String... query) { - if(!validate(query)) - return false; - - return stream.contains(query); - } - - public DataState state(String... query) { - if(!validate(query)) - return DataState.INVALID; - - return stream.state(query); - } - - protected Set get(String... query) { - if(!isReady() || !validate(query)) - return null; - - return stream.get(query); - } - - protected boolean push(String data, String collection) { - if(!isReady()) - return false; - - return stream.push(data, collection); - } - - protected boolean modify(String data, String... query) { - if(!validate(query)) - return false; - - return stream.modify(data, query); - } - - protected Integer getParameterTranslation(String protocol, String parameter) { - return stream.getParameterTranslation(protocol, parameter); - } -} \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/manager/StreamManager.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/manager/StreamManager.java deleted file mode 100644 index a160e4c1..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/manager/StreamManager.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.stream.manager; - -import org.framework.router.Router; -import org.stream.external.handler.ExternalStreamHandler; -import org.stream.local.handler.LocalStreamHandler; -import org.stream.registry.StreamRegistryController; - -public class StreamManager extends Router { - - public StreamManager() { - super("stream_manager", "STR"); - - StreamRegistryController src = new StreamRegistryController(); - ExternalStreamHandler esh = new ExternalStreamHandler(); - LocalStreamHandler hsh = new LocalStreamHandler(); - - connect(src, esh, hsh); - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/registry/StreamAuthorization.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/registry/StreamAuthorization.java deleted file mode 100644 index d5d5663f..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/registry/StreamAuthorization.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.stream.registry; - -public class StreamAuthorization { - -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/registry/StreamRegistryController.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/registry/StreamRegistryController.java deleted file mode 100644 index 1ee8759e..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/registry/StreamRegistryController.java +++ /dev/null @@ -1,163 +0,0 @@ -package org.stream.registry; - -import java.time.LocalDate; -import java.time.format.DateTimeFormatter; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.TreeMap; -import java.util.stream.Collectors; - -import org.framework.router.Packet; -import org.framework.router.Response; -import org.framework.router.ResponseFactory; -import org.framework.router.Router; -import org.properties.Config; - -public class StreamRegistryController extends Router { - - public StreamRegistryController() { - super("stream_registry_controller", "SRC"); - } - - public Response processEXSR(Packet packet) { - return send("ESH", "EXSR", packet.getData()); - } - - public Response processEDAT(Packet packet) { - return send("OUT", "EDAT", packet.getData()); - } - - public Response processSCAN(Packet packet) { - return send("LSH", "SCAN", packet.getData()); - } - - private static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(Config.getProperty("app", "general.data.dateformat")); - public Response processRQST(Packet packet) { - // Define passed properties. Types: - // Dated: data=key, start_date, end_date, request, query, destination - // Not Dated: data=key, request, query, destination - - String validate; - if((validate = packet.validate("type", "destination")) != null) - return ResponseFactory.response500("ExternalStreamHandler", validate); - - // check to see if request is dated - boolean dated = false; - if(packet.containsKey("start_date") || packet.containsKey("end_date")) { - if((validate = packet.validate("start_date", "end_date")) != null) - return ResponseFactory.response500("StreamRegistryController", validate); - - dated = true; - } - - // extract packet data - HashMap data = packet.getData(); - - // not dated - if(!dated) { - // format collection name - StringBuilder sb = new StringBuilder(); - sb.append(data.get("type")); - if(packet.containsKey("properties")) { - TreeMap ordered_properties = new TreeMap(); - String[] properties = data.get("properties").split(","); - if(properties.length % 2 != 0) - return ResponseFactory.response407("SRC", "RQST", "", data.toString()); - for(int i = 0; i < properties.length; i+=2) - ordered_properties.put(properties[i], properties[i + 1]); - sb.append("-").append(ordered_properties.toString()); - } - - if(packet.containsKey("url_path")) { - String[] url_path = data.get("url_path").split(","); - sb.append("-").append(Arrays.toString(url_path)); - } - data.put("query", String.format("%s", sb)); - - Response lsh_response, esh_response; - lsh_response = send("LSH", "RQST", data); - if(lsh_response.code() == 200) - return lsh_response; - - // if data does not exist send request to external stream handler - if(lsh_response.code() == 446) { - esh_response = send("ESH", "RQST", data); - if(esh_response.code() != 200) - return esh_response; - } - return send("LSH", "RQST", data); - } - - // dated - else if(dated) { - try { - LocalDate start = LocalDate.parse(packet.getData("start_date"), formatter); - LocalDate end = LocalDate.parse(packet.getData("end_date"), formatter); - List dates = start.datesUntil(end).collect(Collectors.toList()); - // invalid date processing - if(dates.isEmpty()) - throw new Exception(); - - Response lsh_response, esh_response; - for(LocalDate date : dates) { - // initial request - data.put("date", date.format(formatter)); - - // format collection name - StringBuilder sb = new StringBuilder(); - sb.append(data.get("type")); - sb.append("-").append(data.get("date")); - if(packet.containsKey("properties")) { - TreeMap ordered_properties = new TreeMap(); - String[] properties = data.get("properties").split(","); - if(properties.length % 2 != 0) - return ResponseFactory.response407("SRC", "RQST", "", data.toString()); - for(int i = 0; i < properties.length; i+=2) - ordered_properties.put(properties[i], properties[i + 1]); - sb.append("-").append(ordered_properties.toString()); - } - - if(packet.containsKey("url_path")) { - String[] url_path = data.get("url_path").split(","); - sb.append("-").append(Arrays.toString(url_path)); - } - data.put("query", sb.toString()); - - // initiate request - lsh_response = send("LSH", "RQST", data); - if(lsh_response.code() == 200) - continue; - - // if data does not exist - if(lsh_response.code() == 446) { - esh_response = send("ESH", "RQST", data); - if(esh_response.code() != 200) - return esh_response; - } - - // invalid request - else { - return lsh_response; - } - - // request again - lsh_response = send("LSH", "RQST", data); - if(lsh_response.code() != 200) - return lsh_response; - } - - // send end response - return ResponseFactory.response200(); - - } catch(Exception e) { - return ResponseFactory.response503(Config.getProperty("app", "general.data.dateformat"), packet.getData("start_date"), packet.getData("end_date")); - } - } - - // invalid query - else { - return ResponseFactory.response501("Boolean set to non binary value in cache."); - } - } -} \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/config/app.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/config/app.properties deleted file mode 100644 index 7a3ae42c..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/config/app.properties +++ /dev/null @@ -1,22 +0,0 @@ -# === GENERAL PROPERTIES === - -# delimiter used for internal processing -general.internal.delim=::: - -# data delimiter -general.data.delim=, - -# collection delimiter -general.collection.delim== - -# transfer delimiter -general.transfer.delim=&&& - -# date time formatter for data intake -general.data.dateformat=dd-MM-yyyy - -# enable all packet logging -general.logging.packets=true - -# enable all response logging -general.logging.responses=true \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/config/stream.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/config/stream.properties deleted file mode 100644 index 17e1b268..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/config/stream.properties +++ /dev/null @@ -1,53 +0,0 @@ -# === GENERAL PROPERTIES === - -# consumer types for accepting input -general.consumer.types=socket_consumer - -# producer types for writing output -general.producer.types=socket_producer - -# === REST SOCKET PROPERTIES === - -# Rest socket address -rest.socket.address=DataEngine - -# Rest socket port -rest.socket.port=61100 - -# Rest socket key -rest.socket.key=rest-key-reserved - -# === OUTPUT SOCKET PROPERTIES === - -# Output socket address -output.socket.address=RestApp - -# Output socket port -output.socket.port=61200 - -# === LOCAL STREAM PROPERTIES === - -# local stream type used for database configuration -local.stream.type=mongo_db - -# === MONGO DB PROPERTIES === - -# local MongoDB client URI -mongodb.properties.uri=mongodb://MONGO:27017 - -# local MongoDB state database name -mongodb.database.state=main-state-db - -# local MongoDB main database name -mongodb.database.main=main-db - -# authorization collection -mongodb.auth.collection=auth-collection - -# query delim -mongodb.query.delim=, - -# === POLYGON PROPERTIES === - -# request delim -polygon.request.delim=- \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/config/testing.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/config/testing.properties deleted file mode 100644 index ff2bbc03..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/config/testing.properties +++ /dev/null @@ -1,3 +0,0 @@ -# === TESTING PROPERTIES === -lsh.authorized=true -lsh.ready=true \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/log4j.xml b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/log4j.xml deleted file mode 100644 index d9577ba7..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/log4j.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-aave-governance.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-aave-governance.properties deleted file mode 100644 index a8d7136a..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-aave-governance.properties +++ /dev/null @@ -1,28 +0,0 @@ -request.name= amberdata-aave-governance - -url.base= https://web3api.io/api/v2/defi/lending/aavev3/governance - -url.properties= size,900 - -url.headers= accept,application/json,\ - x-api-key,. - -data.path= payload,\ - data - -recursion.type= rest - -recursion.tags= -l,900,\ - -t,url - -recursion.location= payload,metadata,next - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-aave-protocol.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-aave-protocol.properties deleted file mode 100644 index 2d608648..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-aave-protocol.properties +++ /dev/null @@ -1,29 +0,0 @@ -request.name= amberdata-aave-protocol - -url.base= https://web3api.io/api/v2/defi/lending/aavev3/protocol - -url.properties= size,900 - -url.headers= accept,application/json,\ - x-amberdata-blockchain-id,polygon-mainnet,\ - x-api-key,. - -data.path= payload,\ - data - -recursion.type= rest - -recursion.tags= -l,900,\ - -t,url - -recursion.location= payload,metadata,next - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-blockchain-addresses.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-blockchain-addresses.properties deleted file mode 100644 index fe33840f..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-blockchain-addresses.properties +++ /dev/null @@ -1,30 +0,0 @@ -request.name= amberdata-blockchain-addresses - -url.base= https://web3api.io/api/v2/addresses - -url.properties= page,0,\ - size,900 - -url.headers= accept,application/json,\ - x-amberdata-blockchain-id,ethereum-mainnet,\ - x-api-key,. - -data.path= payload,\ - records - -recursion.type= rest - -recursion.tags= -l,900,\ - -t,incremental - -recursion.location= page - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-compound-protocol.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-compound-protocol.properties deleted file mode 100644 index fb15c727..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-compound-protocol.properties +++ /dev/null @@ -1,28 +0,0 @@ -request.name= amberdata-compound-protocol - -url.base= https://web3api.io/api/v2/defi/lending/compoundv2/protocol - -url.properties= size,900 - -url.headers= accept,application/json,\ - x-api-key,. - -data.path= payload,\ - data - -recursion.type= rest - -recursion.tags= -l,900,\ - -t,url - -recursion.location= payload,metadata,next - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-makerdao-asset.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-makerdao-asset.properties deleted file mode 100644 index 4df62c4e..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-makerdao-asset.properties +++ /dev/null @@ -1,31 +0,0 @@ -request.name= amberdata-makerdao-asset - -url.base= https://web3api.io/api/v2/defi/lending/makerdao/assets - -url.base.path= asset,. - -url.properties= size,900 - -url.headers= accept,application/json,\ - x-amberdata-blockchain-id,ethereum-mainnet,\ - x-api-key,. - -data.path= payload,\ - data - -recursion.type= rest - -recursion.tags= -l,900,\ - -t,url - -recursion.location= payload,metadata,next - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-makerdao-protocol.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-makerdao-protocol.properties deleted file mode 100644 index eea45002..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-makerdao-protocol.properties +++ /dev/null @@ -1,29 +0,0 @@ -request.name= amberdata-makerdao-protocol - -url.base= https://web3api.io/api/v2/defi/lending/makerdao/protocol - -url.properties= size,900 - -url.headers= accept,application/json,\ - x-amberdata-blockchain-id,ethereum-mainnet,\ - x-api-key,. - -data.path= payload,\ - data - -recursion.type= rest - -recursion.tags= -l,900,\ - -t,url - -recursion.location= payload,metadata,next - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-makerdao-wallet.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-makerdao-wallet.properties deleted file mode 100644 index 6f7999fa..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-makerdao-wallet.properties +++ /dev/null @@ -1,30 +0,0 @@ -request.name= amberdata-makerdao-wallet - -url.base= https://web3api.io/api/v2/defi/lending/makerdao/wallets - -url.base.path= walletAddress,. - -url.properties= size,900 - -url.headers= accept,application/json,\ - x-api-key,. - -data.path= payload,\ - data - -recursion.type= rest - -recursion.tags= -l,900,\ - -t,url - -recursion.location= payload,metadata,next - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-sushiswap-protocol.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-sushiswap-protocol.properties deleted file mode 100644 index 59f53b4c..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-sushiswap-protocol.properties +++ /dev/null @@ -1,28 +0,0 @@ -request.name= amberdata-sushiswap-protocol - -url.base= https://web3api.io/api/v2/defi/dex/sushiswap/protocol - -url.properties= size,900 - -url.headers= accept,application/json,\ - x-api-key,. - -data.path= payload,\ - data - -recursion.type= rest - -recursion.tags= -l,900,\ - -t,url - -recursion.location= payload,metadata,next - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-uniswap-pool.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-uniswap-pool.properties deleted file mode 100644 index ee6d84a6..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/amberdata-uniswap-pool.properties +++ /dev/null @@ -1,30 +0,0 @@ -request.name= amberdata-uniswap-pool - -url.base= https://web3api.io/api/v2/defi/dex/uniswapv2/pools - -url.base.path= poolAddress,. - -url.properties= size,900 - -url.headers= accept,application/json,\ - x-api-key,. - -data.path= payload,\ - data - -recursion.type= rest - -recursion.tags= -l,900,\ - -t,url - -recursion.location= payload,metadata,next - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-borrows.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-borrows.properties deleted file mode 100644 index 4e1aef9c..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-borrows.properties +++ /dev/null @@ -1,39 +0,0 @@ -request.name= graph-aave-borrows - -url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 - -url.properties= method,borrows,\ - values,\ - id:\ - user{id}:\ - caller{id}:\ - reserve{id}:\ - pool{id}:\ - userReserve{id}:\ - timestamp:\ - amount:\ - borrowRate:\ - borrowRateMode:\ - stableTokenDebt:\ - variableTokenDebt - -url.headers= Content-Type,application/json - -data.path= data,\ - borrows - -recursion.type= graphql - -recursion.tags= -l,1000 - -recursion.location= timestamp - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-collaterals.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-collaterals.properties deleted file mode 100644 index 70c8cf19..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-collaterals.properties +++ /dev/null @@ -1,35 +0,0 @@ -request.name= graph-aave-collaterals - -url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 - -url.properties= method,usageAsCollaterals,\ - values,\ - id:\ - user{id}:\ - reserve{id}:\ - pool{id}:\ - userReserve{id}:\ - timestamp:\ - fromState:\ - toState - -url.headers= Content-Type,application/json - -data.path= data,\ - usageAsCollaterals - -recursion.type= graphql - -recursion.tags= -l,1000 - -recursion.location= timestamp - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-deposits.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-deposits.properties deleted file mode 100644 index 73978331..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-deposits.properties +++ /dev/null @@ -1,35 +0,0 @@ -request.name= graph-aave-deposits - -url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 - -url.properties= method,deposits,\ - values,\ - id:\ - user{id}:\ - caller{id}:\ - reserve{id}:\ - pool{id}:\ - userReserve{id}:\ - timestamp:\ - amount - -url.headers= Content-Type,application/json - -data.path= data,\ - deposits - -recursion.type= graphql - -recursion.tags= -l,1000 - -recursion.location= timestamp - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-flash-loans.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-flash-loans.properties deleted file mode 100644 index be909b1b..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-flash-loans.properties +++ /dev/null @@ -1,35 +0,0 @@ -request.name= graph-aave-flash-loans - -url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 - -url.properties= method,flashLoans,\ - values,\ - id:\ - pool{id}:\ - reserve{id}:\ - target:\ - amount:\ - totalFee:\ - initiator:\ - timestamp - -url.headers= Content-Type,application/json - -data.path= data,\ - flashLoans - -recursion.type= graphql - -recursion.tags= -l,1000 - -recursion.location= timestamp - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-liquidations.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-liquidations.properties deleted file mode 100644 index c5eecf7f..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-liquidations.properties +++ /dev/null @@ -1,38 +0,0 @@ -request.name= graph-aave-liquidations - -url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 - -url.properties= method,liquidationCalls,\ - values,\ - id:\ - user{id}:\ - pool{id}:\ - collateralReserve{id}:\ - collateralUserReserve{id}:\ - principalReserve{id}:\ - principalUserReserve{id}:\ - principalAmount:\ - collateralAmount:\ - timestamp:\ - liquidator - -url.headers= Content-Type,application/json - -data.path= data,\ - liquidationCalls - -recursion.type= graphql - -recursion.tags= -l,1000 - -recursion.location= timestamp - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-price-history-items.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-price-history-items.properties deleted file mode 100644 index 9a2da1af..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-price-history-items.properties +++ /dev/null @@ -1,31 +0,0 @@ -request.name= graph-aave-price-history-items - -url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 - -url.properties= method,priceHistoryItems,\ - values,\ - id:\ - asset{id}:\ - price:\ - timestamp - -url.headers= Content-Type,application/json - -data.path= data,\ - priceHistoryItems - -recursion.type= graphql - -recursion.tags= -l,1000 - -recursion.location= timestamp - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-redeems.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-redeems.properties deleted file mode 100644 index 90f70c38..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-redeems.properties +++ /dev/null @@ -1,35 +0,0 @@ -request.name= graph-aave-redeems - -url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 - -url.properties= method,redeemUnderlyings,\ - values,\ - id:\ - user{id}:\ - to{id}:\ - reserve{id}:\ - pool{id}:\ - userReserve{id}:\ - timestamp:\ - amount - -url.headers= Content-Type,application/json - -data.path= data,\ - redeemUnderlyings - -recursion.type= graphql - -recursion.tags= -l,1000 - -recursion.location= timestamp - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-repays.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-repays.properties deleted file mode 100644 index c2d44c4f..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-repays.properties +++ /dev/null @@ -1,35 +0,0 @@ -request.name= graph-aave-repays - -url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 - -url.properties= method,repays,\ - values,\ - id:\ - user{id}:\ - repayer{id}:\ - reserve{id}:\ - pool{id}:\ - userReserve{id}:\ - timestamp:\ - amount - -url.headers= Content-Type,application/json - -data.path= data,\ - repays - -recursion.type= graphql - -recursion.tags= -l,1000 - -recursion.location= timestamp - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-reserve-params-hist-items.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-reserve-params-hist-items.properties deleted file mode 100644 index 3f8a559e..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-reserve-params-hist-items.properties +++ /dev/null @@ -1,58 +0,0 @@ -request.name= graph-aave-reserve-params-hist-items - -url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 - -url.properties= method,reserveParamsHistoryItems,\ - values,\ - id:\ - reserve{id}:\ - variableBorrowRate:\ - variableBorrowIndex:\ - utilizationRate:\ - stableBorrowRate:\ - averageStableBorrowRate:\ - liquidityIndex:\ - liquidityRate:\ - totalLiquidity:\ - totalATokenSupply:\ - totalLiquidityAsCollateral:\ - availableLiquidity:\ - priceInEth:\ - priceInUsd:\ - timestamp:\ - totalScaledVariableDebt:\ - totalCurrentVariableDebt:\ - totalPrincipalStableDebt:\ - lifetimePrincipalStableDebt:\ - lifetimeScaledVariableDebt:\ - lifetimeCurrentVariableDebt:\ - lifetimeLiquidity:\ - lifetimeRepayments:\ - lifetimeWithdrawals:\ - lifetimeBorrows:\ - lifetimeLiquidated:\ - lifetimeFlashLoans:\ - lifetimeFlashLoanPremium:\ - lifetimeReserveFactorAccrued:\ - lifetimeDepositorsInterestEarned - -url.headers= Content-Type,application/json - -data.path= data,\ - reserveParamsHistoryItems - -recursion.type= graphql - -recursion.tags= -l,1000 - -recursion.location= timestamp - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-reserves.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-reserves.properties deleted file mode 100644 index 0d1a5380..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-reserves.properties +++ /dev/null @@ -1,82 +0,0 @@ -request.name= graph-aave-reserves - -url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 - -url.properties= method,reserves,\ - values,\ - id:\ - underlyingAsset:\ - pool{id}:\ - symbol:\ - name:\ - decimals:\ - usageAsCollateralEnabled:\ - borrowingEnabled:\ - stableBorrowRateEnabled:\ - isActive:\ - isFrozen:\ - price:\ - reserveInterestRateStrategy:\ - optimalUtilisationRate:\ - variableRateSlope1:\ - variableRateSlope2:\ - stableRateSlope1:\ - stableRateSlope2:\ - baseVariableBorrowRate:\ - baseLTVasCollateral:\ - reserveLiquidationThreshold:\ - reserveLiquidationBonus:\ - utilizationRate:\ - totalLiquidity:\ - totalATokenSupply:\ - totalLiquidityAsCollateral:\ - totalPrincipalStableDebt:\ - totalScaledVariableDebt:\ - totalCurrentVariableDebt:\ - totalDeposits:\ - liquidityRate:\ - averageStableRate:\ - variableBorrowRate:\ - stableBorrowRate:\ - liquidityIndex:\ - variableBorrowIndex:\ - aToken{id}:\ - vToken{id}:\ - sToken{id}:\ - reserveFactor:\ - lastUpdateTimestamp:\ - stableDebtLastUpdateTimestamp:\ - aEmissionPerSecond:\ - vEmissionPerSecond:\ - sEmissionPerSecond:\ - aTokenIncentivesIndex:\ - vTokenIncentivesIndex:\ - sTokenIncentivesIndex:\ - aIncentivesLastUpdateTimestamp:\ - vIncentivesLastUpdateTimestamp:\ - sIncentivesLastUpdateTimestamp:\ - lifetimeLiquidity:\ - lifetimePrincipalStableDebt:\ - lifetimeScaledVariableDebt:\ - lifetimeCurrentVariableDebt:\ - lifetimeRepayments:\ - lifetimeWithdrawals:\ - lifetimeBorrows:\ - lifetimeLiquidated:\ - lifetimeFlashLoans:\ - lifetimeFlashLoanPremium:\ - lifetimeDepositorsInterestEarned:\ - lifetimeReserveFactorAccrued - -url.headers= Content-Type,application/json - -data.path= data,\ - reserves - -recursion.type= graphql - -recursion.tags= -l,1000 - -recursion.location= id - -date.valid= false \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-swaps.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-swaps.properties deleted file mode 100644 index e1a22aaa..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-swaps.properties +++ /dev/null @@ -1,37 +0,0 @@ -request.name= graph-aave-swaps - -url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 - -url.properties= method,swaps,\ - values,\ - id:\ - user{id}:\ - reserve{id}:\ - pool{id}:\ - userReserve{id}:\ - timestamp:\ - borrowRateModeTo:\ - borrowRateModeFrom:\ - stableBorrowRate:\ - variableBorrowRate - -url.headers= Content-Type,application/json - -data.path= data,\ - swaps - -recursion.type= graphql - -recursion.tags= -l,1000 - -recursion.location= timestamp - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-user-reserves.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-user-reserves.properties deleted file mode 100644 index faf7a11d..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-user-reserves.properties +++ /dev/null @@ -1,51 +0,0 @@ -request.name= graph-aave-user-reserves - -url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 - -url.properties= method,userReserves,\ - values,\ - id:\ - pool{id}:\ - reserve{id}:\ - user{id}:\ - usageAsCollateralEnabledOnUser:\ - scaledATokenBalance:\ - currentATokenBalance:\ - scaledVariableDebt:\ - currentVariableDebt:\ - principalStableDebt:\ - currentStableDebt:\ - currentTotalDebt:\ - stableBorrowRate:\ - oldStableBorrowRate:\ - liquidityRate:\ - stableBorrowLastUpdateTimestamp:\ - variableBorrowIndex:\ - aTokenincentivesUserIndex:\ - vTokenincentivesUserIndex:\ - sTokenincentivesUserIndex:\ - aIncentivesLastUpdateTimestamp:\ - vIncentivesLastUpdateTimestamp:\ - sIncentivesLastUpdateTimestamp:\ - lastUpdateTimestamp - -url.headers= Content-Type,application/json - -data.path= data,\ - userReserves - -recursion.type= graphql - -recursion.tags= -l,1000 - -recursion.location= lastUpdateTimestamp - -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-users.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-users.properties deleted file mode 100644 index 3b5c7dca..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-aave-users.properties +++ /dev/null @@ -1,32 +0,0 @@ -request.name= graph-aave-users - -url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 - -url.properties= method,users,\ - values,\ - id:\ - borrowedReservesCount:\ - unclaimedRewards:\ - lifetimeRewards:\ - incentivesLastUpdated - -url.headers= Content-Type,application/json - -data.path= data,\ - users - -recursion.type= graphql - -recursion.tags= -l,1000 - -recursion.location= id - -date.valid= false - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/llama-stablecoins.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/llama-stablecoins.properties deleted file mode 100644 index a56a8c37..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/llama-stablecoins.properties +++ /dev/null @@ -1,17 +0,0 @@ -request.name= llama-stablecoins - -url.base= https://stablecoins.llama.fi/stablecoins - -url.properties= includePrices,false - -url.headers= accept,*/* - -data.path= peggedAssets - -recursion.type= rest - -recursion.tags= -t,single - -recursion.location= n/a - -date.valid= false \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/template.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/template.properties deleted file mode 100644 index 8cd4bd82..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/template.properties +++ /dev/null @@ -1,142 +0,0 @@ -# === Required Properties === -# These properties are required regardless of the request and should maintain a uniform syntax. - -# [REQUIRED] -# Name of the call to be referenced in the engine -request.name= template - -# [REQUIRED] -# Base url of the REST API call -url.base= http://localhost:8080 - -# [OPTIONAL] -# Url PATH properties that are required for parsing of the system. For example, if the url is -# https://localhost:8080/api/v1// where asset is dictated by the parameter 'asset', -# then this variable will be set to 'asset,.' Note all properties are in sequential order, such that -# asset must be defined before value. -url.base.path= asset,.,\ - value,. - -# [REQUIRED] -# This property details all required properties to be passed on runtime when called. Optional -# properties are not required to be specified here. Note that properties can be given a default -# value or can be forced to be specified. The list is in (, ) pairs, with each property -# having both a key and value specified. Default values can be placed in the property. -# Key's with no default property that are required on runtime can be filled as '.'. In this example -# has the default value , is required on runtime, and -# has the default value . -url.properties= property1,value1,\ - property2,.,\ - property3,value3 - -# [REQUIRED] -# This property details all headers to be passed on runtime when generating the request. -# Optional headers can be passed on runtime and are not required to be specified here. Note -# that headers can be given a default value or can be forced to be specified. The list is in -# (, ) pairs, with each property having both a key and value specified. Default -# values can be placed in the property. Key's with no default property that are required -# on runtime can be filled as '.'. In this example has the default value , -# and headers and are required on runtime. -url.headers= header1,value1,\ - header2,.,\ - header3,. - -# [REQUIRED] -# This property sets the location of the data points to be retrieved from the call. This -# should be a JSONArray which the handler can iterate through. To access these data points -# directly, the direct path must be specified (consisting of all JSONObject values). In -# the example below, we point to the path located at response->data. Note that for storing -# all non-array values and just recording all base values returned by the call, please set -# the value of this variable to '-b'. (i.e. url.data.path=-b) -data.path= response,\ - data - -# [REQUIRED] -# This property determines if the call is recursive, meaning that all data points required -# cannot be obtained in a single request. There are several integrated recursive types -# which have specific properties and handlers. Please review documentation to get a full -# list of these tags. To default with no recursive call, set this property to . -# This property we will set to for a clearer example. -recursion.type= rest - -# [OPTIONAL]: -# - url.recursion.type = static -# [REQUIRED]: -# - url.recursion.type = parameterized -# This property sets all tags pertaining to the type of recursive call. Please refer to -# the documentation for the full list of all tags and specified recursive types. All tags -# are in (, ) pairs, with each property having both a key and value specified. -# Should a tag not require an accompanying , please set it to '.'. In this -# example we will set the tags for which are as follows: -# -l: limit on items from request -# -t: type of recursive parameter (url, incremental, static) -recursion.tags= -l,1000,\ - -t,url - -# [OPTIONAL]: -# - url.recursion.type = static -# [REQUIRED]: -# - url.recursion.type = parameterized -# This property sets the recurisve parameters location within the response. Should '-t' in -# url.recursion.tags be of type 'incremental', this property should be the property to be -# incremented in the url. Otherwise if it is of type 'url' or 'static', point to the exact -# location in the response which will retrieve this property. For example if the next url -# is contained in: -# { -# "payload": { -# "metadata": { -# "next": "https://..." -# } -# } -# } -# this property would be set to 'payload,metadata,next'. For properties with no recursive call -# (with recursion type 'single') this parameter can remain blank. -recursion.location= payload,metadata,next - -# [OPTIONAL]: -# - url.recursion.type = static -# [REQUIRED]: -# - url.recursion.type = parameterized -# If the property defined in url.recursion.location is not the same as the property to replace -# in the url, define it here. If they are the same, this property can remain blank. This property -# will primarily be used if url.recursion.tags '-t' is set to 'static'. For '-t' being set to -# 'url', this property can remain blank. -recursion.replacement= - -# [REQUIRED] -# This parameter is used to determine whether the protocol can be dated or not. If so, the following -# properties are required: date.location, date.start, date.end, and date.format. -date.valid= true - -# [OPTIONAL]: -# - date.enable = false -# [REQUIRED]: -# - date.enable = true -# This property tells the location of the date variable, whether in the 'properties' or 'header' (note add -# path at a later date). This property will default to properties. -date.location= properties - -# [OPTIONAL]: -# - date.enable = false -# [REQUIRED]: -# - date.enable = true -# This property tells what key value will point to the start date variable. This is required and if no -# end date is required, use this as the primary date. -date.start= startDate - -# [OPTIONAL]: -# - date.enable = false -# [REQUIRED]: -# - date.enable = true -# This property tells what key value will point to the end date variable. This is not required if there -# is only one variable needed to reference the date. If so, set this value to '.' -date.end= endDate - -# [OPTIONAL]: -# - date.enable = false -# [REQUIRED]: -# - date.enable = true -# This property states the format for the date to be pushed to the parameter. Note this value will be extracted -# from the original call (which will be of the form yyyy-MM-dd and will always default to midnight should a time -# be required). -date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/webapp/WEB-INF/web.xml b/DeFi-Data-Engine/DeFi Data Engine/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index a1dc26e5..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - DeFiDataEngine - org.out.connections.RestConnection - - - - DeFiDataEngine - /v1/rest/* - - \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/test/java/test/framework/router/TestManager.java b/DeFi-Data-Engine/DeFi Data Engine/src/test/java/test/framework/router/TestManager.java deleted file mode 100644 index b117ee17..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/test/java/test/framework/router/TestManager.java +++ /dev/null @@ -1,78 +0,0 @@ -package test.framework.router; - -import static org.junit.Assert.assertEquals; - -import java.lang.reflect.Method; - -import org.framework.router.Packet; -import org.framework.router.Response; -import org.framework.router.ResponseFactory; -import org.framework.router.Router; -import org.junit.Test; - -class RouterTemp extends Router { - - public RouterTemp(String uuid, String tag) { - super(uuid, tag); - } - - public void defineProcesses() throws NoSuchMethodException, SecurityException { - Method p1 = getClass().getMethod("process1", Packet.class); - p1.setAccessible(true); - addProcess("", p1); - } - - public Response process1(Packet packet) { - return ResponseFactory.response0(); - } -} - -public class TestManager { - - @Test - public void TestConnection() { - RouterTemp r1 = new RouterTemp("r1", "r1"); - RouterTemp r2 = new RouterTemp("r2", "r2"); - RouterTemp r3 = new RouterTemp("r3", "r3"); - - r1.connect(r2); - - assertEquals(true, r1.isConnected(r2)); - assertEquals(false, r1.isConnected(r3)); - assertEquals(false, r2.isConnected(r3)); - } - - @Test - public void TestExistingConnection() { - RouterTemp r1 = new RouterTemp("r1", "r1"); - RouterTemp r2 = new RouterTemp("r2", "r2"); - RouterTemp r3 = new RouterTemp("r3", "r3"); - - r1.connect(r2); - r1.connect(r2); - r2.connect(r1); - - assertEquals(true, r1.isConnected(r2)); - assertEquals(false, r1.isConnected(r3)); - assertEquals(false, r2.isConnected(r3)); - } - - @Test - public void TestSends() { - RouterTemp r1 = new RouterTemp("r1", "r1"); - RouterTemp r2 = new RouterTemp("r2", "r2"); - RouterTemp r3 = new RouterTemp("r3", "r3"); - RouterTemp r4 = new RouterTemp("r4", "r4"); - - r1.connect(r2); - - assertEquals(0, r1.send("r2", "", "").code()); - assertEquals(0, r2.send("r1", "", "").code()); - assertEquals(404, r1.send("r3", "", "").code()); - assertEquals(400, r3.send("r1", "", "").code()); - - r3.connect(r4); - - assertEquals(404, r3.send("r2", "", "").code()); - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/test/java/test/framework/router/TestPacket.java b/DeFi-Data-Engine/DeFi Data Engine/src/test/java/test/framework/router/TestPacket.java deleted file mode 100644 index 2e49f3fc..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/test/java/test/framework/router/TestPacket.java +++ /dev/null @@ -1,39 +0,0 @@ -package test.framework.router; - -import static org.junit.Assert.assertEquals; - -import java.lang.reflect.Method; - -import org.framework.router.Packet; -import org.framework.router.Response; -import org.framework.router.ResponseFactory; -import org.framework.router.Router; -import org.junit.Test; - -class TestPacketRouter extends Router { - - public TestPacketRouter() { - super("TestPacketRouter", "TEST"); - } - - public Response process1(Packet p) { - return ResponseFactory.response0(); - } -} - -public class TestPacket { - - @Test - public void TestCreatePacket() { - TestPacketRouter router = new TestPacketRouter(); - TestPacketRouter router2 = new TestPacketRouter(); - router.connect(router2); - Packet packet = Packet.packet(router, "TAG", "SUBTAG", "DATA"); - - assertEquals("TEST", packet.getSender()); - assertEquals("TAG", packet.getTag()); - assertEquals("SUBTAG", packet.getSubTag()); - assertEquals("DATA", packet.getData()); - assertEquals(0, router.process1(packet).code()); - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/test/java/test/framework/router/TestRouter.java b/DeFi-Data-Engine/DeFi Data Engine/src/test/java/test/framework/router/TestRouter.java deleted file mode 100644 index c45f751d..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/test/java/test/framework/router/TestRouter.java +++ /dev/null @@ -1,204 +0,0 @@ -package test.framework.router; - -import static org.junit.Assert.assertEquals; - -import java.lang.reflect.Method; - -import org.framework.router.Packet; -import org.framework.router.Response; -import org.framework.router.Router; -import org.junit.Test; - -class Router1 extends Router { - - public Router1() { - super("Router1", "RT1"); - } - - public void defineProcesses() throws NoSuchMethodException, SecurityException { - Method p1 = getClass().getMethod("process1", Packet.class); - p1.setAccessible(true); - addProcess("", p1); - } -} - -class Router2 extends Router { - - public Router2() { - super("Router2", "RT2"); - } -} - -class RouterTemplate extends Router { - - private int num = 3; - - public RouterTemplate(String uuid, String tag) { - super(uuid, tag); - } - - public RouterTemplate(int num, String uuid, String tag) { - super(uuid, tag); - this.num = num; - } -} - -public class TestRouter { - - @Test - // router1 <-> router2 - public void TestSimpleRouterConnection() { - Router router1 = new Router1(); - Router router2 = new Router2(); - router1.connect(router2); - - assertEquals("Router1", router1.getUUID()); - assertEquals("RT1", router1.getTag()); - assertEquals(true, router1.isConnected(router2)); - assertEquals(true, router2.isConnected(router1)); - } - - @Test - // router1 <-> router2 - public void TestSimpleRouterSendPacket() { - Router router1 = new Router1(); - Router router2 = new Router2(); - router1.connect(router2); - - assertEquals(2, router1.send("RT2", "", "").code()); - assertEquals(1, router2.send("RT1", "", "").code()); - } - - @Test - // router1 <-> RouterTemp <-> router2 - public void TestCentralRouterConnection() { - Router1 r1 = new Router1(); - Router2 r2 = new Router2(); - RouterTemplate r3 = new RouterTemplate("Router3", "RT3"); - r3.connect(r1, r2); - - assertEquals(true, r1.isConnected(r2)); - assertEquals(true, r1.isConnected(r3)); - - assertEquals(true, r3.isConnected(r1)); - assertEquals(true, r3.isConnected(r2)); - assertEquals(false, r3.isConnected("RT4")); - - assertEquals(2, r1.send("RT2", "", "").code()); - assertEquals(3, r1.send("RT3", "", "").code()); - - assertEquals(1, r2.send("RT1", "", "").code()); - assertEquals(3, r2.send("RT3", "", "").code()); - - assertEquals(1, r3.send("RT1", "", "").code()); - assertEquals(2, r3.send("RT2", "", "").code()); - } - - @Test - // RouterTemp(1) <-> RouterTemp(2) <-> RouterTemp(3) <-> RouterTemp(4) - // | - // RouterTemp(5) <-> RouterTemp(6) - public void TestComplexRouterConnection() { - RouterTemplate r1 = new RouterTemplate(1, "Router1", "RT1"); - RouterTemplate r2 = new RouterTemplate(2, "Router2", "RT2"); - RouterTemplate r3 = new RouterTemplate(3, "Router3", "RT3"); - RouterTemplate r4 = new RouterTemplate(4, "Router4", "RT4"); - RouterTemplate r5 = new RouterTemplate(5, "Router5", "RT5"); - RouterTemplate r6 = new RouterTemplate(6, "Router6", "RT6"); - - r1.connect(r2, r3); - r4.connect(r5, r6); - r1.connect(r4); - - assertEquals(true, r1.isConnected(r2)); - assertEquals(true, r1.isConnected(r3)); - assertEquals(true, r1.isConnected(r4)); - assertEquals(true, r1.isConnected(r5)); - assertEquals(true, r1.isConnected(r6)); - - assertEquals(true, r6.isConnected(r1)); - assertEquals(true, r6.isConnected(r2)); - assertEquals(true, r6.isConnected(r3)); - assertEquals(true, r6.isConnected(r4)); - assertEquals(true, r6.isConnected(r5)); - - } - - @Test - // RouterTemp(1) <-> RouterTemp(2) <-> RouterTemp(3) <-> RouterTemp(4) - // | - // RouterTemp(5) <-> RouterTemp(6) - public void TestComplexRouterSend() { - RouterTemplate r1 = new RouterTemplate(1, "Router1", "RT1"); - RouterTemplate r2 = new RouterTemplate(2, "Router2", "RT2"); - RouterTemplate r3 = new RouterTemplate(3, "Router3", "RT3"); - RouterTemplate r4 = new RouterTemplate(4, "Router4", "RT4"); - RouterTemplate r5 = new RouterTemplate(5, "Router5", "RT5"); - RouterTemplate r6 = new RouterTemplate(6, "Router6", "RT6"); - - r1.connect(r2); - r2.connect(r3, r5); - r3.connect(r4); - r5.connect(r6); - - assertEquals(2, r1.send("RT2", "", "").code()); - assertEquals(3, r1.send("RT3", "", "").code()); - assertEquals(4, r1.send("RT4", "", "").code()); - assertEquals(5, r1.send("RT5", "", "").code()); - assertEquals(6, r1.send("RT6", "", "").code()); - - assertEquals(1, r2.send("RT1", "", "").code()); - assertEquals(3, r2.send("RT3", "", "").code()); - assertEquals(4, r2.send("RT4", "", "").code()); - assertEquals(5, r2.send("RT5", "", "").code()); - assertEquals(6, r2.send("RT6", "", "").code()); - - assertEquals(1, r3.send("RT1", "", "").code()); - assertEquals(2, r3.send("RT2", "", "").code()); - assertEquals(4, r3.send("RT4", "", "").code()); - assertEquals(5, r3.send("RT5", "", "").code()); - assertEquals(6, r3.send("RT6", "", "").code()); - - assertEquals(1, r4.send("RT1", "", "").code()); - assertEquals(2, r4.send("RT2", "", "").code()); - assertEquals(3, r4.send("RT3", "", "").code()); - assertEquals(5, r4.send("RT5", "", "").code()); - assertEquals(6, r4.send("RT6", "", "").code()); - - assertEquals(1, r5.send("RT1", "", "").code()); - assertEquals(2, r5.send("RT2", "", "").code()); - assertEquals(3, r5.send("RT3", "", "").code()); - assertEquals(4, r5.send("RT4", "", "").code()); - assertEquals(6, r5.send("RT6", "", "").code()); - - assertEquals(1, r6.send("RT1", "", "").code()); - assertEquals(2, r6.send("RT2", "", "").code()); - assertEquals(3, r6.send("RT3", "", "").code()); - assertEquals(4, r6.send("RT4", "", "").code()); - assertEquals(5, r6.send("RT5", "", "").code()); - } - - @Test - // RouterTemp(1) <-> RouterTemp(2) <-> RouterTemp(3) <-> RouterTemp(4) - // | - // RouterTemp(5) <-> RouterTemp(6) - // - // try pre-existing connection to check handle RouterTemp(3) <-> RouterTemp(6) - public void TestExistingConnection() { - RouterTemplate r1 = new RouterTemplate(1, "Router1", "RT1"); - RouterTemplate r2 = new RouterTemplate(2, "Router2", "RT2"); - RouterTemplate r3 = new RouterTemplate(3, "Router3", "RT3"); - RouterTemplate r4 = new RouterTemplate(4, "Router4", "RT4"); - RouterTemplate r5 = new RouterTemplate(5, "Router5", "RT5"); - RouterTemplate r6 = new RouterTemplate(6, "Router6", "RT6"); - - r1.connect(r2); - r2.connect(r3, r5); - r3.connect(r4); - r5.connect(r6); - - // existing connection - r3.connect(r6); - assertEquals(r3.getManager(), r6.getManager()); - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/test/java/test/lsh/mongodb/TestMongoDatabase.java b/DeFi-Data-Engine/DeFi Data Engine/src/test/java/test/lsh/mongodb/TestMongoDatabase.java deleted file mode 100644 index fb122be2..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/test/java/test/lsh/mongodb/TestMongoDatabase.java +++ /dev/null @@ -1,108 +0,0 @@ -package test.lsh.mongodb; - -import static org.junit.Assert.assertEquals; - -import org.apache.log4j.Level; -import org.apache.log4j.LogManager; -import org.bson.Document; -import org.bson.conversions.Bson; -import org.core.core.Core; -import org.junit.Test; -import org.properties.Config; - -import com.mongodb.MongoClient; -import com.mongodb.MongoClientURI; -import com.mongodb.client.MongoCollection; -import com.mongodb.client.MongoDatabase; -import com.mongodb.client.model.Filters; - -public class TestMongoDatabase { - -static { - // disable loggers - LogManager.getRootLogger().setLevel(Level.OFF); - Config.setProperty("stream", "general.consumer.types", "null"); - Config.setProperty("stream", "general.producer.types", "null"); - Config.setProperty("stream", "local.stream.type", "mongo_db"); - - // add testing database to system - Bson filter = Filters.eq("element1", "e1"); - MongoClient client = new MongoClient(new MongoClientURI(Config.getProperty("stream", "mongodb.properties.uri"))); - MongoDatabase db = client.getDatabase("testing"); - MongoCollection collection = db.getCollection("test-mongo-database"); - collection.deleteMany(filter); - collection.insertOne(new Document().append("_timestamp", System.nanoTime()).append("element1", "e1")); -} - - @Test - public void TestINIT() { - Config.setProperty("stream", "mongodb.database.main", "testing"); - new Core(); - } - - @Test - public void TestSCAN() { - Config.setProperty("stream", "mongodb.database.main", "testing"); - Core core = new Core(); - - // test contains_collection - assertEquals(200, core.send("LSH", "SCAN", "query", "contains_collection, test-mongo-database").code()); - assertEquals("true", core.send("LSH", "SCAN", "query", "contains_collection, test-mongo-database").data()); - assertEquals("false", core.send("LSH", "SCAN", "query", "contains_collection, dne").data()); - assertEquals(445, core.send("LSH", "SCAN", "query", "contains_collection, test-mongo-database, invalid").code()); - - // test contains_type - assertEquals(200, core.send("LSH", "SCAN", "query", "contains_type, test-mongo-database, element1").code()); - assertEquals("true", core.send("LSH", "SCAN", "query", "contains_type, test-mongo-database, element1").data()); - assertEquals("false", core.send("LSH", "SCAN", "query", "contains_type, test-mongo-database, dne").data()); - assertEquals(445, core.send("LSH", "SCAN", "query", "contains_type, test-mongo-database, element1, dne").code()); - - // test contains_item - assertEquals(200, core.send("LSH", "SCAN", "query", "contains_item, test-mongo-database, element1, e1").code()); - assertEquals("true", core.send("LSH", "SCAN", "query", "contains_item, test-mongo-database, element1, e1").data()); - assertEquals("false", core.send("LSH", "SCAN", "query", "contains_item, test-mongo-database, element1, dne").data()); - assertEquals(445, core.send("LSH", "SCAN", "query", "contains_item, test-mongo-database, element1, e1, invalid").code()); - - assertEquals(500, core.send("LSH", "SCAN", "query", "").code()); - } - - @Test - public void TestRQST() { - Config.setProperty("stream", "mongodb.database.main", "testing"); - Core core = new Core(); - - // test get_all - assertEquals(200, core.send("LSH", "RQST", "uuid", "external_template", "request", "test-mongo-database", "query", "get_all, test-mongo-database", "destination", "null").code()); - assertEquals(445, core.send("LSH", "RQST", "uuid", "external_template", "request", "test-mongo-database", "query", "get_all, test-mongo-database, invalid", "destination", "null").code()); - assertEquals(446, core.send("LSH", "RQST", "uuid", "external_template", "request", "test-mongo-database", "query", "get_all, dne", "destination", "null").code()); - - // test get_item - assertEquals(200, core.send("LSH", "RQST", "uuid", "external_template", "request", "test-mongo-database", "query", "get_item, test-mongo-database, element1, e1", "destination", "null").code()); - assertEquals(446, core.send("LSH", "RQST", "uuid", "external_template", "request", "test-mongo-database", "query", "get_item, test-mongo-database, element1, e2", "destination", "null").code()); - - assertEquals(500, core.send("LSH", "RQST", "uuid", "").code()); - } - - @Test - public void TestRQSTDated() { - Config.setProperty("stream", "mongodb.database.main", "testing"); - Core core = new Core(); - - assertEquals(200, core.send("SRC", "INIT", "source", "external_template", "key", "key").code()); - - assertEquals(200, core.send("SRC", "RQST", "key", "key", "request", "test-mongo-database", "query", "get_all, test-mongo-database", "destination", "null", - "start_date", "2020-09-01", "end_date", "2020-09-05").code()); - } - - @Test - public void TestPUSH() { - Config.setProperty("stream", "mongodb.database.main", "testing"); - Core core = new Core(); - - assertEquals(200, core.send("LSH", "PUSH", "data", "element1, e1", "collection", "test-mongo-database").code()); - assertEquals(200, core.send("LSH", "PUSH", "data", "element1, e2", "collection", "test-mongo-database").code()); - assertEquals(449, core.send("LSH", "PUSH", "data", "element1, e2, invalid", "collection", "test-mongo-database").code()); - - assertEquals(500, core.send("LSH", "PUSH", "data", "").code()); - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/test/java/test/protocols/TestESH.java b/DeFi-Data-Engine/DeFi Data Engine/src/test/java/test/protocols/TestESH.java deleted file mode 100644 index 7871dca0..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/test/java/test/protocols/TestESH.java +++ /dev/null @@ -1,119 +0,0 @@ -package test.protocols; - -import static org.junit.Assert.assertEquals; - -import org.apache.log4j.Level; -import org.apache.log4j.LogManager; -import org.core.core.Core; -import org.framework.router.Response; -import org.junit.Test; -import org.properties.Config; - -public class TestESH { - -static { - // disable loggers - LogManager.getRootLogger().setLevel(Level.OFF); - Config.setProperty("stream", "general.consumer.types", "null"); - Config.setProperty("stream", "general.producer.types", "null"); - Config.setProperty("stream", "local.stream.type", "null"); -} - - @Test - public void TestEXSR() { - Core core = new Core(); - - assertEquals(200, core.send("SRC", "EXSR", "external_template").code()); - assertEquals("true", core.send("SRC", "EXSR", "external_template").data()); - assertEquals("false", core.send("SRC", "EXSR", "template").data()); - - assertEquals(500, core.send("SRC", "EXSR", "").code()); - } - - @Test - public void TestEXST() { - Core core = new Core(); - - assertEquals(200, core.send("SRC", "INIT", "external_template, key").code()); - - assertEquals("true", core.send("SRC", "EXST", "key").data()); - assertEquals("false", core.send("SRC", "EXST", "key1").data()); - - assertEquals(500, core.send("SRC", "EXST", "").code()); - } - - @Test - public void TestINIT() { - Core core = new Core(); - - Response valid = core.send("SRC", "INIT", "external_template, key"); - assertEquals(200, valid.code()); - assertEquals("key", valid.data()); - assertEquals("true", core.send("SRC", "EXST", "key").data()); - - assertEquals(220, core.send("SRC", "INIT", "external_template, key").code()); - - assertEquals(420, core.send("SRC", "INIT", "does_not_exist").code()); - assertEquals(422, core.send("SRC", "INIT", "external_template, wrong").code()); - assertEquals(422, core.send("SRC", "INIT", "external_template").code()); - assertEquals(500, core.send("SRC", "INIT", "").code()); - } - - @Test - public void TestIATH() { - Core core = new Core(); - - assertEquals(200, core.send("SRC", "INIT", "external_template, key").code()); - - assertEquals(200, core.send("SRC", "IATH", "key").code()); - assertEquals("true", core.send("SRC", "IATH", "key").data()); - - assertEquals(421, core.send("SRC", "IATH", "does_not_exist").code()); - assertEquals(500, core.send("SRC", "IATH", "").code()); - } - - @Test - public void TestIATV() { - Core core = new Core(); - - assertEquals(200, core.send("SRC", "INIT", "external_template, key").code()); - assertEquals("false", core.send("SRC", "IATV", "key").data()); - assertEquals(200, core.send("SRC", "EXEC", "key").code()); - assertEquals("true", core.send("SRC", "IATV", "key").data()); - - assertEquals(421, core.send("SRC", "IATV", "does_not_exist").code()); - assertEquals(500, core.send("SRC", "IATV", "").code()); - } - - @Test - public void TestEXEC() { - Core core = new Core(); - - assertEquals(200, core.send("SRC", "INIT", "external_template, key").code()); - assertEquals(200, core.send("SRC", "INIT", "external_template, not_ready, true").code()); - - assertEquals(200, core.send("SRC", "EXEC", "key").code()); - assertEquals("true", core.send("SRC", "IATH", "key").data()); - assertEquals("true", core.send("SRC", "IATV", "key").data()); - - assertEquals(421, core.send("SRC", "EXEC", "does_not_exist").code()); - assertEquals(423, core.send("SRC", "EXEC", "not_ready").code()); - assertEquals(424, core.send("SRC", "EXEC", "key").code()); - } - - @Test - public void TestKILL() { - Core core = new Core(); - - assertEquals(200, core.send("SRC", "INIT", "external_template, key").code()); - assertEquals(200, core.send("SRC", "EXEC", "key").code()); - - assertEquals("true", core.send("SRC", "IATV", "key").data()); - assertEquals("true", core.send("SRC", "KILL", "key").data()); - assertEquals("false", core.send("SRC", "IATV", "key").data()); - - assertEquals(421, core.send("SRC", "KILL", "does_not_exist").code()); - assertEquals(425, core.send("SRC", "KILL", "key").code()); - assertEquals(500, core.send("SRC", "KILL", "").code()); - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/test/java/test/protocols/TestLSH.java b/DeFi-Data-Engine/DeFi Data Engine/src/test/java/test/protocols/TestLSH.java deleted file mode 100644 index c3eeabc2..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/test/java/test/protocols/TestLSH.java +++ /dev/null @@ -1,111 +0,0 @@ -package test.protocols; - -import static org.junit.Assert.assertEquals; - -import org.apache.log4j.Level; -import org.apache.log4j.LogManager; -import org.core.core.Core; -import org.junit.Test; -import org.properties.Config; - -public class TestLSH { - -static { - // disable loggers - LogManager.getRootLogger().setLevel(Level.OFF); - Config.setProperty("stream", "general.consumer.types", "null"); - Config.setProperty("stream", "general.producer.types", "null"); - Config.setProperty("stream", "local.stream.type", "null"); -} - - @Test - public void TestINIT() { - Config.setProperty("stream", "local.stream.type", "local_template"); - Config.setProperty("testing", "lsh.ready", "true"); - Core core = new Core(); - - assertEquals(440, core.send("LSH", "INIT", "null").code()); - assertEquals(443, core.send("LSH", "INIT", "local_template").code()); - assertEquals(500, core.send("LSH", "INIT", "").code()); - - // enable to check engine catch invalid property: local.stream.type - // Config.setProperty("stream", "local.stream.type", "invalid"); - // new Core(); - } - - @Test - public void TestSCAN() { - Config.setProperty("stream", "local.stream.type", "local_template"); - Core core = new Core(); - - assertEquals(200, core.send("LSH", "SCAN", "valid").code()); - - Config.setProperty("testing", "lsh.ready", "false"); - assertEquals(441, core.send("LSH", "SCAN", "valid").code()); - Config.setProperty("testing", "lsh.ready", "true"); - - assertEquals(445, core.send("LSH", "SCAN", "invalid").code()); - assertEquals("true", core.send("LSH", "SCAN", "valid").data()); - assertEquals("false", core.send("LSH", "SCAN", "dne").data()); - - assertEquals(500, core.send("LSH", "SCAN", "").code()); - } - - @Test - public void TestRQST() { -// Config.setProperty("stream", "local.stream.type", "local_template"); -// Core core = new Core(); -// -// assertEquals(200, core.send("LSH", "RQST", "valid", "null").code()); -// -// Config.setProperty("testing", "lsh.ready", "false"); -// assertEquals(441, core.send("LSH", "RQST", "valid", "null").code()); -// Config.setProperty("testing", "lsh.ready", "true"); -// -// assertEquals(445, core.send("LSH", "RQST", "invalid").code()); -// assertEquals(446, core.send("LSH", "RQST", "dne", "null").code()); -// assertEquals(447, core.send("LSH", "RQST", "irregular").code()); -// -// assertEquals(500, core.send("LSH", "RQST", "").code()); - } - - @Test - public void TestSTAT() { - Config.setProperty("stream", "local.stream.type", "local_template"); - Core core = new Core(); - - assertEquals(200, core.send("LSH", "STAT", "valid").code()); - assertEquals("EXISTS", core.send("LSH", "STAT", "valid").data()); - - Config.setProperty("testing", "lsh.ready", "false"); - assertEquals(441, core.send("LSH", "STAT", "valid").code()); - Config.setProperty("testing", "lsh.ready", "true"); - - assertEquals(445, core.send("LSH", "STAT", "invalid").code()); - assertEquals(446, core.send("LSH", "STAT", "dne").code()); - assertEquals(448, core.send("LSH", "STAT", "irregular").code()); - - assertEquals(500, core.send("LSH", "STAT", "").code()); - } - - @Test - public void TestPUSH() { - Config.setProperty("stream", "local.stream.type", "local_template"); - Core core = new Core(); - - assertEquals(200, core.send("LSH", "PUSH", format("1", "valid")).code()); - - Config.setProperty("testing", "lsh.ready", "false"); - assertEquals(441, core.send("LSH", "PUSH", format("1", "valid")).code()); - Config.setProperty("testing", "lsh.ready", "true"); - - assertEquals(449, core.send("LSH", "PUSH", format("1", "invalid")).code()); - - assertEquals(500, core.send("LSH", "PUSH", "").code()); - assertEquals(500, core.send("LSH", "PUSH", "1").code()); - } - - private String format(String s1, String s2) { - return s1 + Config.getProperty("app", "general.internal.delim") + s2; - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/test/java/test/speed/TestRouterSendSpeed.java b/DeFi-Data-Engine/DeFi Data Engine/src/test/java/test/speed/TestRouterSendSpeed.java deleted file mode 100644 index 8adecfce..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/test/java/test/speed/TestRouterSendSpeed.java +++ /dev/null @@ -1,115 +0,0 @@ -package test.speed; - -import java.lang.reflect.Method; - -import org.apache.log4j.Level; -import org.apache.log4j.LogManager; -import org.core.core.Core; -import org.framework.router.Packet; -import org.framework.router.Response; -import org.framework.router.Router; - -class RouterTemplate extends Router { - -static { - // disable loggers - LogManager.getRootLogger().setLevel(Level.OFF); -} - - private int num = 0; - - public RouterTemplate(String uuid, String tag) { - super(uuid, tag); - } - - public RouterTemplate(int num, String uuid, String tag) { - super(uuid, tag); - this.num = num; - } - - public void defineProcesses() throws NoSuchMethodException, SecurityException { - Method p1 = getClass().getMethod("process1", Packet.class); - p1.setAccessible(true); - addProcess("", p1); - } -} - -public class TestRouterSendSpeed { - - public static void testSpeed1() { -// long s1 = System.nanoTime(); -// boolean b = 165 == 196; -// long e1 = System.nanoTime(); -// System.out.println(e1 - s1); -// -// long s2 = System.nanoTime(); -// boolean c = "a".equals("a"); -// long e2 = System.nanoTime(); -// System.out.println(e2 - s2); - - final RouterTemplate r1 = new RouterTemplate(1, "Router1", "RT1"); - RouterTemplate r2 = new RouterTemplate(2, "Router2", "RT2"); - RouterTemplate r3 = new RouterTemplate(3, "Router3", "RT3"); - RouterTemplate r4 = new RouterTemplate(4, "Router4", "RT4"); - RouterTemplate r5 = new RouterTemplate(5, "Router5", "RT5"); - RouterTemplate r6 = new RouterTemplate(6, "Router6", "RT6"); - RouterTemplate r7 = new RouterTemplate(6, "Router6", "RT7"); - - r1.connect(r2); - r2.connect(r3, r5); - r3.connect(r4); - r5.connect(r6); - r6.connect(r7); - - // existing connection - r3.connect(r6); - - // speed test - double avg = 0; - int runs = 10; - for(int i = 0; i < runs; i++) { - long start = System.currentTimeMillis(); - long count = 0; - while(System.currentTimeMillis() < start + 1000) { - r1.send("RT7", "", ""); - count++; - } - - avg += count; - } - - avg /= runs; - System.out.println("Average packets sent: " + avg); - System.out.println("Nano seconds per packet: " + (1000000000.0 / avg)); - } - - public static void testSpeed2() { - Core core = new Core(); - - - core.send("SRC", "INIT", "external_template, key"); - - // speed test - double avg = 0; - int runs = 10; - for(int i = 0; i < runs; i++) { - long start = System.currentTimeMillis(); - long count = 0; - while(System.currentTimeMillis() < start + 1000) { - core.send("SRC", "RQST", "key, correct"); - count++; - } - - avg += count; - } - - avg /= runs; - System.out.println("Average packets sent: " + avg); - System.out.println("Nano seconds per packet: " + (1000000000.0 / avg)); - } - - public static void main(String[] args) { - testSpeed1(); - //testSpeed2(); - } -} diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/test/resources/README.txt b/DeFi-Data-Engine/DeFi Data Engine/src/test/resources/README.txt deleted file mode 100644 index 8e91f16b..00000000 --- a/DeFi-Data-Engine/DeFi Data Engine/src/test/resources/README.txt +++ /dev/null @@ -1 +0,0 @@ -blank readme for eclipse src file generation. \ No newline at end of file diff --git a/DeFi-Data-Engine/Documentation/Engine-Overview/Defi Engine Internal Manual.aux b/DeFi-Data-Engine/Documentation/Engine-Overview/Defi Engine Internal Manual.aux deleted file mode 100644 index fcacc8fe..00000000 --- a/DeFi-Data-Engine/Documentation/Engine-Overview/Defi Engine Internal Manual.aux +++ /dev/null @@ -1,40 +0,0 @@ -\relax -\providecommand\hyper@newdestlabel[2]{} -\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} -\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined -\global\let\oldcontentsline\contentsline -\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} -\global\let\oldnewlabel\newlabel -\gdef\newlabel#1#2{\newlabelxx{#1}#2} -\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} -\AtEndDocument{\ifx\hyper@anchor\@undefined -\let\contentsline\oldcontentsline -\let\newlabel\oldnewlabel -\fi} -\fi} -\global\let\hyper@last\relax -\gdef\HyperFirstAtBeginDocument#1{#1} -\providecommand\HyField@AuxAddToFields[1]{} -\providecommand\HyField@AuxAddToCoFields[2]{} -\@writefile{toc}{\contentsline {section}{\numberline {1}Abstract}{3}{section.1}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {2}Stack}{3}{section.2}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Java}{3}{subsection.2.1}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Cap'n Proto}{3}{subsection.2.2}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {3}Data Core}{4}{section.3}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Overview}{4}{subsection.3.1}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Packets}{4}{subsection.3.2}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Controller Connection}{4}{subsection.3.3}\protected@file@percent } -\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.3.1}Management}{4}{subsubsection.3.3.1}\protected@file@percent } -\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.3.2}Request Formatting}{5}{subsubsection.3.3.2}\protected@file@percent } -\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.3.3}Response Formatting}{6}{subsubsection.3.3.3}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {3.4}Processes}{6}{subsection.3.4}\protected@file@percent } -\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.4.1}Router Superclass}{6}{subsubsection.3.4.1}\protected@file@percent } -\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.4.2}Core}{8}{subsubsection.3.4.2}\protected@file@percent } -\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.4.3}Stream Manager}{10}{subsubsection.3.4.3}\protected@file@percent } -\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.4.4}External Stream Handler}{11}{subsubsection.3.4.4}\protected@file@percent } -\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.4.5}Historical Stream Handler}{12}{subsubsection.3.4.5}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {3.5}Internal Language}{13}{subsection.3.5}\protected@file@percent } -\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.5.1}Management Processes}{13}{subsubsection.3.5.1}\protected@file@percent } -\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.5.2}External Stream Requests}{13}{subsubsection.3.5.2}\protected@file@percent } -\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.5.3}Historical Stream Requests}{14}{subsubsection.3.5.3}\protected@file@percent } -\gdef \@abspage@last{14} diff --git a/DeFi-Data-Engine/Documentation/Engine-Overview/Defi Engine Internal Manual.log b/DeFi-Data-Engine/Documentation/Engine-Overview/Defi Engine Internal Manual.log deleted file mode 100644 index 36e3b42d..00000000 --- a/DeFi-Data-Engine/Documentation/Engine-Overview/Defi Engine Internal Manual.log +++ /dev/null @@ -1,925 +0,0 @@ -This is pdfTeX, Version 3.141592653-2.6-1.40.24 (MiKTeX 22.3) (preloaded format=pdflatex 2022.5.12) 15 JUL 2022 13:29 -entering extended mode - restricted \write18 enabled. - %&-line parsing enabled. -**"./Defi Engine Internal Manual.tex" -(Defi Engine Internal Manual.tex -LaTeX2e <2021-11-15> patch level 1 -L3 programming layer <2022-02-24> -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/base\article.cls -Document Class: article 2021/10/04 v1.4n Standard LaTeX document class -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/base\size10.clo -File: size10.clo 2021/10/04 v1.4n Standard LaTeX file (size option) -) -\c@part=\count185 -\c@section=\count186 -\c@subsection=\count187 -\c@subsubsection=\count188 -\c@paragraph=\count189 -\c@subparagraph=\count190 -\c@figure=\count191 -\c@table=\count192 -\abovecaptionskip=\skip47 -\belowcaptionskip=\skip48 -\bibindent=\dimen138 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/base\inputenc.sty -Package: inputenc 2021/02/14 v1.3d Input encoding file -\inpenc@prehook=\toks16 -\inpenc@posthook=\toks17 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/amsfonts\amssymb.sty -Package: amssymb 2013/01/14 v3.01 AMS font symbols - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/amsfonts\amsfonts.sty -Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support -\@emptytoks=\toks18 -\symAMSa=\mathgroup4 -\symAMSb=\mathgroup5 -LaTeX Font Info: Redeclaring math symbol \hbar on input line 98. -LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version `bold' -(Font) U/euf/m/n --> U/euf/b/n on input line 106. -)) (C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/amscls\amsthm.sty -Package: amsthm 2020/05/29 v2.20.6 -\thm@style=\toks19 -\thm@bodyfont=\toks20 -\thm@headfont=\toks21 -\thm@notefont=\toks22 -\thm@headpunct=\toks23 -\thm@preskip=\skip49 -\thm@postskip=\skip50 -\thm@headsep=\skip51 -\dth@everypar=\toks24 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/amsmath\amsmath.sty -Package: amsmath 2021/10/15 v2.17l AMS math features -\@mathmargin=\skip52 - -For additional information on amsmath, use the `?' option. -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/amsmath\amstext.sty -Package: amstext 2021/08/26 v2.01 AMS text - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/amsmath\amsgen.sty -File: amsgen.sty 1999/11/30 v2.0 generic functions -\@emptytoks=\toks25 -\ex@=\dimen139 -)) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/amsmath\amsbsy.sty -Package: amsbsy 1999/11/29 v1.2d Bold Symbols -\pmbraise@=\dimen140 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/amsmath\amsopn.sty -Package: amsopn 2021/08/26 v2.02 operator names -) -\inf@bad=\count193 -LaTeX Info: Redefining \frac on input line 234. -\uproot@=\count194 -\leftroot@=\count195 -LaTeX Info: Redefining \overline on input line 399. -\classnum@=\count196 -\DOTSCASE@=\count197 -LaTeX Info: Redefining \ldots on input line 496. -LaTeX Info: Redefining \dots on input line 499. -LaTeX Info: Redefining \cdots on input line 620. -\Mathstrutbox@=\box50 -\strutbox@=\box51 -\big@size=\dimen141 -LaTeX Font Info: Redeclaring font encoding OML on input line 743. -LaTeX Font Info: Redeclaring font encoding OMS on input line 744. -\macc@depth=\count198 -\c@MaxMatrixCols=\count199 -\dotsspace@=\muskip16 -\c@parentequation=\count266 -\dspbrk@lvl=\count267 -\tag@help=\toks26 -\row@=\count268 -\column@=\count269 -\maxfields@=\count270 -\andhelp@=\toks27 -\eqnshift@=\dimen142 -\alignsep@=\dimen143 -\tagshift@=\dimen144 -\tagwidth@=\dimen145 -\totwidth@=\dimen146 -\lineht@=\dimen147 -\@envbody=\toks28 -\multlinegap=\skip53 -\multlinetaggap=\skip54 -\mathdisplay@stack=\toks29 -LaTeX Info: Redefining \[ on input line 2938. -LaTeX Info: Redefining \] on input line 2939. -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/pgf/frontendlayer\tikz. -sty -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/pgf/basiclayer\pgf.sty -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/pgf/utilities\pgfrcs.st -y -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfutil --common.tex -\pgfutil@everybye=\toks30 -\pgfutil@tempdima=\dimen148 -\pgfutil@tempdimb=\dimen149 - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfutil --common-lists.tex)) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfutil --latex.def -\pgfutil@abb=\box52 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfrcs. -code.tex -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf\pgf.revision.tex) -Package: pgfrcs 2021/05/15 v3.1.9a (3.1.9a) -)) -Package: pgf 2021/05/15 v3.1.9a (3.1.9a) - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/pgf/basiclayer\pgfcore. -sty -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/graphics\graphicx.sty -Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR) - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/graphics\keyval.sty -Package: keyval 2014/10/28 v1.15 key=value parser (DPC) -\KV@toks@=\toks31 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/graphics\graphics.sty -Package: graphics 2021/03/04 v1.4d Standard LaTeX Graphics (DPC,SPQR) - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/graphics\trig.sty -Package: trig 2021/08/11 v1.11 sin cos tan (DPC) -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/graphics-cfg\graphics.c -fg -File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration -) -Package graphics Info: Driver file: pdftex.def on input line 107. - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/graphics-def\pdftex.def -File: pdftex.def 2020/10/05 v1.2a Graphics/color driver for pdftex -)) -\Gin@req@height=\dimen150 -\Gin@req@width=\dimen151 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/pgf/systemlayer\pgfsys. -sty -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfsy -s.code.tex -Package: pgfsys 2021/05/15 v3.1.9a (3.1.9a) - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfkeys -.code.tex -\pgfkeys@pathtoks=\toks32 -\pgfkeys@temptoks=\toks33 - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfkeys -filtered.code.tex -\pgfkeys@tmptoks=\toks34 -)) -\pgf@x=\dimen152 -\pgf@y=\dimen153 -\pgf@xa=\dimen154 -\pgf@ya=\dimen155 -\pgf@xb=\dimen156 -\pgf@yb=\dimen157 -\pgf@xc=\dimen158 -\pgf@yc=\dimen159 -\pgf@xd=\dimen160 -\pgf@yd=\dimen161 -\w@pgf@writea=\write3 -\r@pgf@reada=\read2 -\c@pgf@counta=\count271 -\c@pgf@countb=\count272 -\c@pgf@countc=\count273 -\c@pgf@countd=\count274 -\t@pgf@toka=\toks35 -\t@pgf@tokb=\toks36 -\t@pgf@tokc=\toks37 -\pgf@sys@id@count=\count275 - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgf.c -fg -File: pgf.cfg 2021/05/15 v3.1.9a (3.1.9a) -) -Driver file for pgf: pgfsys-pdftex.def - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfsy -s-pdftex.def -File: pgfsys-pdftex.def 2021/05/15 v3.1.9a (3.1.9a) - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfsy -s-common-pdf.def -File: pgfsys-common-pdf.def 2021/05/15 v3.1.9a (3.1.9a) -))) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfsy -ssoftpath.code.tex -File: pgfsyssoftpath.code.tex 2021/05/15 v3.1.9a (3.1.9a) -\pgfsyssoftpath@smallbuffer@items=\count276 -\pgfsyssoftpath@bigbuffer@items=\count277 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfsy -sprotocol.code.tex -File: pgfsysprotocol.code.tex 2021/05/15 v3.1.9a (3.1.9a) -)) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/xcolor\xcolor.sty -Package: xcolor 2021/10/31 v2.13 LaTeX color extensions (UK) - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/graphics-cfg\color.cfg -File: color.cfg 2016/01/02 v1.6 sample color configuration -) -Package xcolor Info: Driver file: pdftex.def on input line 227. -Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1352. -Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1356. -Package xcolor Info: Model `RGB' extended on input line 1368. -Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1370. -Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1371. -Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1372. -Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1373. -Package xcolor Info: Model `Gray' substituted by `gray' on input line 1374. -Package xcolor Info: Model `wave' substituted by `hsb' on input line 1375. -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor -e.code.tex -Package: pgfcore 2021/05/15 v3.1.9a (3.1.9a) - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmath.code -.tex -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathcalc. -code.tex -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathutil. -code.tex) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathparse -r.code.tex -\pgfmath@dimen=\dimen162 -\pgfmath@count=\count278 -\pgfmath@box=\box53 -\pgfmath@toks=\toks38 -\pgfmath@stack@operand=\toks39 -\pgfmath@stack@operation=\toks40 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct -ions.code.tex -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct -ions.basic.code.tex) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct -ions.trigonometric.code.tex) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct -ions.random.code.tex) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct -ions.comparison.code.tex) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct -ions.base.code.tex) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct -ions.round.code.tex) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct -ions.misc.code.tex) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct -ions.integerarithmetics.code.tex))) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfloat -.code.tex -\c@pgfmathroundto@lastzeros=\count279 -)) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfint.code. -tex) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor -epoints.code.tex -File: pgfcorepoints.code.tex 2021/05/15 v3.1.9a (3.1.9a) -\pgf@picminx=\dimen163 -\pgf@picmaxx=\dimen164 -\pgf@picminy=\dimen165 -\pgf@picmaxy=\dimen166 -\pgf@pathminx=\dimen167 -\pgf@pathmaxx=\dimen168 -\pgf@pathminy=\dimen169 -\pgf@pathmaxy=\dimen170 -\pgf@xx=\dimen171 -\pgf@xy=\dimen172 -\pgf@yx=\dimen173 -\pgf@yy=\dimen174 -\pgf@zx=\dimen175 -\pgf@zy=\dimen176 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor -epathconstruct.code.tex -File: pgfcorepathconstruct.code.tex 2021/05/15 v3.1.9a (3.1.9a) -\pgf@path@lastx=\dimen177 -\pgf@path@lasty=\dimen178 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor -epathusage.code.tex -File: pgfcorepathusage.code.tex 2021/05/15 v3.1.9a (3.1.9a) -\pgf@shorten@end@additional=\dimen179 -\pgf@shorten@start@additional=\dimen180 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor -escopes.code.tex -File: pgfcorescopes.code.tex 2021/05/15 v3.1.9a (3.1.9a) -\pgfpic=\box54 -\pgf@hbox=\box55 -\pgf@layerbox@main=\box56 -\pgf@picture@serial@count=\count280 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor -egraphicstate.code.tex -File: pgfcoregraphicstate.code.tex 2021/05/15 v3.1.9a (3.1.9a) -\pgflinewidth=\dimen181 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor -etransformations.code.tex -File: pgfcoretransformations.code.tex 2021/05/15 v3.1.9a (3.1.9a) -\pgf@pt@x=\dimen182 -\pgf@pt@y=\dimen183 -\pgf@pt@temp=\dimen184 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor -equick.code.tex -File: pgfcorequick.code.tex 2021/05/15 v3.1.9a (3.1.9a) -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor -eobjects.code.tex -File: pgfcoreobjects.code.tex 2021/05/15 v3.1.9a (3.1.9a) -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor -epathprocessing.code.tex -File: pgfcorepathprocessing.code.tex 2021/05/15 v3.1.9a (3.1.9a) -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor -earrows.code.tex -File: pgfcorearrows.code.tex 2021/05/15 v3.1.9a (3.1.9a) -\pgfarrowsep=\dimen185 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor -eshade.code.tex -File: pgfcoreshade.code.tex 2021/05/15 v3.1.9a (3.1.9a) -\pgf@max=\dimen186 -\pgf@sys@shading@range@num=\count281 -\pgf@shadingcount=\count282 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor -eimage.code.tex -File: pgfcoreimage.code.tex 2021/05/15 v3.1.9a (3.1.9a) - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor -eexternal.code.tex -File: pgfcoreexternal.code.tex 2021/05/15 v3.1.9a (3.1.9a) -\pgfexternal@startupbox=\box57 -)) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor -elayers.code.tex -File: pgfcorelayers.code.tex 2021/05/15 v3.1.9a (3.1.9a) -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor -etransparency.code.tex -File: pgfcoretransparency.code.tex 2021/05/15 v3.1.9a (3.1.9a) -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor -epatterns.code.tex -File: pgfcorepatterns.code.tex 2021/05/15 v3.1.9a (3.1.9a) -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor -erdf.code.tex -File: pgfcorerdf.code.tex 2021/05/15 v3.1.9a (3.1.9a) -))) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/modules\pgfmodule -shapes.code.tex -File: pgfmoduleshapes.code.tex 2021/05/15 v3.1.9a (3.1.9a) -\pgfnodeparttextbox=\box58 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/modules\pgfmodule -plot.code.tex -File: pgfmoduleplot.code.tex 2021/05/15 v3.1.9a (3.1.9a) -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/pgf/compatibility\pgfco -mp-version-0-65.sty -Package: pgfcomp-version-0-65 2021/05/15 v3.1.9a (3.1.9a) -\pgf@nodesepstart=\dimen187 -\pgf@nodesepend=\dimen188 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/pgf/compatibility\pgfco -mp-version-1-18.sty -Package: pgfcomp-version-1-18 2021/05/15 v3.1.9a (3.1.9a) -)) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/pgf/utilities\pgffor.st -y -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/pgf/utilities\pgfkeys.s -ty -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfkeys -.code.tex)) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/pgf/math\pgfmath.sty -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmath.code -.tex)) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgffor. -code.tex -Package: pgffor 2021/05/15 v3.1.9a (3.1.9a) - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmath.code -.tex) -\pgffor@iter=\dimen189 -\pgffor@skip=\dimen190 -\pgffor@stack=\toks41 -\pgffor@toks=\toks42 -)) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/frontendlayer/tik -z\tikz.code.tex -Package: tikz 2021/05/15 v3.1.9a (3.1.9a) - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/libraries\pgflibr -aryplothandlers.code.tex -File: pgflibraryplothandlers.code.tex 2021/05/15 v3.1.9a (3.1.9a) -\pgf@plot@mark@count=\count283 -\pgfplotmarksize=\dimen191 -) -\tikz@lastx=\dimen192 -\tikz@lasty=\dimen193 -\tikz@lastxsaved=\dimen194 -\tikz@lastysaved=\dimen195 -\tikz@lastmovetox=\dimen196 -\tikz@lastmovetoy=\dimen197 -\tikzleveldistance=\dimen198 -\tikzsiblingdistance=\dimen199 -\tikz@figbox=\box59 -\tikz@figbox@bg=\box60 -\tikz@tempbox=\box61 -\tikz@tempbox@bg=\box62 -\tikztreelevel=\count284 -\tikznumberofchildren=\count285 -\tikznumberofcurrentchild=\count286 -\tikz@fig@count=\count287 - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/modules\pgfmodule -matrix.code.tex -File: pgfmodulematrix.code.tex 2021/05/15 v3.1.9a (3.1.9a) -\pgfmatrixcurrentrow=\count288 -\pgfmatrixcurrentcolumn=\count289 -\pgf@matrix@numberofcolumns=\count290 -) -\tikz@expandcount=\count291 - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pgf/frontendlayer/tik -z/libraries\tikzlibrarytopaths.code.tex -File: tikzlibrarytopaths.code.tex 2021/05/15 v3.1.9a (3.1.9a) -))) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/framed\framed.sty -Package: framed 2011/10/22 v 0.96: framed or shaded text with page breaks -\OuterFrameSep=\skip55 -\fb@frw=\dimen256 -\fb@frh=\dimen257 -\FrameRule=\dimen258 -\FrameSep=\dimen259 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/multirow\multirow.sty -Package: multirow 2021/03/15 v2.8 Span multiple rows of a table -\multirow@colwidth=\skip56 -\multirow@cntb=\count292 -\multirow@dima=\skip57 -\bigstrutjot=\dimen260 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/geometry\geometry.sty -Package: geometry 2020/01/02 v5.9 Page Geometry - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/iftex\ifvtex.sty -Package: ifvtex 2019/10/25 v1.7 ifvtex legacy package. Use iftex instead. - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/iftex\iftex.sty -Package: iftex 2022/02/03 v1.0f TeX engine tests -)) -\Gm@cnth=\count293 -\Gm@cntv=\count294 -\c@Gm@tempcnt=\count295 -\Gm@bindingoffset=\dimen261 -\Gm@wd@mp=\dimen262 -\Gm@odd@mp=\dimen263 -\Gm@even@mp=\dimen264 -\Gm@layoutwidth=\dimen265 -\Gm@layoutheight=\dimen266 -\Gm@layouthoffset=\dimen267 -\Gm@layoutvoffset=\dimen268 -\Gm@dimlist=\toks43 - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/geometry\geometry.cfg)) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/hyperref\hyperref.sty -Package: hyperref 2022-02-21 v7.00n Hypertext links for LaTeX - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/ltxcmds\ltxcmds.sty -Package: ltxcmds 2020-05-10 v1.25 LaTeX kernel commands for general use (HO) -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pdftexcmds\pdftexcmds -.sty -Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO -) - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/infwarerr\infwarerr.s -ty -Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO) -) -Package pdftexcmds Info: \pdf@primitive is available. -Package pdftexcmds Info: \pdf@ifprimitive is available. -Package pdftexcmds Info: \pdfdraftmode found. -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/kvsetkeys\kvsetkeys.s -ty -Package: kvsetkeys 2019/12/15 v1.18 Key value parser (HO) -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/kvdefinekeys\kvdefine -keys.sty -Package: kvdefinekeys 2019-12-19 v1.6 Define keys (HO) -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/pdfescape\pdfescape.s -ty -Package: pdfescape 2019/12/09 v1.15 Implements pdfTeX's escape features (HO) -) (C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/hycolor\hycolor.sty -Package: hycolor 2020-01-27 v1.10 Color options for hyperref/bookmark (HO) -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/letltxmacro\letltxmacro -.sty -Package: letltxmacro 2019/12/03 v1.6 Let assignment for LaTeX macros (HO) -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/auxhook\auxhook.sty -Package: auxhook 2019-12-17 v1.6 Hooks for auxiliary files (HO) -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/kvoptions\kvoptions.sty -Package: kvoptions 2020-10-07 v3.14 Key value format for package options (HO) -) -\@linkdim=\dimen269 -\Hy@linkcounter=\count296 -\Hy@pagecounter=\count297 - (C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/hyperref\pd1enc.def -File: pd1enc.def 2022-02-21 v7.00n Hyperref: PDFDocEncoding definition (HO) -Now handling font encoding PD1 ... -... no UTF-8 mapping file for font encoding PD1 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/intcalc\intcalc.sty -Package: intcalc 2019/12/15 v1.3 Expandable calculations with integers (HO) -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/etexcmds\etexcmds.sty -Package: etexcmds 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO) -) -\Hy@SavedSpaceFactor=\count298 - (C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/hyperref\puenc.def -File: puenc.def 2022-02-21 v7.00n Hyperref: PDF Unicode definition (HO) -Now handling font encoding PU ... -... no UTF-8 mapping file for font encoding PU -) -Package hyperref Info: Hyper figures OFF on input line 4137. -Package hyperref Info: Link nesting OFF on input line 4142. -Package hyperref Info: Hyper index ON on input line 4145. -Package hyperref Info: Plain pages OFF on input line 4152. -Package hyperref Info: Backreferencing OFF on input line 4157. -Package hyperref Info: Implicit mode ON; LaTeX internals redefined. -Package hyperref Info: Bookmarks ON on input line 4390. -\c@Hy@tempcnt=\count299 - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/url\url.sty -\Urlmuskip=\muskip17 -Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. -) -LaTeX Info: Redefining \url on input line 4749. -\XeTeXLinkMargin=\dimen270 - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/bitset\bitset.sty -Package: bitset 2019/12/09 v1.3 Handle bit-vector datatype (HO) - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/bigintcalc\bigintcalc -.sty -Package: bigintcalc 2019/12/15 v1.5 Expandable calculations on big integers (HO -) -)) -\Fld@menulength=\count300 -\Field@Width=\dimen271 -\Fld@charsize=\dimen272 -Package hyperref Info: Hyper figures OFF on input line 6027. -Package hyperref Info: Link nesting OFF on input line 6032. -Package hyperref Info: Hyper index ON on input line 6035. -Package hyperref Info: backreferencing OFF on input line 6042. -Package hyperref Info: Link coloring OFF on input line 6047. -Package hyperref Info: Link coloring with OCG OFF on input line 6052. -Package hyperref Info: PDF/A mode OFF on input line 6057. -LaTeX Info: Redefining \ref on input line 6097. -LaTeX Info: Redefining \pageref on input line 6101. - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/base\atbegshi-ltx.sty -Package: atbegshi-ltx 2021/01/10 v1.0c Emulation of the original atbegshi -package with kernel methods -) -\Hy@abspage=\count301 -\c@Item=\count302 -\c@Hfootnote=\count303 -) -Package hyperref Info: Driver (autodetected): hpdftex. -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/hyperref\hpdftex.def -File: hpdftex.def 2022-02-21 v7.00n Hyperref driver for pdfTeX - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/base\atveryend-ltx.sty -Package: atveryend-ltx 2020/08/19 v1.0a Emulation of the original atveryend pac -kage -with kernel methods -) -\Fld@listcount=\count304 -\c@bookmark@seq@number=\count305 - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/rerunfilecheck\rerunfil -echeck.sty -Package: rerunfilecheck 2019/12/05 v1.9 Rerun checks for auxiliary files (HO) - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/uniquecounter\uniquec -ounter.sty -Package: uniquecounter 2019/12/15 v1.4 Provide unlimited unique counter (HO) -) -Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 -86. -) -\Hy@SectionHShift=\skip58 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/titling\titling.sty -Package: titling 2009/09/04 v2.1d maketitle typesetting -\thanksmarkwidth=\skip59 -\thanksmargin=\skip60 -\droptitle=\skip61 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/l3backend\l3backend-pdf -tex.def -File: l3backend-pdftex.def 2022-02-07 L3 backend support: PDF output (pdfTeX) -\l__color_backend_stack_int=\count306 -\l__pdf_internal_box=\box63 -) (Defi Engine Internal Manual.aux) -\openout1 = `"Defi Engine Internal Manual.aux"'. - -LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 20. -LaTeX Font Info: ... okay on input line 20. -LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 20. -LaTeX Font Info: ... okay on input line 20. -LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 20. -LaTeX Font Info: ... okay on input line 20. -LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 20. -LaTeX Font Info: ... okay on input line 20. -LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 20. -LaTeX Font Info: ... okay on input line 20. -LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 20. -LaTeX Font Info: ... okay on input line 20. -LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 20. -LaTeX Font Info: ... okay on input line 20. -LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 20. -LaTeX Font Info: ... okay on input line 20. -LaTeX Font Info: Checking defaults for PU/pdf/m/n on input line 20. -LaTeX Font Info: ... okay on input line 20. - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/context/base/mkii\supp-pdf.mk -ii -[Loading MPS to PDF converter (version 2006.09.02).] -\scratchcounter=\count307 -\scratchdimen=\dimen273 -\scratchbox=\box64 -\nofMPsegments=\count308 -\nofMParguments=\count309 -\everyMPshowfont=\toks44 -\MPscratchCnt=\count310 -\MPscratchDim=\dimen274 -\MPnumerator=\count311 -\makeMPintoPDFobject=\count312 -\everyMPtoPDFconversion=\toks45 -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/epstopdf-pkg\epstopdf-b -ase.sty -Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf -Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4 -85. - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/00miktex\epstopdf-sys.c -fg -File: epstopdf-sys.cfg 2021/03/18 v2.0 Configuration of epstopdf for MiKTeX -)) -*geometry* driver: auto-detecting -*geometry* detected driver: pdftex -*geometry* verbose mode - [ preamble ] result: -* driver: pdftex -* paper: -* layout: -* layoutoffset:(h,v)=(0.0pt,0.0pt) -* modes: -* h-part:(L,W,R)=(72.26999pt, 469.75502pt, 72.26999pt) -* v-part:(T,H,B)=(72.26999pt, 650.43001pt, 72.26999pt) -* \paperwidth=614.295pt -* \paperheight=794.96999pt -* \textwidth=469.75502pt -* \textheight=650.43001pt -* \oddsidemargin=0.0pt -* \evensidemargin=0.0pt -* \topmargin=-37.0pt -* \headheight=12.0pt -* \headsep=25.0pt -* \topskip=10.0pt -* \footskip=30.0pt -* \marginparwidth=65.0pt -* \marginparsep=11.0pt -* \columnsep=10.0pt -* \skip\footins=9.0pt plus 4.0pt minus 2.0pt -* \hoffset=0.0pt -* \voffset=0.0pt -* \mag=1000 -* \@twocolumnfalse -* \@twosidefalse -* \@mparswitchfalse -* \@reversemarginfalse -* (1in=72.27pt=25.4mm, 1cm=28.453pt) - -Package hyperref Info: Link coloring OFF on input line 20. -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/hyperref\nameref.sty -Package: nameref 2021-04-02 v2.47 Cross-referencing by name of section - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/refcount\refcount.sty -Package: refcount 2019/12/15 v3.6 Data extraction from label references (HO) -) -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/generic/gettitlestring\gettit -lestring.sty -Package: gettitlestring 2019/12/15 v1.6 Cleanup title references (HO) -) -\c@section@level=\count313 -) -LaTeX Info: Redefining \ref on input line 20. -LaTeX Info: Redefining \pageref on input line 20. -LaTeX Info: Redefining \nameref on input line 20. - (Defi Engine Internal Manual.out) -(Defi Engine Internal Manual.out) -\@outlinefile=\write4 -\openout4 = `"Defi Engine Internal Manual.out"'. - -LaTeX Font Info: Trying to load font information for U+msa on input line 23. - - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/amsfonts\umsa.fd -File: umsa.fd 2013/01/14 v3.01 AMS symbols A -) -LaTeX Font Info: Trying to load font information for U+msb on input line 23. - - -(C:\Users\conmf\AppData\Local\Programs\MiKTeX\tex/latex/amsfonts\umsb.fd -File: umsb.fd 2013/01/14 v3.01 AMS symbols B -) -[1 - -{C:/Users/conmf/AppData/Local/MiKTeX/fonts/map/pdftex/pdftex.map}] -(Defi Engine Internal Manual.toc) -\tf@toc=\write5 -\openout5 = `"Defi Engine Internal Manual.toc"'. - - [2 - -] - -File: data-core-framework.png Graphic file (type png) - -Package pdftex.def Info: data-core-framework.png used on input line 35. -(pdftex.def) Requested size: 493.46739pt x 256.70842pt. - -Overfull \hbox (23.71237pt too wide) in paragraph at lines 35--36 - [] - [] - - -Underfull \hbox (badness 10000) in paragraph at lines 43--44 - - [] - -[3 - - <./data-core-framework.png>] -Underfull \hbox (badness 10000) in paragraph at lines 111--112 - - [] - - -Overfull \hbox (11.48906pt too wide) in paragraph at lines 114--145 - [] - [] - -[4 - -] -Overfull \hbox (7.03629pt too wide) in paragraph at lines 151--189 - [] - [] - -[5] -Overfull \hbox (7.03629pt too wide) in paragraph at lines 196--227 - [] - [] - - -Underfull \hbox (badness 10000) in paragraph at lines 278--278 -[]\OT1/cmr/m/n/10 createPacket(String, String, - [] - - -Underfull \hbox (badness 1199) in paragraph at lines 282--283 -[]\OT1/cmr/m/n/10 Sends Packet to con-nected Router ob-ject - [] - - -Underfull \hbox (badness 1603) in paragraph at lines 284--285 -\OT1/cmr/m/n/10 method de-fined in con-struc-tor. Re-turns - [] - -[6 - -] [7] -Overfull \hbox (7.03629pt too wide) in paragraph at lines 328--352 - [] - [] - -[8 - -] [9] -Underfull \hbox (badness 10000) in paragraph at lines 398--398 -[]\OT1/cmr/m/n/10 StreamRegistry- - [] - - -Overfull \hbox (5.93922pt too wide) in paragraph at lines 398--398 -[]\OT1/cmr/m/n/10 StreamRegistryController()| - [] - - -Underfull \hbox (badness 10000) in paragraph at lines 398--399 -[]\OT1/cmr/m/n/10 Initializes the Stream-Reg-istryCon- - [] - - -Underfull \hbox (badness 1292) in paragraph at lines 401--402 -[]\OT1/cmr/m/n/10 Returns whether a Stream con-tains - [] - - -Overfull \hbox (7.03629pt too wide) in paragraph at lines 389--409 - [] - [] - -[10 - -] -Underfull \hbox (badness 10000) in paragraph at lines 447--447 -[]\OT1/cmr/m/n/10 ExternalStream- - [] - - -Underfull \hbox (badness 10000) in paragraph at lines 450--450 -[]\OT1/cmr/m/n/10 ABSTRACT Ex- - [] - - -Underfull \hbox (badness 10000) in paragraph at lines 454--454 -[]\OT1/cmr/m/n/10 abstract au-tho- - [] - - -Overfull \hbox (7.03629pt too wide) in paragraph at lines 441--461 - [] - [] - -[11 - -] [12 - -] -Underfull \hbox (badness 2035) in paragraph at lines 521--522 -[]\OT1/cmr/m/n/10 Process ex-e-cu-tion packet and open - [] - - -Overfull \hbox (31.03625pt too wide) in paragraph at lines 505--528 - [] - [] - -[13 - -] -Overfull \hbox (31.03625pt too wide) in paragraph at lines 537--561 - [] - [] - -[14 - -] (Defi Engine Internal Manual.aux) -Package rerunfilecheck Info: File `"Defi Engine Internal Manual".out' has not c -hanged. -(rerunfilecheck) Checksum: 1BF3CEF5D7D572809C7B66E24E2CBE73;2823. - ) -Here is how much of TeX's memory you used: - 20592 strings out of 478582 - 387952 string characters out of 2844344 - 671831 words of memory out of 3000000 - 38390 multiletter control sequences out of 15000+600000 - 477122 words of font info for 59 fonts, out of 8000000 for 9000 - 1141 hyphenation exceptions out of 8191 - 100i,9n,104p,543b,386s stack positions out of 10000i,1000n,20000p,200000b,80000s - -Output written on "Defi Engine Internal Manual.pdf" (14 pages, 211933 bytes). -PDF statistics: - 219 PDF objects out of 1000 (max. 8388607) - 37 named destinations out of 1000 (max. 500000) - 186 words of extra memory for PDF output out of 10000 (max. 10000000) - diff --git a/DeFi-Data-Engine/Documentation/Engine-Overview/Defi Engine Internal Manual.out b/DeFi-Data-Engine/Documentation/Engine-Overview/Defi Engine Internal Manual.out deleted file mode 100644 index 6abe4be5..00000000 --- a/DeFi-Data-Engine/Documentation/Engine-Overview/Defi Engine Internal Manual.out +++ /dev/null @@ -1,21 +0,0 @@ -\BOOKMARK [1][-]{section.1}{\376\377\000A\000b\000s\000t\000r\000a\000c\000t}{}% 1 -\BOOKMARK [1][-]{section.2}{\376\377\000S\000t\000a\000c\000k}{}% 2 -\BOOKMARK [2][-]{subsection.2.1}{\376\377\000J\000a\000v\000a}{section.2}% 3 -\BOOKMARK [2][-]{subsection.2.2}{\376\377\000C\000a\000p\000'\000n\000\040\000P\000r\000o\000t\000o}{section.2}% 4 -\BOOKMARK [1][-]{section.3}{\376\377\000D\000a\000t\000a\000\040\000C\000o\000r\000e}{}% 5 -\BOOKMARK [2][-]{subsection.3.1}{\376\377\000O\000v\000e\000r\000v\000i\000e\000w}{section.3}% 6 -\BOOKMARK [2][-]{subsection.3.2}{\376\377\000P\000a\000c\000k\000e\000t\000s}{section.3}% 7 -\BOOKMARK [2][-]{subsection.3.3}{\376\377\000C\000o\000n\000t\000r\000o\000l\000l\000e\000r\000\040\000C\000o\000n\000n\000e\000c\000t\000i\000o\000n}{section.3}% 8 -\BOOKMARK [3][-]{subsubsection.3.3.1}{\376\377\000M\000a\000n\000a\000g\000e\000m\000e\000n\000t}{subsection.3.3}% 9 -\BOOKMARK [3][-]{subsubsection.3.3.2}{\376\377\000R\000e\000q\000u\000e\000s\000t\000\040\000F\000o\000r\000m\000a\000t\000t\000i\000n\000g}{subsection.3.3}% 10 -\BOOKMARK [3][-]{subsubsection.3.3.3}{\376\377\000R\000e\000s\000p\000o\000n\000s\000e\000\040\000F\000o\000r\000m\000a\000t\000t\000i\000n\000g}{subsection.3.3}% 11 -\BOOKMARK [2][-]{subsection.3.4}{\376\377\000P\000r\000o\000c\000e\000s\000s\000e\000s}{section.3}% 12 -\BOOKMARK [3][-]{subsubsection.3.4.1}{\376\377\000R\000o\000u\000t\000e\000r\000\040\000S\000u\000p\000e\000r\000c\000l\000a\000s\000s}{subsection.3.4}% 13 -\BOOKMARK [3][-]{subsubsection.3.4.2}{\376\377\000C\000o\000r\000e}{subsection.3.4}% 14 -\BOOKMARK [3][-]{subsubsection.3.4.3}{\376\377\000S\000t\000r\000e\000a\000m\000\040\000M\000a\000n\000a\000g\000e\000r}{subsection.3.4}% 15 -\BOOKMARK [3][-]{subsubsection.3.4.4}{\376\377\000E\000x\000t\000e\000r\000n\000a\000l\000\040\000S\000t\000r\000e\000a\000m\000\040\000H\000a\000n\000d\000l\000e\000r}{subsection.3.4}% 16 -\BOOKMARK [3][-]{subsubsection.3.4.5}{\376\377\000H\000i\000s\000t\000o\000r\000i\000c\000a\000l\000\040\000S\000t\000r\000e\000a\000m\000\040\000H\000a\000n\000d\000l\000e\000r}{subsection.3.4}% 17 -\BOOKMARK [2][-]{subsection.3.5}{\376\377\000I\000n\000t\000e\000r\000n\000a\000l\000\040\000L\000a\000n\000g\000u\000a\000g\000e}{section.3}% 18 -\BOOKMARK [3][-]{subsubsection.3.5.1}{\376\377\000M\000a\000n\000a\000g\000e\000m\000e\000n\000t\000\040\000P\000r\000o\000c\000e\000s\000s\000e\000s}{subsection.3.5}% 19 -\BOOKMARK [3][-]{subsubsection.3.5.2}{\376\377\000E\000x\000t\000e\000r\000n\000a\000l\000\040\000S\000t\000r\000e\000a\000m\000\040\000R\000e\000q\000u\000e\000s\000t\000s}{subsection.3.5}% 20 -\BOOKMARK [3][-]{subsubsection.3.5.3}{\376\377\000H\000i\000s\000t\000o\000r\000i\000c\000a\000l\000\040\000S\000t\000r\000e\000a\000m\000\040\000R\000e\000q\000u\000e\000s\000t\000s}{subsection.3.5}% 21 diff --git a/DeFi-Data-Engine/Documentation/Engine-Overview/Defi Engine Internal Manual.pdf b/DeFi-Data-Engine/Documentation/Engine-Overview/Defi Engine Internal Manual.pdf deleted file mode 100644 index a99d6e31..00000000 Binary files a/DeFi-Data-Engine/Documentation/Engine-Overview/Defi Engine Internal Manual.pdf and /dev/null differ diff --git a/DeFi-Data-Engine/Documentation/Engine-Overview/Defi Engine Internal Manual.synctex.gz b/DeFi-Data-Engine/Documentation/Engine-Overview/Defi Engine Internal Manual.synctex.gz deleted file mode 100644 index 605ded10..00000000 Binary files a/DeFi-Data-Engine/Documentation/Engine-Overview/Defi Engine Internal Manual.synctex.gz and /dev/null differ diff --git a/DeFi-Data-Engine/Documentation/Engine-Overview/Defi Engine Internal Manual.tex b/DeFi-Data-Engine/Documentation/Engine-Overview/Defi Engine Internal Manual.tex deleted file mode 100644 index 968834ac..00000000 --- a/DeFi-Data-Engine/Documentation/Engine-Overview/Defi Engine Internal Manual.tex +++ /dev/null @@ -1,564 +0,0 @@ -\documentclass{article} -\usepackage[utf8]{inputenc} -\usepackage{amssymb,amsfonts,amsthm} -\usepackage{amsmath} -\usepackage{tikz} -\usepackage{framed} -\usepackage{multirow} -\usepackage[left=1in,right=1in,bottom=1in,top=1in]{geometry} -\usepackage{color} -\usepackage{hyperref} -\usepackage{titling} -\usepackage{graphicx} -\renewcommand\maketitlehooka{\null\mbox{}\vfill} -\renewcommand\maketitlehookd{\vfill\null} - -\title{DeFi Data Engine Internal Manual} -\author{Conor Flynn} -\date{06/23/2022} - -\begin{document} - -% Title page -\maketitle -\cleardoublepage - -% table of contents page -\tableofcontents - - -\cleardoublepage -\section{Abstract} -The DeFi Data Engine is an engine which serves as a gateway between data brokers and user interfaced applications. The engine is built to service data requests, historical data caching, and data distribution protocols all within a low latency, high frequency environment. This engine specifically caters to financial data, pertaining to asset prices, liquidity data, and exchange volume. Below is a high level model of the engine which will be expanded upon in Section 3 of this manual. - -\begin{center} -\includegraphics[scale=0.5]{data-core-framework} -\end{center} - -%\cleardoublepage -\section{Stack} -This section describes the stack going to be used for this engine. Please make sure all pre-requisites are completed before attempting to use this engine in any capacity. - -\subsection{Java} -Java SE 17 will be used for the development of the DeFi Data Engine. External libraries will be included in the build of the application and will be documented upon completion. All files will contain Java Docs as well for further development.\\ - -\underline{Prerequisites} - -\begin{framed} -Java JDK 17 Downloaded and Installed: - --\;\href{https://www.oracle.com/java/technologies/downloads/#jdk17-windows}{https://www.oracle.com/java/technologies/downloads/\#jdk17\-windows} -\end{framed} - -\subsection{Cap'n Proto} -Cap'n Proto is a data exchange format based on the RPC Protocol. It will be used for communication between the R Shiny application, DeFi Data Engine, and the Controller. The application was designed in C++ and therefore requires a development environment built to handle C++. Note this is ONLY required for development purposes and NOT required for use. - - -\cleardoublepage -\section{Data Core} -This section describes the data core of the engine, including an overview, component analysis, internal language, and internal connections. - -\subsection{Overview} -The data core is a multi-threaded engine built for the handling of historical and live data streams. It will be able to accept requests through it's outside port and parse the specific requests to push data to the proper locations. - -Historical data will be stored within a database contained within the engine, and will be cached automatically via the live operating stream. Outside components can then request specific data from a historical time frame and the engine will automatically open a connection to the data base to feed in that stream. - -Live data also can be requested through the engine, through a similar requesting process. Once requested, the data core will request authentication from the outside source to open the data stream. After authenticated successfully, a channel will be opened where all requested data will flow through. - -All internal and external processes relating to the data core are documented below. - -\subsection{Packets} -All external communication will use Cap'n Proto for the requesting and receiving of internal processes. To maintain consistency throughout calls only one object type will be accepted for these requests, called Packets. Packets will contain the format listed below, with the contents required of each section listed based on the needs of the engine. - -\begin{center} -\begin{tabular}{ | p{3cm} || p{3cm} | p{9cm} | } -\hline -\multicolumn{3}{|c|}{Packet Formatting}\\ -\hline -Name & Type & Description\\ -\hline -Time & Long & NS Epoch time-stamp of packet when sent.\\ -Destination & String & Packet destination.\\ -Sender & String & Sender of the packet.\\ -Tag & String & Request type of packet.\\ -Sub-Tag & String & Additional Tag information. (optional)\\ -Data & String & Data contained in packet.\\ -\hline -\end{tabular} -\end{center} - -\subsection{Controller Connection} -The controller is an external application that is used to monitor the engine's internal processes. It is connected via Cap'n Proto and allows for multiple requests and checks detailed below. Note these requests can also be made by other external applications however it is recommended against as it could hinder the speed of the engine. - -Listed below are details relating to the identification of the Controller. - -\begin{center} -\begin{tabular}{ | p{5cm} || p{4cm} | p{6cm} | } -\hline -\multicolumn{3}{|c|}{Controller Process Variables}\\ -\hline -Name & Value & Description\\ -\hline -UUID & controller\_process & Unique identifying name of the process.\\ -\hline -Tag & CRL & Unique tag of the Controller process.\\ -\hline -\end{tabular} -\end{center} - -\subsubsection{Management} - -The controller (and other external processes) will have the ability to request the following processes listed below. Processes refer to components within the engine which may require external monitoring for stability purposes. Description gives a short summary of the process being requested. Formatting of these requests will be listed in a later section.\\ - -\begin{center} -\begin{tabular}{ | p{5cm} || p{11cm} | } -\hline -\multicolumn{2}{|c|}{Management Requests}\\ -\hline -Process & Description\\ -\hline -Engine Start & Start engine processes.\\ -\hline -Engine Kill & Force kill all engine processes.\\ -\hline -Engine Active & Determines if the engine is currently active.\\ -\hline -Engine Active Streams & List of all active streams being executed in the engine.\\ -\hline -Log Request & Returns logs for given period if exists.\\ -\hline -Log Stream & Opens stream of logs for processing.\\ -\hline -Stream Exists & Determines if the stream has been requested by an external source at any time and has been stored within the active stream manager.\\ -\hline -Stream Authorized & Checks if stream has been successfully authorized to start live data stream.\\ -\hline -Stream Active & Determines if a stream is currently active. Does not have to be flowing data to return true.\\ -\hline -Stream Last Call & Checks for the last time the stream saw a live data point flow through.\\ -\hline -Historical Exists & Determines if historical data for specific type exists.\\ -\hline -Historical Request & Returns historical data stored if exists.\\ -\hline -\end{tabular} -\end{center} - -\subsubsection{Request Formatting} -This section details all request formatting for calling the managerial processes listed in the prior section. - -\begin{center} -\begin{tabular}{ | p{5cm} || p{2cm} | p{2cm} | p{6cm} | } -\hline -\multicolumn{4}{|c|}{Request Formatting}\\ -\hline -Process & Tag & Sub-Tag & Data\\ -\hline -Engine Start & ENG & STRT & N/A\\ -\hline -Engine Kill & ENG & KILL & N/A\\ -\hline -Engine Active & ENG & ACTV & N/A\\ -\hline -Engine Active Streams & ENG & ACTS & N/A\\ -\hline -Log Request & LOG & RQST & start\_epoch: $<$Long$>$\\ - & & & end\_epoch: $<$Long$>$\\ -\hline -Log Stream & LOG & STRM & TBD\\ -\hline -Stream Exists & STR & EXST & stream\_tag: $<$String$>$\\ -\hline -Stream Authorized & STR & AUTH & stream\_tag: $<$String$>$\\ -\hline -Stream Active & STR & ACTV & stream\_tag: $<$String$>$\\ -\hline -Stream Last Call & STR & LCAL & stream\_tag: $<$String$>$\\ -\hline -Historical Exists & HSH & EXST & start\_epoch: $<$Long$>$\\ - & & & end\_epoch: $<$Long$>$\\ - & & & time\_freq: $<$Long$>$\\ - & & & data\_category: $<$String$>$\\ -\hline -Historical Request & HSH & RQST & start\_epoch: $<$Long$>$\\ - & & & end\_epoch: $<$Long$>$\\ - & & & time\_freq: $<$Long$>$\\ - & & & data\_category: $<$String$>$\\ -\hline -\end{tabular} -\end{center} - -\cleardoublepage -\subsubsection{Response Formatting} -This section details all response formatting for the managerial requests listed in the prior section. - -\begin{center} -\begin{tabular}{ | p{5cm} || p{2cm} | p{2cm} | p{6cm} | } -\hline -\multicolumn{4}{|c|}{Response Formatting}\\ -\hline -Process & Tag & Sub-Tag & Data\\ -\hline -Engine Start & ENG & STRT & response\_code: $<$Long$>$\\ -\hline -Engine Kill & ENG & KILL & response\_code: $<$Long$>$\\ -\hline -Engine Active & ENG & ACTV & is\_active: $<$Boolean$>$\\ -\hline -Engine Active Streams & ENG & ACTS & active\_streams: $<$String[]$>$\\ -\hline -Log Request & LOG & RQST & logs: $<$String[]$>$\\ -\hline -Log Stream & LOG & STRM & TBD\\ -\hline -Stream Exists & STR & EXST & does\_exist: $<$Boolean$>$\\ -\hline -Stream Authorized & STR & AUTH & is\_authorized: $<$Boolean$>$\\ -\hline -Stream Active & STR & ACTV & is\_active: $<$Boolean$>$\\ -\hline -Stream Last Call & STR & LCAL & last\_call: $<$Long$>$\\ -\hline -Historical Exists & HSH & EXST & does\_exist: $<$Boolean$>$\\ -\hline -Historical Request & HSH & RQST & returned\_data $<$String[]$>$\\ -\hline -\end{tabular} -\end{center} - -\subsection{Processes} -This section details all processes contained within the engine including: overview, functionality, and framework design. - -\subsubsection{Router Superclass} -The Router is a super class that every process inherits. It is used to route data in a standardized manner throughout the engine. Each process that inherits the Router super class will be required to supply several types of information including: a UUID, a three-character tag, tags contained within the process, and routing tag information. - -Listed below is information regarding the required information supplied above. - -\begin{center} -\begin{tabular}{ | p{3cm} || p{3cm} | p{9cm} | } -\hline -\multicolumn{3}{|c|}{Router Parameters}\\ -\hline -Name & Type & Description\\ -\hline -UUID & String & Unique identifier of the inheriting process.\\ -\hline -Tag & String & Unique tag of the inheriting process.\\ -\hline -Contained Tags & String[] & All tags that will be processed within the inherited process.\\ -\hline -Routed Tags & String[] & All tags that will be routed to other processes.\\ -\hline -\end{tabular} -\end{center} - -The Router also has several built in functions to handle the sending and receiving of Packet's between the processes. Listed below are all methods defined by the Router that will by used to send and receive packets. Please note that all methods passed in the Map objects must take a Packet as a parameter and return a Boolean. - -\begin{center} -\begin{tabular}{ | p{5cm} || p{3cm} | p{7cm} | } -\hline -\multicolumn{3}{|c|}{Router Methods}\\ -\hline -Method & Return & Description\\ -\hline -Router(String, String, String[], String[]) & void & Base constructor for Router class. Defines all values stored within the Router class. Does not automatically connect any Router objects to self.\\ -\hline -Router(String, String, String[], String[], Router[]) & void & Constructor for Router class. Defines all values stored within the Router class. Automatically connects all Router objects passed as a parameter such that individual function calls are not required.\\ -\hline -getUUID() & String & Returns UUID provided in the constructor.\\ -\hline -getTag() & String & Returns Tag provided in the constructor.\\ -\hline -getContainedTags() & String[] & Returns Contained Tags provided in the constructor.\\ -\hline -getRoutedTags() & String[] & Returns Routed Tags provided in the constructor.\\ -\hline -getRouter(String) & Router & Returns connected Router object based on Tag sent as a parameter.\\ -\hline -createPacket(String, String, String, String) & Packet & Helper function used to create a Packet object based off of the given parameters. Parameters are as follows: (Destination, Tag, Sub-Tag, Data).\\ -\hline -connect(Router) & void & Connects Router object to Router passed as a parameter. Stores all connections and uses them for routing functions.\\ -\hline -send(Packet) & Boolean & Sends Packet to connected Router object stored. Returns whether Packet was successfully sent. Throws error if destination does not exist in Router.\\ -\hline -receive(Packet) & Boolean & Sends Packet to handler method based on method defined in constructor. Returns whether Packet was successfully processed.\\ -\hline -abstract process(Packet) & Boolean & Router subclass function for handling incoming Packet objects.\\ -\hline -\end{tabular} -\end{center} - -\cleardoublepage -\subsubsection{Core} -The Core of the data engine will be the main router for traffic. This includes all incoming Packets from both the Controller as well as outside applications. All data will be subsequently logged and pushed to the proper locations from within the engine. - -There are 3 main connections in and out of the core: the Traffic Handler, the Controller Access Point, and the Stream Manager. - -Connection from the Traffic Handler will contain all incoming and outgoing processes, with all requests and responses documented in the Internal Language section. The Core also utilizes a Router super-class, which is the standard communication process for the engine and will be discussed in the Internal Language section. - -Listed below are details relating to the identification of the Core. - -\begin{center} -\begin{tabular}{ | p{5cm} || p{4cm} | p{6cm} | } -\hline -\multicolumn{3}{|c|}{Core Process Variables}\\ -\hline -Name & Value & Description\\ -\hline -UUID & core\_process & Unique identifying name of process.\\ -\hline -Tag & COR & Unique tag of the Core process.\\ -\hline -Contained Tags & ENG & All main engine controls.\\ -& LOG & Logging functionality of the engine.\\ -\hline -Routed Tags & STR & Routed to Stream Manager.\\ - & SRC & Routed to Stream Manager.\\ - & ESH & Routed to Stream Manager.\\ - & HSH & Routed to Stream Manager.\\ - & OUT & Routed to Traffic Handler.\\ - & CRL & Routed to Controller.\\ -\hline -\end{tabular} -\end{center} - -The Core will have several classes and files that are used to manage traffic and functions contained within it. Listed below are the different classes and their functions. - -\begin{center} -\begin{tabular}{ | p{3cm} || p{4cm} | p{2cm} | p{6cm} | } -\hline -\multicolumn{4}{|c|}{Core Process Class Objects}\\ -\hline -Class & Method & Return & Description\\ -\hline -Core & Core() & void & Initializes the Core and defines all default values. Also initializes Router super class. Defines and initializes Logger, Engine, StreamManager, TrafficHandler, and ControllerHandler.\\ - & process(Packet) & boolean & Processes all incoming COR packets.\\ -\hline -ENUM LogSeverity & INFO & & Used for generic messages.\\ - & WARNING & & Used for process warnings that may have impact on engine stability.\\ - & ERROR & & Used for process errors that have critical impact on engine stability. Engine terminates immediately following an ERROR.\\ -\hline -Logger & Logger(OutputStream) & void & Initializes Logger object with given output stream. Also initializes Router super class.\\ - & process(Packet) & boolean & Processes all LOG packets.\\ - & log(Object) & void & Pushes Object to OutputStream. Uses default LogSeverity of INFO.\\ - & log(LogSeverity, Object) & void & Pushes Object to OutputStream. Uses LogSeverity provided as a parameter.\\ -\hline -Engine & Engine() & void & Initializes the Engine object. Also initializes Router super class.\\ - & process(Packet) & boolean & Processes all ENG packets.\\ - & start() & void & Starts internal clock and process stability manager.\\ - & stop() & void & Stops internal clock and stability manager.\\ -\hline -\end{tabular} -\end{center} - -\cleardoublepage -\subsubsection{Stream Manager} -The Stream Manager is the main processor for all stream requests, stream authorization, and stream handlers. This includes all stream request packets (external and historical), stream authorization packets, data return packets, and data caching packets. - -There are 4 main connections in and out of the Stream Manager: the Core, the External Stream Handler, and the Historical Stream Handler. All request types and data formatting between these connections will be covered in the Internal Language section. - -Listed below are details relating to the identification of the Stream Manager. - -\begin{center} -\begin{tabular}{ | p{5cm} || p{4cm} | p{6cm} | } -\hline -\multicolumn{3}{|c|}{Core Process Variables}\\ -\hline -Name & Value & Description\\ -\hline -UUID & stream\_manager & Unique identifying name of process.\\ -\hline -Tag & STR & Unique tag of the process.\\ -\hline -Contained Tags & SRC & Stream Registry Controller process.\\ -\hline -Routed Tags & ESH & Routed to External Stream Handler.\\ - & HSH & Routed to Historical Stream Handler.\\ - & OUT & Routed to Core.\\ - & CRL & Routed to Core.\\ - & ENG & Routed to Core.\\ - & LOG & Routed to Core.\\ -\hline -\end{tabular} -\end{center} - -The Stream Manager has several classes which control all processes and sub processes within this section of the engine. Listed below are the different classes and their functions. - -\begin{flushleft} -\begin{center} -\begin{tabular}{ | p{3cm} || p{4cm} | p{2cm} | p{6cm} | } -\hline -\multicolumn{4}{|c|}{Stream Manager Process Class Objects}\\ -\hline -Class & Method & Return & Description\\ -\hline -StreamManager & StreamManager() & void & Initializes the StreamManager object and defines all of the necessary channels. Also initializes the Router super class. Defines and initializes ExternalStreamHandler, HistoricalStreamHandler, and StreamRegistryController.\\ - & process(Packet) & boolean & Processes all STR packets.\\ -\hline -StreamRegistry-Controller & StreamRegistryController() & void & Initializes the StreamRegistryController object and the Router super class.\\ - & process(Packet) & boolean & Processes all SRC packets.\\ - & exists(String) & boolean & Returns whether a Stream with given tag exists in the registry.\\ - & authorized(String) & boolean & Returns whether a Stream contains the proper authorization credentials to start.\\ - & active(String) & boolean & Returns whether a Stream with the given tag is active.\\ - & execute(Packet) & boolean & Executes a Stream based off of the passed information. Validates all required information prior to execution.\\ - & register(Packet) & void & Registers a stream into the registry to track activity.\\ - & update(Packet) & void & Updates the status of a stream based on transferred packet.\\ -\hline - -\end{tabular} -\end{center} -\end{flushleft} - -\cleardoublepage -\subsubsection{External Stream Handler} -The External Stream Handler is the main hub for all integrated data sources. Here, requests are processed and sent to the requested sources and then data streams are opened and sent to the outside sources. Requests must first be processed and authorized in the Stream Registry Controller before being sent. - -Listed below are details relating to the identification of the Stream Manager. - -\begin{center} -\begin{tabular}{ | p{5cm} || p{4cm} | p{6cm} | } -\hline -\multicolumn{3}{|c|}{External Stream Handler Process Variables}\\ -\hline -Name & Value & Description\\ -\hline -UUID & external\_stream\_manager & Unique identifying name of process.\\ -\hline -Tag & ESH & Unique tag of the process.\\ -\hline -Contained Tags & & \\ -\hline -Routed Tags & SRC & Routed to Stream Registry Controller.\\ - & OUT & Routed to Traffic Handler.\\ -\hline -\end{tabular} -\end{center} - -The External Stream Manager has several classes which control all processes and sub processes within this section of the engine. There is also an abstract class which all outside sources are required to implement and handle should they want to be recognized by the engine. - -\begin{flushleft} -\begin{center} -\begin{tabular}{ | p{3cm} || p{4cm} | p{2cm} | p{6cm} | } -\hline -\multicolumn{4}{|c|}{Stream Manager Process Class Objects}\\ -\hline -Class & Method & Return & Description\\ -\hline -ExternalStream- Handler & ExternalStreamHandler() & void & Initializes the ExternalStreamHandler object and defines all necessary channels. Also initializes the Router super class. Uses Reflections library to recognize all outside data sources compatible with the engine as to not require manual integration.\\ - & process(Packet) & boolean & Processes all ESH packets and sends requests to appropriate outside sources.\\ -\hline -ABSTRACT ExternalConnection & ExternalConnection() & void & Initializes the outside connection class, defining all necessary variables.\\ - & final const SOURCE & String & Required unique source id of the outside source. Used by engine to identify external connection.\\ - & getSource() & String & Returns unique source id.\\ - & process(Packet) & boolean & Function used to process data packets sent by ESH.\\ - & abstract authorize(Packet) & boolean & Used to authorize connection.\\ - & abstract isAuthorized() & boolean & Used to confirm authorization.\\ - & abstract valid(Packet) & boolean & Used to confirm that request is valid to send.\\ - & abstract request(Packet) & boolean & Sends request for data to connection.\\ -\hline - -\end{tabular} -\end{center} -\end{flushleft} - -\cleardoublepage -\subsubsection{Historical Stream Handler} -The Historical Stream Handler is the main hub for all historically cached data. Outside sources can make requests for cached data to then use for various processes. Externally sourced data is also cached here real time to reduce latency when requesting historical data. All requests are first validated through the Stream Registry Controller before being submitted. - -Listed below are details relating to the identification of the Historical Stream Manager. - -\begin{center} -\begin{tabular}{ | p{5cm} || p{4cm} | p{6cm} | } -\hline -\multicolumn{3}{|c|}{Historical Stream Handler Process Variables}\\ -\hline -Name & Value & Description\\ -\hline -UUID & historical\_stream\_manager & Unique identifying name of process.\\ -\hline -Tag & HSH & Unique tag of the process.\\ -\hline -Contained Tags & & \\ -\hline -Routed Tags & SRC & Routed to Stream Registry Controller.\\ - & OUT & Routed to Traffic Handler.\\ -\hline -\end{tabular} -\end{center} - -\textbf{Functions within the Historical Stream Handler are TBH due to the current design being undecided.} - -\cleardoublepage -\subsection{Internal Language} -The Internal Language section will discuss how managerial processes are executed, how to request streams from within the application, and how to manage data outflow. - -\subsubsection{Management Processes} -Please reference section 3.3.1 for all Management Process requests. This section will most likely be expanded in later versions. - -\subsubsection{External Stream Requests} -External Stream Requests are requests made the External Stream Handler to subscribe to a live data feed. Each of these requests is first processed through the Stream Registry Control before being sent to the External Stream Handler. - -The general flow of the an External Stream Request is listed as follows. - -\begin{flushleft} -\begin{center} -\begin{tabular}{ | p{1cm} || p{2cm} | p{2cm} | p{2cm} | p{2cm} | p{6cm} | } -\hline -\multicolumn{6}{|c|}{External Stream Request Path}\\ -\hline -Step & Sender & Responder & Tag & Sub-Tag & Description\\ -1. & OUT & COR & SRC & EXEC & Transit from OUT to COR.\\ -2. & COR & STR & SRC & EXEC & Transit from COR to STR.\\ -3. & STR & SRC & SRC & EXEC & Transit from STR to SRC.\\ -4. & SRC & - & SRC & EXEC & Process request and send authorization to ESH.\\ -5. & SRC & STR & ESH & AUTH & Transit from SRC to STR.\\ -6. & STR & ESH & ESH & AUTH & Transit from STR to ESH.\\ -7. & ESH & - & ESH & AUTH & Authorize stream and reply with response code to SRC.\\ -8. & SRC & - & - & - & Process response code from ESH.\\ -9a. & SRC & OUT & - & - & If invalid response from ESH, return response code to OUT.\\ -9b. & SRC & STR & ESH & EXEC & If valid response from ESH, send execution packet to ESH. Transit from STR to SRC.\\ -10. & STR & ESH & ESH & EXEC & Transit from STR to ESH.\\ -11. & ESH & - & ESH & EXEC & Process execution packet and open stream on provided channel.\\ -12. & ESH & STR & OUT & EDAT & Data packet from ESH to OUT. Transit from ESH to STR.\\ -13. & STR & COR & OUT & EDAT & Transit from STR to COR.\\ -14. & COR & OUT & OUT & EDAT & Transit from COR to OUT.\\ -15. & OUT & - & OUT & EDAT & Submit data packet to outside source.\\ -\hline -\end{tabular} -\end{center} -\end{flushleft} - - -\cleardoublepage -\subsubsection{Historical Stream Requests} - -\begin{flushleft} -\begin{center} -\begin{tabular}{ | p{1cm} || p{2cm} | p{2cm} | p{2cm} | p{2cm} | p{6cm} | } -\hline -\multicolumn{6}{|c|}{External Stream Request Path}\\ -\hline -Step & Sender & Responder & Tag & Sub-Tag & Description\\ -1. & OUT & COR & SRC & HRQS & Transit from OUT to COR.\\ -2. & COR & STR & SRC & HRQS & Transit from COR to STR.\\ -3. & STR & SRC & SRC & HRQS & Transit from STR to SRC.\\ -4. & SRC & - & SRC & HRQS & Process request and send validation request to HSH.\\ -5. & SRC & STR & HSH & EXDT & Send request to see if data exists in database. Transit from SRC to STR.\\ -6. & STR & HSH & HSH & EXDT & Transit from STR to HSH.\\ -7. & HSH & - & HSH & EXDT & Validate data exists and send response code to SRC.\\ -8. & SRC & - & - & - & Process response code from HSH.\\ -9a. & SRC & OUT & - & - & If invalid response from HSH, return response code to OUT.\\ -9b. & SRC & STR & HSH & HRQS & If valid response from HSH, send data request to HSH. Transit from SRC to STR.\\ -10. & STR & HSH & HSH & HRQS & Transit from STR to HSH.\\ -11. & HSH & - & HSH & HRQS & Process request packet and send data to OUT on provided channel.\\ -12. & HSH & STR & OUT & HDAT & Data packet from HSH to OUT. Transit from HSH to STR.\\ -13. & STR & COR & OUT & HDAT & Transit from STR to COR.\\ -14. & COR & OUT & OUT & HDAT & Transit from COR to OUT.\\ -15. & OUT & - & OUT & HDAT & Submit data packet to outside source.\\ - -\hline -\end{tabular} -\end{center} -\end{flushleft} - -\end{document} \ No newline at end of file diff --git a/DeFi-Data-Engine/Documentation/Engine-Overview/Defi Engine Internal Manual.toc b/DeFi-Data-Engine/Documentation/Engine-Overview/Defi Engine Internal Manual.toc deleted file mode 100644 index 5c69f286..00000000 --- a/DeFi-Data-Engine/Documentation/Engine-Overview/Defi Engine Internal Manual.toc +++ /dev/null @@ -1,21 +0,0 @@ -\contentsline {section}{\numberline {1}Abstract}{3}{section.1}% -\contentsline {section}{\numberline {2}Stack}{3}{section.2}% -\contentsline {subsection}{\numberline {2.1}Java}{3}{subsection.2.1}% -\contentsline {subsection}{\numberline {2.2}Cap'n Proto}{3}{subsection.2.2}% -\contentsline {section}{\numberline {3}Data Core}{4}{section.3}% -\contentsline {subsection}{\numberline {3.1}Overview}{4}{subsection.3.1}% -\contentsline {subsection}{\numberline {3.2}Packets}{4}{subsection.3.2}% -\contentsline {subsection}{\numberline {3.3}Controller Connection}{4}{subsection.3.3}% -\contentsline {subsubsection}{\numberline {3.3.1}Management}{4}{subsubsection.3.3.1}% -\contentsline {subsubsection}{\numberline {3.3.2}Request Formatting}{5}{subsubsection.3.3.2}% -\contentsline {subsubsection}{\numberline {3.3.3}Response Formatting}{6}{subsubsection.3.3.3}% -\contentsline {subsection}{\numberline {3.4}Processes}{6}{subsection.3.4}% -\contentsline {subsubsection}{\numberline {3.4.1}Router Superclass}{6}{subsubsection.3.4.1}% -\contentsline {subsubsection}{\numberline {3.4.2}Core}{8}{subsubsection.3.4.2}% -\contentsline {subsubsection}{\numberline {3.4.3}Stream Manager}{10}{subsubsection.3.4.3}% -\contentsline {subsubsection}{\numberline {3.4.4}External Stream Handler}{11}{subsubsection.3.4.4}% -\contentsline {subsubsection}{\numberline {3.4.5}Historical Stream Handler}{12}{subsubsection.3.4.5}% -\contentsline {subsection}{\numberline {3.5}Internal Language}{13}{subsection.3.5}% -\contentsline {subsubsection}{\numberline {3.5.1}Management Processes}{13}{subsubsection.3.5.1}% -\contentsline {subsubsection}{\numberline {3.5.2}External Stream Requests}{13}{subsubsection.3.5.2}% -\contentsline {subsubsection}{\numberline {3.5.3}Historical Stream Requests}{14}{subsubsection.3.5.3}% diff --git a/DeFi-Data-Engine/Documentation/Engine-Overview/data-core-framework.png b/DeFi-Data-Engine/Documentation/Engine-Overview/data-core-framework.png deleted file mode 100644 index 335242ff..00000000 Binary files a/DeFi-Data-Engine/Documentation/Engine-Overview/data-core-framework.png and /dev/null differ diff --git a/DeFi-Data-Engine/Documentation/Engine-Overview/~$Packet Spreadsheet.xlsx b/DeFi-Data-Engine/Documentation/Engine-Overview/~$Packet Spreadsheet.xlsx deleted file mode 100644 index 11bacf81..00000000 Binary files a/DeFi-Data-Engine/Documentation/Engine-Overview/~$Packet Spreadsheet.xlsx and /dev/null differ diff --git a/DeFi-Data-Engine/Documentation/Internal-Documentation/Documentation.xlsx b/DeFi-Data-Engine/Documentation/Internal-Documentation/Documentation.xlsx deleted file mode 100644 index a5b44e77..00000000 Binary files a/DeFi-Data-Engine/Documentation/Internal-Documentation/Documentation.xlsx and /dev/null differ diff --git a/DeFi-Data-Engine/Documentation/Internal-Documentation/~$Documentation.xlsx b/DeFi-Data-Engine/Documentation/Internal-Documentation/~$Documentation.xlsx deleted file mode 100644 index 11bacf81..00000000 Binary files a/DeFi-Data-Engine/Documentation/Internal-Documentation/~$Documentation.xlsx and /dev/null differ diff --git a/DeFi-Data-Engine/Rest Application/.gitignore b/DeFi-Data-Engine/Rest Application/.gitignore deleted file mode 100644 index ae3c1726..00000000 --- a/DeFi-Data-Engine/Rest Application/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/DeFi-Data-Engine/Rest Application/.project b/DeFi-Data-Engine/Rest Application/.project deleted file mode 100644 index 10c2ba0f..00000000 --- a/DeFi-Data-Engine/Rest Application/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - Rest Application - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - - diff --git a/DeFi-Data-Engine/docker-compose.yml b/DeFi-Data-Engine/docker-compose.yml deleted file mode 100644 index 6b5a47b7..00000000 --- a/DeFi-Data-Engine/docker-compose.yml +++ /dev/null @@ -1,33 +0,0 @@ -version: "3.9" -services: - mongodb_container: - image: mongo:latest - ports: - - 27017:27017 - volumes: - - mongodb_data_container:/data/db - hostname: MONGO - dataengine: - build: - context: "DeFi Data Engine" - image: dataincite/defi-data-engine:latest - depends_on: - - mongodb_container - ports: - - 61100:61100 - - 61200:61200 - hostname: DataEngine - # restapp: - # build: - # context: "Rest Application" - # image: dataincite/data-engine-rest-app:latest - # depends_on: - # - dataengine - # ports: - # - 8080:8080 - # hostname: RestApp - - - -volumes: - mongodb_data_container: diff --git a/R-Code-Samples/.Rhistory b/R-Code-Samples/.Rhistory deleted file mode 100644 index e69de29b..00000000 diff --git a/R-Code-Samples/DataEnginePrimaryFunctions.Rmd b/R-Code-Samples/DataEnginePrimaryFunctions.Rmd deleted file mode 100644 index 556a4219..00000000 --- a/R-Code-Samples/DataEnginePrimaryFunctions.Rmd +++ /dev/null @@ -1,154 +0,0 @@ ---- -title: "Data Engine Primary Request Function" -subtitle: "request function definition" -author: "Conor Flynn" -date: "04/18/2023" -output: - pdf_document: default - html_document: - toc: true - number_sections: true - df_print: paged ---- -# Start by loading the proper libraries: -```{r setup, include=FALSE} -library(knitr) -library(plyr) -library(dplyr) -library(jsonlite) -library(stringr) -library(tidyr) -``` - -## Define request function: - -# DESCRIPTION: -# This function serves as the primary request point for making internal requests to the defi data engine. Note that should a request be -# made outside the function, please ensure the necessary format depicted within it is used otherwise an internal error may occur. -# Note that you MUST be connected to the RPI network (such that a connection can be made to defi-de.idea.rpi.edu) otherwise this -# function will not work. - -# INPUT: -# - protocol: The name of the protocol to receive data from. -# [optional] - properties: All properties used in the call (note typically REST API URL parameters). -# [optional] - headers: All headers used in the call (note typically REST API URL headers). -# [optional] - startdate: Starting date to retrieve data from. In format 'yyyy-MM-dd' i.e. 2023-04-01 -# [optional] - enddate: Ending date to retrieve data from (non-inclusive). In format 'yyyy-MM-dd' i.e. 2023-04-01 - -# OUTPUT: -# list containing two elements: -# - $response: Contains all response information as listed below: -# - $response: Value denoting status of call TO the engine. Code 200 denotes connection was received by engine properly. -# - $code: Code returned by engine based on internal schema. Full list of codes can be found here -# (https://github.rpi.edu/DataINCITE/IDEA-DeFi-CRAFT/wiki/Response-Codes) -# - $message: Message response accompanying code should the response be irregular. -# - $data: Data returned by call should any be requested. -# - $df: Data frame containing all data parsed from the call. -```{r} -request <- function(protocol, properties = "", headers = "", startdate = "", enddate = "") { - suppressWarnings({ - #Create socket and get destination which tells the engine where to put the data - socket <- socketConnection("defi-de.idea.rpi.edu", 61200, blocking=TRUE) - destination <- readLines(socket, 1) - - formatted_properties = "" - if(properties != "") - formatted_properties = paste("properties", "&&&", properties, "&&&") - - formatted_headers = "" - if(headers != "") - formatted_headers = paste("headers", "&&&", headers, "&&&") - - formatted_startdate = "" - formatted_enddate = "" - if(startdate != "" && enddate != "") { - formatted_startdate = paste("start_date", "&&&", startdate, "&&&") - formatted_enddate = paste("end_date", "&&&", enddate, "&&&") - } - - #Build the request delimited by &&& - #Similar to a GET request in the way we handle parameters - request.raw <- paste( - "SRC", "&&&", "RQST", "&&&", - "type", "&&&", protocol, "&&&", - formatted_properties, - formatted_headers, - formatted_startdate, - formatted_enddate, - "destination", "&&&", destination, "&&&", - "\n", sep="") - - # remove all spaces from request - request.data <- str_replace_all(request.raw, " ", "") - - #Write this request back to the socket to tell engine what we want - writeLines(request.data, socket) - - # define a list which will store the individual rows - rows = list() - - #Now the engine will begin feeding us data - #We grab the first to initialize the data var and then we continue listening\ - counter <- 0 - response <- "" - while (TRUE) { - temp <- readLines(socket, 1) - - if(temp == '') - { - print("Read empty string. Check engine logs or refresh configuration.") - next - } - - # if line is heartbeat then acknowledge and continue - if (grepl("<<>>", temp, fixed=TRUE)) - { - print(paste0("Heartbeat read for ", protocol)) - next - } - - # if line is response then process and terminate - else if (grepl("<<>>", temp, fixed=TRUE)) - { - temp <- readLines(socket, 1) - while(grepl("<<>>", temp, fixed=TRUE)) { - temp <- readLines(socket, 1) - } - response <- fromJSON(temp) - break - } - - # increment processed line counter - counter <- counter + 1 - if(counter %% 1000 == 0){ - print(paste0("Processed ", counter, " lines for ", protocol)) - } - - # add data point line to data frame - tryCatch(expr={ - rows[[counter]] = data.frame(fromJSON(temp)) - }, - error=function(e){ - message("Heartbeat exception caught and not parsed.") - }) - } - - output <- list("response"=response, "df"=do.call(rbind.fill, rows)) - close(socket) - return(output) - }) -} -``` - -## Sample function call to the protocol graph-aave-borrows -```{r} -startdate <- "2022-01-01" -enddate <- "2022-01-04" - -# submit a request -graph.borrows <- request("graph-aave-borrows", "", "", startdate, enddate) -# for each request validate the code was successful -# if not the return the response with an empty dataframe -if(graph.borrows$response$code != 200) - return(graph.borrows) -``` \ No newline at end of file diff --git a/R-Code-Samples/ExampleUserClusteringStarter.Rmd b/R-Code-Samples/ExampleUserClusteringStarter.Rmd deleted file mode 100644 index d6993420..00000000 --- a/R-Code-Samples/ExampleUserClusteringStarter.Rmd +++ /dev/null @@ -1,450 +0,0 @@ ---- -title: 'User Clustering Start Example' -author: "Your Name Here" -subtitle: "Making Users from Transaction Data and Clustering" -output: - pdf_document: default - html_document: default - header-includes: \usepackage{color} - toc: yes ---- - -```{r setup, include=FALSE, warning=FALSE} -library(ggplot2) -library(knitr) -library(plyr) -library(dplyr) -library(jsonlite) -library(RColorBrewer) -library(tidyverse) -library(beeswarm) -library(ggbeeswarm) -library(xts) -library(plotly) -library(lubridate) -library(survival) -library(survminer) -library(ranger) -library(ggfortify) -library(factoextra) -library(cluster) -library(fclust) -library(ppclust) -library(e1071) -library(randomNames) -``` - -## Define request function: - -# NOTE: -# This function is officially defined in DataEnginePrimaryFunctions.Rmd and does not need to be redefined -# for every use-case. Here it is defined for and because there is a request made. - -# DESCRIPTION: -# This function serves as the primary request point for making internal requests to the defi data engine. Note that should a request be -# made outside the function, please ensure the necessary format depicted within it is used otherwise an internal error may occur. -# Note that you MUST be connected to the RPI network (such that a connection can be made to defi-de.idea.rpi.edu) otherwise this -# function will not work. - -# INPUT: -# - protocol: The name of the protocol to receive data from. -# [optional] - properties: All properties used in the call (note typically REST API URL parameters). -# [optional] - headers: All headers used in the call (note typically REST API URL headers). -# [optional] - startdate: Starting date to retrieve data from. In format 'yyyy-MM-dd' i.e. 2023-04-01 -# [optional] - enddate: Ending date to retrieve data from (non-inclusive). In format 'yyyy-MM-dd' i.e. 2023-04-01 - -# OUTPUT: -# list containing two elements: -# - $response: Contains all response information as listed below: -# - $response: Value denoting status of call TO the engine. Code 200 denotes connection was received by engine properly. -# - $code: Code returned by engine based on internal schema. Full list of codes can be found here -# (https://github.rpi.edu/DataINCITE/IDEA-DeFi-CRAFT/wiki/Response-Codes) -# - $message: Message response accompanying code should the response be irregular. -# - $data: Data returned by call should any be requested. -# - $df: Data frame containing all data parsed from the call. -```{r} -request <- function(protocol, properties = "", headers = "", startdate = "", enddate = "") { - suppressWarnings({ - #Create socket and get destination which tells the engine where to put the data - socket <- socketConnection("defi-de.idea.rpi.edu", 61200, blocking=TRUE) - destination <- readLines(socket, 1) - - formatted_properties = "" - if(properties != "") - formatted_properties = paste("properties", "&&&", properties, "&&&") - - formatted_headers = "" - if(headers != "") - formatted_headers = paste("headers", "&&&", headers, "&&&") - - formatted_startdate = "" - formatted_enddate = "" - if(startdate != "" && enddate != "") { - formatted_startdate = paste("start_date", "&&&", startdate, "&&&") - formatted_enddate = paste("end_date", "&&&", enddate, "&&&") - } - - #Build the request delimited by &&& - #Similar to a GET request in the way we handle parameters - request.raw <- paste( - "SRC", "&&&", "RQST", "&&&", - "type", "&&&", protocol, "&&&", - formatted_properties, - formatted_headers, - formatted_startdate, - formatted_enddate, - "destination", "&&&", destination, "&&&", - "\n", sep="") - - # remove all spaces from request - request.data <- str_replace_all(request.raw, " ", "") - - #Write this request back to the socket to tell engine what we want - writeLines(request.data, socket) - - # define a list which will store the individual rows - rows = list() - - #Now the engine will begin feeding us data - #We grab the first to initialize the data var and then we continue listening\ - counter <- 0 - response <- "" - while (TRUE) { - temp <- readLines(socket, 1) - - if(temp == '') - { - print("Read empty string. Check engine logs or refresh configuration.") - next - } - - # if line is heartbeat then acknowledge and continue - if (grepl("<<>>", temp, fixed=TRUE)) - { - print(paste0("Heartbeat read for ", protocol)) - next - } - - # if line is response then process and terminate - else if (grepl("<<>>", temp, fixed=TRUE)) - { - temp <- readLines(socket, 1) - while(grepl("<<>>", temp, fixed=TRUE)) { - temp <- readLines(socket, 1) - } - response <- fromJSON(temp) - break - } - - # increment processed line counter - counter <- counter + 1 - if(counter %% 1000 == 0){ - print(paste0("Processed ", counter, " lines for ", protocol)) - } - - # add data point line to data frame - tryCatch(expr={ - rows[[counter]] = data.frame(fromJSON(temp)) - }, - error=function(e){ - message("Heartbeat exception caught and not parsed.") - }) - } - - output <- list("response"=response, "df"=do.call(rbind.fill, rows)) - close(socket) - return(output) - }) -} -``` - -# Load the transaction data from IDEA: -```{r} -# These are the generic names for the files with the associated information for all AAVE deployments: - -# retrieve stable coins from defillama -stablecoins <- request("llama-stablecoins", "", "")$df - -# Load the mainnet data: -mainnetTransactions <- transactions$df -mainnetReserveInfo <- data$reserves$df %>% - mutate(reserveType = case_when(symbol %in% stablecoins$symbol ~ "Stable", - TRUE ~ "Non-Stable")) - -mainnetTransactions <- mainnetTransactions %>% - mutate(timestamp=as.numeric(timestamp)) %>% - mutate(datetime = as_datetime(timestamp)) - -df <- mainnetTransactions -``` - -# Clustering Users: - - One goal of this project is to characterize users by their behavior within the DeFi ecosystem. For now, that just means characterizing them by their behavior within AAVE. Since we only have transaction data, we need to use this transaction data to create user-level data that can be actually be used for clustering, or perhaps other behavior-characterization methods. To help with the creation of these features, we start by separating our transactions into different dataframes for each transaction type and doing some aggregation of liquidations to help better characterize liquidation events. - -## Build some helper dataframes: -```{r, warning=FALSE} -not_all_na <- function(x) any(!is.na(x)) -`%notin%` <- Negate(`%in%`) - -borrows <- df %>% - filter(type == "borrow") %>% - select(where(not_all_na)) - -repays <- df %>% - filter(type == "repay") %>% - select(where(not_all_na)) - -deposits <- df %>% - filter(type == "deposit") %>% - select(where(not_all_na)) - -redeems <- df %>% - filter(type == "redeem") %>% - select(where(not_all_na)) - -liquidations <- df %>% - filter(type == "liquidation") %>% - select(where(not_all_na)) - -swaps <- df %>% - filter(type == "swap") %>% - select(where(not_all_na)) - -collaterals <- df %>% - filter(type == "collateral") %>% - select(where(not_all_na)) - -liquidationsPerformed <- liquidations %>% - mutate(liquidatee = user, liquidateeAlias = userAlias) %>% - select(-user, -userAlias) %>% - rename(user = liquidator, userAlias = liquidatorAlias) - -reserveTypes <- mainnetReserveInfo %>% - select(reserve=symbol, reserveType) - -df2 <- left_join(df, reserveTypes, by="reserve") %>% - mutate(timestamp=as.numeric(timestamp)) %>% - distinct() - -numLiqPerUser <- liquidations %>% - group_by(user) %>% - dplyr::summarise(numLiquidations = n()) - - -aggregateLiquidations <- df2 %>% - filter(user %in% numLiqPerUser$user) %>% # First, let's filter out all users who have never been liquidated. - group_by(user) %>% # The next set of logic is to sort users' transactions by timestamp and pull out all liquidations that are - arrange(timestamp) %>% # part of a consecutive set of liquidations. - mutate(nextTransaction = lead(type)) %>% - mutate(prevTransaction = lag(type)) %>% - filter(type == "liquidation" & (nextTransaction == "liquidation" | prevTransaction == "liquidation")) %>% - mutate(liquidationDay = floor_date(as_datetime(timestamp), unit = "day")) %>% # Then we want to use some approximation for the timeframe of this liquidation event, so we naively group consecutive liquidations by the day on which they took place. - group_by(user,liquidationDay) %>% # Doing this means that we can group by user and liquidationDay, which is functionally grouping by "liquidation event" - mutate(liquidationDuration = max(timestamp) - min(timestamp)) %>% # Now we can compute some basic stats about the event. - mutate(liquidationStart = min(timestamp), liquidationEnd = max(timestamp)) %>% - mutate(liquidationStartDatetime = as_datetime(liquidationStart), liquidationEndDatetime = as_datetime(liquidationEnd)) %>% - mutate(reserve = collateralReserve) %>% - left_join(reserveTypes, by = "reserve") %>% - dplyr::rename(collateralType = reserveType.y) %>% - mutate(reserve = principalReserve) %>% - left_join(reserveTypes, by = "reserve") %>% - dplyr::rename(principalType = reserveType) %>% - mutate(totalCollateralUSD = sum(collateralAmountUSD), totalPrincipalUSD = sum(principalAmountUSD))%>% - dplyr::mutate(numLiquidations = n()) %>% - dplyr::summarise(userAlias, numLiquidations, liquidationDuration, liquidationStart, liquidationEnd, liquidationStartDatetime, liquidationEndDatetime, - collateralReserves = str_flatten(str_sort(unique(collateralReserve)), collapse = ","), - collateralTypes = str_flatten(str_sort(unique(collateralType)), collapse= ","), - principalReserves = str_flatten(str_sort(unique(principalReserve)), collapse = ","), - principalTypes = str_flatten(str_sort(unique(principalType)), collapse = ","), - totalCollateralUSD, totalPrincipalUSD, liquidationType = str_c(principalTypes, collateralTypes, sep = ":")) %>% - distinct() - -rm(df2) - -``` - - -## Build features to cluster the users: -```{r, warning=FALSE} -timeFinal <- max(df$timestamp) -userActiveTime <- df %>% - group_by(user) %>% - dplyr::summarise(firstTransactionTimestamp = min(timestamp), finalTimestamp = max(timestamp), daysSinceFirstTransaction = max((timeFinal-min(timestamp))/86400, 1)) - -userDailyTransactions <- df %>% - group_by(user) %>% - mutate(transactionDay = floor_date(as_datetime(timestamp), unit = "day")) %>% - group_by(user, transactionDay) %>% - dplyr::summarise(transactionsPerActiveDay = n()) - -userActiveDays <- userDailyTransactions %>% - group_by(user) %>% - dplyr::summarise(activeDays = n()) - -userBorrowCounts <- borrows %>% - group_by(user) %>% - dplyr::summarise(borrowCount = n(), borrowValue = sum(amountUSD)) %>% - mutate(logBorrowValue = case_when(borrowValue != 0 ~ log(borrowValue, 10), - TRUE ~ 0)) - -userDepositCounts <- deposits %>% - group_by(user) %>% - dplyr::summarise(depositCount = n(), depositValue = sum(amountUSD))%>% - mutate(logDepositValue = case_when(depositValue != 0 ~ log(depositValue, 10), - TRUE ~ 0)) - -userRedeemCounts <- redeems %>% - group_by(user) %>% - dplyr::summarise(redeemCount = n(), redeemValue = sum(amountUSD)) %>% - mutate(logRedeemValue = case_when(redeemValue != 0 ~ log(redeemValue, 10), - TRUE ~ 0)) - -userRepayCounts <- repays %>% - group_by(user) %>% - dplyr::summarise(repayCount = n(), repayValue = sum(amountUSD)) %>% - mutate(logRepayValue = case_when(repayValue != 0 ~ log(repayValue, 10), - TRUE ~ 0)) - -userLiquidatedCounts <- aggregateLiquidations %>% - group_by(user) %>% - dplyr::summarise(liquidatedCount = n(), liquidatedValue = sum(totalPrincipalUSD)) - -userLiquidationCounts <- liquidationsPerformed %>% - group_by(user) %>% - dplyr::summarise(liquidationsPerformed = n(), liquidationsPerformedValue = sum(collateralAmountUSD)) - -userSwapCounts <- swaps %>% - group_by(user) %>% - dplyr::summarise(swapCount = n()) - -userCollateralCounts <- collaterals %>% - group_by(user) %>% - dplyr::summarise(collateralCount = n()) - -userReservesUsed <- df %>% - filter(type == "deposit" | type == "borrow") %>% - group_by(user) %>% - dplyr::summarise(reservesUsed = n_distinct(reserve)) - -transactionsMadeOnBehalfOf <- df %>% - filter(user != onBehalfOf) %>% - select(onBehalfOf) %>% - rename(user = onBehalfOf) %>% - group_by(user) %>% - summarise(onBehalfOfCount = n()) - -transactionsPerformedForOther <- df %>% - filter(user != onBehalfOf) %>% - select(user) %>% - group_by(user) %>% - summarise(performedForOtherCount = n()) - - -userTransactionCounts <- df %>% - select(user) %>% - distinct() %>% - full_join(userBorrowCounts, by = "user") %>% - full_join(userDepositCounts, by = "user") %>% - full_join(userRedeemCounts, by = "user") %>% - full_join(userRepayCounts, by = "user") %>% - full_join(userLiquidatedCounts, by = "user") %>% - full_join(userLiquidationCounts, by = "user") %>% - full_join(userSwapCounts, by = "user") %>% - full_join(userCollateralCounts, by = "user") - -userTransactionCounts[is.na(userTransactionCounts)] = 0 - -userTransactionCounts <- userTransactionCounts %>% - mutate(totalTransactionCount = borrowCount + depositCount + redeemCount + repayCount + liquidatedCount + liquidationsPerformed + swapCount + collateralCount) - -userActiveCollaterals <- collaterals %>% - group_by(user, reserve) %>% - slice_max(timestamp) %>% - filter(toState == TRUE) %>% - ungroup() %>% - group_by(user) %>% - dplyr::summarise(numActiveCollaterals=n()) - -userClusteringData <- userTransactionCounts %>% - mutate(percentDepositRedeem = (depositCount + redeemCount) / totalTransactionCount) %>% - mutate(averageUSDPerTransaction = (depositValue + redeemValue + repayValue + liquidatedValue + liquidationsPerformedValue + borrowValue) / totalTransactionCount) %>% - mutate(logUSDPerTransaction = case_when(averageUSDPerTransaction != 0 ~ log(averageUSDPerTransaction, 10), TRUE ~ 0)) %>% - mutate(timesLiquidated = liquidatedCount) %>% - mutate(liquidationsPerformed = liquidationsPerformed) %>% - left_join(userActiveTime, by="user") %>% - mutate(averageTransactionsPerDay = totalTransactionCount / daysSinceFirstTransaction) %>% - left_join(userActiveDays, by="user") %>% - mutate(percentageDaysActive = activeDays / daysSinceFirstTransaction) %>% - left_join(userReservesUsed, by = "user") %>% - left_join(userActiveCollaterals, by="user") %>% - mutate(percentDeposit = depositCount / totalTransactionCount, percentRedeems = redeemCount / totalTransactionCount, - percentBorrow = borrowCount / totalTransactionCount, percentRepay = repayCount / totalTransactionCount, - percentSwap = swapCount / totalTransactionCount, percentCollateral = collateralCount / totalTransactionCount, - percentLiquidations = liquidationsPerformed / totalTransactionCount) %>% - left_join(transactionsMadeOnBehalfOf, by="user") %>% - left_join(transactionsPerformedForOther, by = "user") - -userClusteringData[is.na(userClusteringData)] = 0 -``` -# Computing K-Means clusters for these users: - -```{r, warning=FALSE} -# First, let's select the features we want to use, because we might not want to use them all. -clusteringFeatures <- userClusteringData %>% - select(percentDeposit, percentRedeems, percentCollateral, percentBorrow, percentRepay, percentLiquidations, percentSwap, daysSinceFirstTransaction, logDepositValue, logRedeemValue, logBorrowValue, logRepayValue) - -# Don't forget to scale the data ahead of time: -scaledData <- clusteringFeatures %>% mutate_all(scale) - -kmeansClusters <- kmeans(scaledData, centers = 4, nstart = 25) - -fviz_cluster(kmeansClusters, data = scaledData) -``` - -```{r} -clusteredUsers <- userClusteringData %>% - bind_cols(cluster = kmeansClusters$cluster) %>% - select(user, cluster) - -transactionsWithClusters <- mainnetTransactions %>% - left_join(clusteredUsers, by = "user") %>% - filter(type %in% c("liquidation", "redeem", "borrow", "repay", "deposit")) - -transactionsByClusterPlot <- ggplot(data = transactionsWithClusters, aes(x = datetime, group = type, color = type)) + - geom_density() + facet_wrap( ~ cluster) + - ggtitle("Transaction Types Over Time by User Cluster") - -transactionsByClusterPlot - -usersPerCluster <- clusteredUsers %>% - group_by(cluster) %>% - summarize(count = n()) -``` - - -# Choose the appropriate amount of clusters using the "elbow" method: -```{r, warning=FALSE} -set.seed(123) - -fviz_nbclust(head(scaledData, 10000), kmeans, method = "wss") -``` - It looks like the "elbow" occurs at 3, so let's run k-means with 3 centers and see what the clusters look like with respect to the first two principal components. -```{r, warning=FALSE} - -kmeansClusters <- kmeans(scaledData, centers = 3, nstart=25) - -fviz_cluster(kmeansClusters, data = scaledData) -``` - - It's hard to know from this visualization whether these clusters are meaningful. The principal components do not explain that much variance of the data. Given that K-means is among the most naive clustering methods, it's likely a good idea to explore other clustering methods. Additionally, the selected features for the above clustering were not necessarily selected in a smart way. - -# Future Work and Questions: - - 1. Can you think of other features that could be meaningful for clustering and characterizing users? If so, can you build those features from the transaction data? - - 2. Try some feature selection techniques to figure out which features of those computed above should actually be used in the clustering. - - 3. Implement more complex clustering methods for clustering the users. - - 4. Compare user behavior by clusters across deployments of AAVE. How do users behave differently between the Ethereum mainnet deployment and the Matic deployment? \ No newline at end of file diff --git a/R-Code-Samples/GetTransactions.Rmd b/R-Code-Samples/GetTransactions.Rmd deleted file mode 100644 index f4df0a37..00000000 --- a/R-Code-Samples/GetTransactions.Rmd +++ /dev/null @@ -1,535 +0,0 @@ ---- -title: "GetTransactions" -author: "Conor Flynn" -date: "2023-04-17" -output: html_document ---- - -```{r setup, include=FALSE} -knitr::opts_chunk$set(echo = TRUE) -``` - -## Define necessary libraries -```{r} -library(knitr) -library(plyr) -library(dplyr) -library(jsonlite) -library(stringr) -library(tidyr) -library(randomNames) -``` - -## Define request function: - -# NOTE: -# This function is officially defined in DataEnginePrimaryFunctions.Rmd and does not need to be redefined -# for every use-case. Here it is defined for and because there are requests made. - -# DESCRIPTION: -# This function serves as the primary request point for making internal requests to the defi data engine. Note that should a request be -# made outside the function, please ensure the necessary format depicted within it is used otherwise an internal error may occur. -# Note that you MUST be connected to the RPI network (such that a connection can be made to defi-de.idea.rpi.edu) otherwise this -# function will not work. - -# INPUT: -# - protocol: The name of the protocol to receive data from. -# [optional] - properties: All properties used in the call (note typically REST API URL parameters). -# [optional] - headers: All headers used in the call (note typically REST API URL headers). -# [optional] - startdate: Starting date to retrieve data from. In format 'yyyy-MM-dd' i.e. 2023-04-01 -# [optional] - enddate: Ending date to retrieve data from (non-inclusive). In format 'yyyy-MM-dd' i.e. 2023-04-01 - -# OUTPUT: -# list containing two elements: -# - $response: Contains all response information as listed below: -# - $response: Value denoting status of call TO the engine. Code 200 denotes connection was received by engine properly. -# - $code: Code returned by engine based on internal schema. Full list of codes can be found here (https://github.rpi.edu/DataINCITE/IDEA-DeFi-CRAFT/wiki/Response-Codes) -# - $message: Message response accompanying code should the response be irregular. -# - $data: Data returned by call should any be requested. -```{r} -request <- function(protocol, properties = "", headers = "", startdate = "", enddate = "") { - suppressWarnings({ - #Create socket and get destination which tells the engine where to put the data - socket <- socketConnection("defi-de.idea.rpi.edu", 61200, blocking=TRUE) - destination <- readLines(socket, 1) - - formatted_properties = "" - if(properties != "") - formatted_properties = paste("properties", "&&&", properties, "&&&") - - formatted_headers = "" - if(headers != "") - formatted_headers = paste("headers", "&&&", headers, "&&&") - - formatted_startdate = "" - formatted_enddate = "" - if(startdate != "" && enddate != "") { - formatted_startdate = paste("start_date", "&&&", startdate, "&&&") - formatted_enddate = paste("end_date", "&&&", enddate, "&&&") - } - - #Build the request delimited by &&& - #Similar to a GET request in the way we handle parameters - request.raw <- paste( - "SRC", "&&&", "RQST", "&&&", - "type", "&&&", protocol, "&&&", - formatted_properties, - formatted_headers, - formatted_startdate, - formatted_enddate, - "destination", "&&&", destination, "&&&", - "\n", sep="") - - # remove all spaces from request - request.data <- str_replace_all(request.raw, " ", "") - - #Write this request back to the socket to tell engine what we want - writeLines(request.data, socket) - - # define a list which will store the individual rows - rows = list() - - #Now the engine will begin feeding us data - #We grab the first to initialize the data var and then we continue listening\ - counter <- 0 - response <- "" - while (TRUE) { - temp <- readLines(socket, 1) - - if(temp == '') - { - print("Read empty string. Check engine logs or refresh configuration.") - next - } - - # if line is heartbeat then acknowledge and continue - if (grepl("<<>>", temp, fixed=TRUE)) - { - print(paste0("Heartbeat read for ", protocol)) - next - } - - # if line is response then process and terminate - else if (grepl("<<>>", temp, fixed=TRUE)) - { - temp <- readLines(socket, 1) - while(grepl("<<>>", temp, fixed=TRUE)) { - temp <- readLines(socket, 1) - } - response <- fromJSON(temp) - break - } - - # increment processed line counter - counter <- counter + 1 - if(counter %% 1000 == 0){ - print(paste0("Processed ", counter, " lines for ", protocol)) - } - - # add data point line to data frame - tryCatch(expr={ - rows[[counter]] = data.frame(fromJSON(temp)) - }, - error=function(e){ - message("Heartbeat exception caught and not parsed.") - }) - } - - output <- list("response"=response, "df"=do.call(rbind.fill, rows)) - close(socket) - return(output) - }) -} -``` - - -## Define get_users function: - -# DESCRIPTION: -# This function loads all user data from The Graph using the request() function defined above. -# Only one call needs to be made to this function so long as the data is loaded in the cache. -# Since it is a process-intensive call, it is recommended to only call this once and then -# pass the output as a parameter to the get_data() function. - -# INPUT: - -# OUTPUT: -# list containing two elements: -# - $response: Contains all response information as listed below: -# - $response: Value denoting status of call TO the engine. Code 200 denotes connection was received by engine properly. -# - $code: Code returned by engine based on internal schema. Full list of codes can be found here -# (https://github.rpi.edu/DataINCITE/IDEA-DeFi-CRAFT/wiki/Response-Codes) -# - $message: Message response accompanying code should the response be irregular. -# - $data: Data returned by call should any be requested. -# - $df: Data frame containing data returned from 'graph-aave-users' request. -```{r} -get_users <- function() { - # retrieve users and then parse with aliases - graph.users <- request("graph-aave-users", "", "") - if(graph.users$response$code != 200) - return(graph.users) - - # define data frame - graph.users.df <- graph.users$df - - aliases = NULL - set.seed(69420) - - while(length(aliases[,1]) < length(graph.users.df$id)){ - alias <- randomNames(1000, name.order = "first.last", name.sep = " ", sample.with.replacement = FALSE) - aliases <- aliases %>% - bind_rows(data.frame(alias)) %>% - distinct() - } - - aliases <- aliases %>% - head(length(graph.users.df$id)) - - userAliases <- bind_cols(graph.users, aliases) %>% - mutate(version = "V2", - deployment = "Mainnet") - - output <- list("response"=graph.users$response, "df"=userAliases) -} -``` - - -## Define get_data function: - -# DESCRIPTION: -# This function will request all necessary data to compute the transaction dataframe. -# This includes multiple calls to The Graph which can be seen below. - -# INPUT: -# - startdate: Starting date to retrieve data from. In format 'yyyy-MM-dd' i.e. 2023-04-01 -# - enddate: Ending date to retrieve data from (non-inclusive). In format 'yyyy-MM-dd' i.e. 2023-04-01 -# - users: Response from get_users() function that contains all user data. If not passed then it will -# request it in this function. - -# OUTPUT: -# Dataframe containing all returned data. -```{r} -get_data <- function(startdate, enddate, users=NULL) { - ### retrieve all data from defi engine: - - # submit a request - graph.borrows <- request("graph-aave-borrows", "", "", startdate, enddate) - # for each request validate the code was successful - # if not the return the response with an empty dataframe - if(graph.borrows$response$code != 200) - return(graph.borrows) - - # repeat for all following requests - graph.collaterals <- request("graph-aave-collaterals", "", "", startdate, enddate) - if(graph.collaterals$response$code != 200) - return(graph.collaterals) - - graph.deposits <- request("graph-aave-deposits", "", "", startdate, enddate) - if(graph.deposits$response$code != 200) - return(graph.deposits) - - graph.flashloans <- request("graph-aave-flash-loans", "", "", startdate, enddate) - if(graph.flashloans$response$code != 200) - return(graph.flashloans) - - graph.liquidations <- request("graph-aave-liquidations", "", "", startdate, enddate) - if(graph.liquidations$response$code != 200) - return(graph.liquidations) - - graph.pricehist <- request("graph-aave-price-history-items", "", "", startdate, enddate) - if(graph.pricehist$response$code != 200) - return(graph.pricehist) - - graph.redeems <- request("graph-aave-redeems", "", "", startdate, enddate) - if(graph.redeems$response$code != 200) - return(graph.redeems) - - graph.repays <- request("graph-aave-repays", "", "", startdate, enddate) - if(graph.repays$response$code != 200) - return(graph.repays) - - graph.reservehist <- request("graph-aave-reserve-params-hist-items", "", "", startdate, enddate) - if(graph.reservehist$response$code != 200) - return(graph.reservehist) - - graph.reserves <- request("graph-aave-reserves", "", "") - if(graph.reserves$response$code != 200) - return(graph.reserves) - - graph.swaps <- request("graph-aave-swaps", "", "", startdate, enddate) - if(graph.swaps$response$code != 200) - return(graph.swaps) - - graph.userreserves <- request("graph-aave-user-reserves", "", "", startdate, enddate) - if(graph.userreserves$response$code != 200) - return(graph.userreserves) - - # retrieve users and then parse with aliases - graph.users <- users - if(is.null(users)) { - # retrieve users and then parse with aliases - graph.users <- request("graph-aave-users", "", "") - if(graph.users$response$code != 200) - return(graph.users) - - # define data frame - graph.users.df <- graph.users$df - - aliases = NULL - set.seed(69420) - - while(length(aliases[,1]) < length(graph.users.df$id)){ - alias <- randomNames(1000, name.order = "first.last", name.sep = " ", sample.with.replacement = FALSE) - aliases <- aliases %>% - bind_rows(data.frame(alias)) %>% - distinct() - } - - aliases <- aliases %>% - head(length(graph.users.df$id)) - - userAliases <- bind_cols(graph.users, aliases) %>% - mutate(version = "V2", - deployment = "Mainnet") - - graph.users <- list("response"=graph.users$response, "df"=userAliases) - } - - # format into output list - output <- list(borrows=graph.borrows, collaterals=graph.collaterals, deposits=graph.deposits, - flashloans=graph.flashloans, liquidations=graph.liquidations, pricehist=graph.pricehist, - redeems=graph.redeems, repays=graph.repays, reservehist=graph.reservehist, reserves=graph.reserves, - swaps=graph.swaps, userreserves=graph.userreserves, users=graph.users) -} -``` - -## Define get_transactions function: - -# DESCRIPTION: -# This function takes input returned from the get_data(startdate, enddate, users) function to parse a table with -# all properly formatted transaction data. - -# INPUT: -# - data: Response from the get_data() function containing all properly formatted data. - -# OUTPUT: -# Dataframe containing all formatted transaction data. -```{r} -# get transactions function includes calls to both AmberData, GraphQL, and DeFiLlama -get_transactions <- function(data) { - ### parse all data into proper raw naming conventions - - # load raw transaction tables: - rawBorrows <- data$borrows$df - rawCollaterals <- data$collaterals$df - rawDeposits <- data$deposits$df - rawLiquidations <- data$liquidations$df - rawRedeems <- data$redeems$df - rawRepays <- data$repays$df - rawSwaps <- data$swaps$df - rawFlashLoans <- data$flashloans$df - - # load raw reserve information: - rawReserveInfo <- data$reserves$df - rawReserveParamsHistory <- data$reservehist$df - - # select aliases - aliases <- data$users$df %>% - select(id, alias) - - # select reserve info - reserveInfo <- rawReserveInfo %>% - select(id, - symbol, - decimals) - - # select reserve parameter history - reserveParamsHistory <- rawReserveParamsHistory %>% - mutate(txID = str_sub(id, start = 1, end = 66)) %>% - left_join(reserveInfo, by = c("reserve" = "id")) - - # mutate and parse borrows df - borrows <- rawBorrows %>% - mutate(type = "borrow", - id = str_extract(id, "0x\\w+")) %>% - left_join(reserveParamsHistory, by = c("id" = "txID", "timestamp", "reserve")) %>% - mutate(amount = as.numeric(amount) / (10^as.numeric(decimals))) %>% - mutate(amountUSD = as.numeric(amount) * as.numeric(priceInUsd)) %>% - mutate(priceInEth = as.numeric(priceInEth) / (10^18)) %>% - mutate(amountETH = as.numeric(amount) * as.numeric(priceInEth)) %>% - mutate(reserve = symbol) %>% - mutate(user = user) %>% - mutate(onBehalfOf = caller) %>% - mutate(borrowRate = as.numeric(borrowRate) / (10^25)) %>% - mutate(pool = pool) %>% - left_join(aliases, by = c("user" = "id")) %>% - dplyr::rename(userAlias = alias) %>% - left_join(aliases, by = c("onBehalfOf" = "id")) %>% - dplyr::rename(onBehalfOfAlias = alias) %>% - select(id, type, timestamp, user, userAlias, onBehalfOf, onBehalfOfAlias, pool, - reserve, amount, amountUSD, amountETH, borrowRate, borrowRateMode) %>% - drop_na() %>% - distinct() - - # mutate and parse collaterals df - collaterals <- rawCollaterals %>% - mutate(type = "collateral", - id = str_extract(id, "0x\\w+")) %>% - mutate(user = user, pool = pool) %>% - left_join(reserveParamsHistory, by = c("id" = "txID", "timestamp", "reserve")) %>% - mutate(reserve = symbol) %>% - left_join(aliases, by = c("user" = "id")) %>% - dplyr::rename(userAlias = alias) %>% - select(id, timestamp, user, userAlias, pool, reserve, fromState, toState, type) %>% - drop_na() %>% - distinct() - - # mutate and parse deposits df - deposits <- rawDeposits %>% - mutate(type = "deposit", - id = str_extract(id, "0x\\w+")) %>% - mutate(user = user, pool = pool) %>% - left_join(reserveParamsHistory, by = c("id" = "txID", "timestamp", "reserve")) %>% - mutate(reserve = symbol) %>% - mutate(onBehalfOf = caller) %>% - mutate(amount = as.numeric(amount) / (10^as.numeric(decimals))) %>% - mutate(amountUSD = as.numeric(amount) * as.numeric(priceInUsd)) %>% - mutate(priceInEth = as.numeric(priceInEth) / (10^18)) %>% - mutate(amountETH = as.numeric(amount) * as.numeric(priceInEth)) %>% - left_join(aliases, by = c("user" = "id")) %>% - dplyr::rename(userAlias = alias) %>% - left_join(aliases, by = c("onBehalfOf" = "id")) %>% - dplyr::rename(onBehalfOfAlias = alias) %>% - select(id, timestamp, type, amount, amountUSD, amountETH, reserve, user, userAlias, - onBehalfOf, onBehalfOfAlias, pool) %>% - drop_na() %>% - distinct() - - # mutate and parse liquidations df - liquidations <- rawLiquidations %>% - mutate(type = "liquidation", - id = str_extract(id, "0x\\w+"), - user = user, pool = pool) %>% - left_join(reserveParamsHistory, by = c("id" = "txID", "principalReserve" = "reserve", "timestamp")) %>% - mutate(principalAmount = as.numeric(principalAmount) / 10^as.numeric(decimals), - principalAmountUSD = as.numeric(priceInUsd) * as.numeric(principalAmount), - principalAmountETH = as.numeric(priceInEth) * as.numeric(principalAmount) / 10^18) %>% - select(id, timestamp, type, user, liquidator, pool, - principalAmount, principalReserve = symbol, principalAmountUSD, principalAmountETH, - collateralAmount, collateralReserve) %>% - left_join(reserveParamsHistory, by = c("id" = "txID", "collateralReserve" = "reserve", "timestamp")) %>% - mutate(collateralAmount = as.numeric(collateralAmount) / 10^as.numeric(decimals), - collateralAmountUSD = as.numeric(priceInUsd) * as.numeric(collateralAmount), - collateralAmountETH = as.numeric(priceInEth) * as.numeric(collateralAmount) / 10^18) %>% - select(id, timestamp, type, user, liquidator, pool, - principalAmount, principalReserve, principalAmountUSD, principalAmountETH, - collateralAmount, collateralReserve = symbol, collateralAmountUSD, collateralAmountETH) %>% - left_join(aliases, by = c("user" = "id")) %>% - dplyr::rename(userAlias = alias) %>% - left_join(aliases, by = c("liquidator" = "id")) %>% - dplyr::rename(liquidatorAlias = alias) %>% - distinct() - - # mutate and parse redeems df - redeems <- rawRedeems %>% - mutate(type = "redeem", - id = str_extract(id, "0x\\w+")) %>% - mutate(user = user, pool = pool) %>% - left_join(reserveParamsHistory, by = c("id" = "txID", "timestamp", "reserve")) %>% - mutate(reserve = symbol) %>% - mutate(onBehalfOf = to) %>% - mutate(amount = as.numeric(amount) / (10^as.numeric(decimals))) %>% - mutate(amountUSD = as.numeric(amount) * as.numeric(priceInUsd)) %>% - mutate(priceInEth = as.numeric(priceInEth) / (10^18)) %>% - mutate(amountETH = as.numeric(amount) * as.numeric(priceInEth)) %>% - left_join(aliases, by = c("user" = "id")) %>% - dplyr::rename(userAlias = alias) %>% - left_join(aliases, by = c("onBehalfOf" = "id")) %>% - dplyr::rename(onBehalfOfAlias = alias) %>% - select(id,timestamp, type, amount, amountUSD, amountETH, reserve, user, userAlias, - onBehalfOf, onBehalfOfAlias, priceInUsd, pool) %>% - drop_na() %>% - distinct() - - # mutate and parse repays df - repays <- rawRepays %>% - mutate(type = "repay", - id = str_extract(id, "0x\\w+"))%>% - mutate(user = user, pool = pool) %>% - left_join(reserveParamsHistory, by = c("id" = "txID", "timestamp", "reserve")) %>% - mutate(reserve = symbol) %>% - mutate(onBehalfOf = repayer) %>% - mutate(amount = as.numeric(amount) / (10^as.numeric(decimals))) %>% - mutate(amountUSD = as.numeric(amount) * as.numeric(priceInUsd)) %>% - mutate(priceInEth = as.numeric(priceInEth) / (10^18)) %>% - mutate(amountETH = as.numeric(amount) * as.numeric(priceInEth)) %>% - left_join(aliases, by = c("user" = "id")) %>% - dplyr::rename(userAlias = alias) %>% - left_join(aliases, by = c("onBehalfOf" = "id")) %>% - dplyr::rename(onBehalfOfAlias = alias) %>% - select(id, timestamp, type, amount, amountUSD, amountETH, reserve, user, userAlias, - onBehalfOf, onBehalfOfAlias, priceInUsd, pool) %>% - drop_na() %>% - distinct() - - # mutate and parse swaps df - swaps <- rawSwaps %>% - mutate(type = "swap", - id = str_extract(id, "0x\\w+")) %>% - mutate(user = user, pool = pool) %>% - mutate(stableBorrowRate = as.numeric(stableBorrowRate) / (10^25), variableBorrowRate = as.numeric(variableBorrowRate) / (10^25)) %>% - left_join(reserveParamsHistory, by = c("id" = "txID", "timestamp", "reserve")) %>% - mutate(reserve = symbol) %>% - left_join(aliases, by = c("user" = "id")) %>% - dplyr::rename(userAlias = alias) %>% - select(id, timestamp, type, reserve, user, userAlias, pool, borrowRateModeTo, - borrowRateModeFrom, stableBorrowRate = stableBorrowRate.x, variableBorrowRate = variableBorrowRate.x) %>% - drop_na() %>% - distinct() - - # mutate and parse flashloans df - flashLoans <- rawFlashLoans %>% - mutate(type = "flashLoan", - id = str_extract(id, "0x\\w+")) %>% - left_join(reserveParamsHistory, by = c("id" = "txID", "timestamp", "reserve")) %>% - mutate(reserve = symbol, - amount = as.numeric(amount)) %>% - select(id, timestamp, type, reserve, target, pool, amount, totalFee, target) %>% - drop_na() %>% - distinct() - - # define binded clean transactions df - cleanedTransactions <- borrows %>% - bind_rows(collaterals) %>% - bind_rows(deposits) %>% - bind_rows(liquidations) %>% - bind_rows(redeems) %>% - bind_rows(repays) %>% - bind_rows(swaps) %>% - bind_rows(flashLoans) - - # return successful output with given successful response code - output <- list("response"=list("code"=200, "data"="", "response"=200, "message"="Successful Response"), "df"=cleanedTransactions) - output -} -``` - - -## Sample Code: - -# First we make a request to get user data: -```{r} -users <- get_users() -``` - -# Next we write a call to get_data to get all needed data: -```{r} -startdate <- "2022-01-01" -enddate <- "2022-01-10" -data <- get_data(startdate, enddate, users) -``` - -# Finally make a call to get all transactional data: -```{r} -transactions <- get_transactions(data) -``` \ No newline at end of file diff --git a/Survival Analysis/MARBLE 2022.Rmd b/Survival Analysis/MARBLE 2022.Rmd deleted file mode 100644 index ccb6cd6f..00000000 --- a/Survival Analysis/MARBLE 2022.Rmd +++ /dev/null @@ -1,662 +0,0 @@ -# Code used to generate plots for MARBLE 2022 conference paper, but updated with new data. -```{r setup, include=FALSE} -# Set the default CRAN repository -local({r <- getOption("repos") - r["CRAN"] <- "http://cran.r-project.org" - options(repos=r) -}) - -# Set code chunk defaults -knitr::opts_chunk$set(echo = TRUE) - -# Load required packages; install if necessary -# CAUTION: DO NOT interrupt R as it installs packages!! -if (!require("ggplot2")) { - install.packages("ggplot2") - library(ggplot2) -} - -if (!require("knitr")) { - install.packages("knitr") - library(knitr) -} - -if (!require("dplyr")) { - install.packages("dplyr") - library(dp) -} - -if (!require("RColorBrewer")) { - install.packages("RColorBrewer") - library(RColorBrewer) -} -if (!require("beeswarm")) { - install.packages("beeswarm") - library(beeswarm) -} -if (!require("tidyverse")) { - install.packages("tidyverse") - library(tidyverse) -} -if (!require("ggbeeswarm")) { - install.packages("ggbeeswarm") - library(ggbeeswarm) -} -if (!require("xts")) { - install.packages("xts") - library(xts) -} -if (!require("plotly")) { - install.packages("plotly") - library(plotly) -} -if(!require("lubridate")) { - install.packages("lubridate") - library(lubridate) -} -if(!require("survival")) { - install.packages("survival") - library(survival) -} -if(!require("survminer")) { - install.packages('survminer') - library(survminer) -} -if(!require("ranger")){ - install.packages("ranger") - library(ranger) -} -if(!require("ggfortify")){ - install.packages("ggfortify") - library(ggfortify) -} -deployment = "all" -type = "all" -source("../dataLoaders/loadAaveData.r") -aaveMainnetTransactions <- cleanTransactions(aaveMainnetTransactions) -aaveMaticTransactions <- cleanTransactions(aaveMaticTransactions) -``` -# Run survival analysis on the mainnet data: - - -## Convert Data to Appropriate Format for Survival Analysis - For tracking loans we can filter out all but a few features of the data: - -```{r} -df <- aaveMainnetTransactions -reserveInfo <- aaveMainnetReserveInfo - -timeFinal <- max(df$timestamp) - -# Build a table of transaction summary statistics: -transactionSummaries <- df %>% - group_by(type) %>% - summarise(count = n(), meanValue = mean(amountUSD), medianValue = median(amountUSD), meanPrincipalAmount = mean(amountUSDPrincipal), meanCollateralAmount = mean(amountUSDCollateral)) - -coinStabilities <- reserveInfo %>% - select(symbol, stable) %>% - rename(reserve = symbol) - - -df <- df %>% - left_join(coinStabilities, by = "reserve") - -reserveTypes <- df %>% - select(reserve, stable) %>% - distinct() %>% - mutate(reserveType = if_else(stable == TRUE, "Stable", "Non-Stable")) %>% - select(reserve, reserveType) %>% - drop_na() - - -coinSummaries <- df %>% - group_by(reserve, type) %>% - summarise(count = n(), totalValue = sum(amountUSD), stable) %>% - distinct() -``` - -## Any-To-Any Setup: -```{r} -anyToAny <- df %>% - group_by(user) %>% - arrange(timestamp) %>% - mutate(nextTransactionTimestamp = lead(timestamp), nextTransactionType = lead(type), nextTransactionReserve = lead(reserve)) %>% - mutate(timeDiff = case_when(!is.na(nextTransactionTimestamp) ~ nextTransactionTimestamp - timestamp, - TRUE ~ timestamp - timeFinal)) %>% - mutate(status = case_when(timeDiff < 0 ~ 0, timeDiff >= 0 ~ 1)) %>% - mutate(timeDiff = abs(timeDiff)) %>% - select(user, reserve, type, timeDiff, status, nextTransactionType, nextTransactionReserve) %>% - ungroup() - -anyToAnyFit <- survfit(Surv(as.numeric(timeDiff/86400), as.numeric(status)) ~ type, data = anyToAny) - -anyToAnyPlot <- ggsurvplot(anyToAnyFit, censor = FALSE) - -anyToAnyPlot - -anyToAny <- anyToAny %>% - mutate(nextTransactionBorrow = (nextTransactionType == "borrow")) %>% - mutate(nextTransactionCollateral = (nextTransactionType == "collateral")) %>% - mutate(nextTransactionDeposit = (nextTransactionType == "deposit")) %>% - mutate(nextTransactionLiquidation = (nextTransactionType == "liquidation")) %>% - mutate(nextTransactionRedeem = (nextTransactionType == "redeem")) %>% - mutate(nextTransactionRepay = (nextTransactionType == "repay")) %>% - mutate(nextTransactionSwap = (nextTransactionType == "swap")) - -``` - -## Deposit-to-Any Analysis: -```{r} -depositToAny <- anyToAny %>% - filter(type == "deposit") - -numTypesAfterDeposit <- depositToAny %>% - group_by(nextTransactionType) %>% - summarise(count = n()) %>% - mutate(percentage = count*100 / length(deposits$timestamp)) - -kable(numTypesAfterDeposit) - - -depositToAnyFit <- survfit(Surv(as.numeric(timeDiff/86400), as.numeric(status)) ~ nextTransactionType, data=depositToAny) - -depositToAnyPlot <- ggsurvplot(depositToAnyFit, xlab = "Time (days)", ylab = "Probability of No Subsequent Transactions", censor = FALSE, legend = c(0.8,0.6), legend.title = "Next Transaction Type (Percentage)", xlim = c(0,50), break.time.by = 5) - -depositToAnyPlot -``` -```{r} -depositToAnyMedians <- surv_median(depositToAnyFit) - -kable(depositToAnyMedians) - -depositToAnyCox <- coxph(Surv(as.numeric(timeDiff/86400), as.numeric(status)) ~ nextTransactionBorrow + nextTransactionCollateral + nextTransactionDeposit + nextTransactionLiquidation + nextTransactionRedeem + nextTransactionRepay + nextTransactionSwap, data = depositToAny) -summary(depositToAnyCox) -``` - - -## Borrow to Any Analysis: -```{r} -borrowToAny <- anyToAny %>% - filter(type == "borrow") - -borrowToAnyFit <- survfit(Surv(as.numeric(timeDiff/86400), as.numeric(status)) ~ nextTransactionType, data=borrowToAny) - -borrowToAnyPlot <- ggsurvplot(borrowToAnyFit, xlab = "Time (days)", ylab = "Probability of No Subsequent Transactions", title = "How Quickly Do Users Act After Borrowing Funds?", censor = FALSE, legend = c(0.8,0.6), legend.title = "Next Transaction Type", xlim = c(0,50), break.time.by = 5) - -borrowToAnyPlot -``` -## Borrow to Repay Analysis: -```{r} -borrows <- df %>% - filter(type == "borrow") %>% - mutate(ID = row_number()) %>% - select(where(not_all_na)) - -repays <- df %>% - filter(type == "repay") - -borrowsToRepays <- left_join(borrows, repays, by = c("user", "reserve")) %>% - rename(borrowTime = timestamp.x) %>% - rename(repayTime = timestamp.y) %>% - group_by(ID) %>% - mutate(status = case_when(borrowTime >= max(repayTime) ~ 0, - is.na(repayTime) ~ 0, - TRUE ~ 1)) %>% - distinct() - -censoredBorrows <- borrowsToRepays %>% - filter(status == 0) %>% - group_by(ID) %>% - summarise(ID, user, timeDiff = timeFinal - borrowTime, status, reserve) %>% - distinct() - -uncensoredBorrows <- borrowsToRepays %>% - filter(status == 1) %>% - filter(repayTime > borrowTime) %>% - summarise(ID, user, timeDiff = min(repayTime) - borrowTime, status, reserve) %>% - distinct() - -allBorrowsToRepays <- bind_rows(censoredBorrows, uncensoredBorrows) %>% - arrange(ID) - - -borrowToRepayFit <- survfit(Surv(as.numeric(timeDiff/86400), as.numeric(status)) ~ 1, data=allBorrowsToRepays) - -borrowToRepayPlot <- ggsurvplot(borrowToRepayFit, xlab = "Time (days)", ylab = "Probability of No Repayments", title="How Long Do Users Wait to Repay Loans?", legend = "none", censor=FALSE) - -borrowToRepayPlot - -``` - -```{r} -borrowsToRepaysStable <- allBorrowsToRepays %>% - left_join(reserveTypes) %>% - filter(reserveType == "Stable") - -borrowsToRepaysStableFit <- survfit(Surv(as.numeric(timeDiff/86400), as.numeric(status)) ~ reserve, data=borrowsToRepaysStable) - -borrowsToRepaysStablePlot <- ggsurvplot(borrowsToRepaysStableFit, xlab="Time (days)", ylab="Probability of No Repays", title="How Long Do Users Wait to Repay Stable Coins?", legend.title="", censor=FALSE, conf.int = FALSE) - -borrowsToRepaysStablePlot -``` - -```{r} -borrowsToRepaysNonStable <- allBorrowsToRepays %>% - left_join(reserveTypes) %>% - filter(reserveType == "Non-Stable") - -borrowsToRepaysNonStableFit <- survfit(Surv(as.numeric(timeDiff/86400), as.numeric(status)) ~ reserve, data=borrowsToRepaysNonStable) - -borrowsToRepaysNonStablePlot <- ggsurvplot(borrowsToRepaysNonStableFit, xlab="Time (days)", ylab="Probability of No Repays", title="How Long Do Users Wait to Repay Non-Stable Coins?", legend.title="", censor=FALSE, conf.int = FALSE) - -borrowsToRepaysNonStablePlot -``` - -```{r} -borrowsToRepaysSplit <- allBorrowsToRepays %>% - left_join(reserveTypes) - -borrowsToRepaysSplitFit <- survfit(Surv(as.numeric(timeDiff/86400), as.numeric(status)) ~ reserveType, data=borrowsToRepaysSplit) - -borrowsToRepaysSplitPlot <- ggsurvplot(borrowsToRepaysSplitFit, xlab="Time (days)", ylab="Probability of No Repays", censor=FALSE, conf.int = FALSE, legend.title = "Coin Type", legend.labs = c("Non-Stable", "Stable"), legend = c(0.8, 0.7)) - -borrowsToRepaysSplitPlot -``` - -```{r} -km_fitAllCoins <- survfit(Surv(as.numeric(timeDiff/86400), as.numeric(status))~reserve, data=allBorrowsToRepays) -medianTimeToRepay <- surv_median(km_fitAllCoins) %>% - arrange(median) - -kable(medianTimeToRepay) - -ggsurvplot(km_fitAllCoins, xlab="Time (days)", ylab="Probability of No Repays", title="How Long Do Users Wait to Start Repaying Loans?", legend = "none", censor = FALSE) -``` - -```{r} -medianTimeToRepay <- medianTimeToRepay %>% - mutate(reserve = str_sub(strata, start=9))%>% - left_join(reserveTypes) - -kable(medianTimeToRepay) - -densityPlotTimeToRepay <- medianTimeToRepay %>% - ggplot(aes(x=median, color=reserveType)) + geom_density() + - xlab("Time Elapsed Before Loan Repayment (in Days)") + - ylab("Proportion of Users") + theme_classic() + - labs(color = "Coin Type") - -densityPlotTimeToRepay -``` - -## Borrow To Liquidation Analysis: -```{r} -liquidations <- df %>% - filter(type == "liquidation") %>% - select(where(not_all_na)) - -borrowsToLiquidations <- left_join(borrows, liquidations, by = c("user")) %>% - rename(borrowTime = timestamp.x) %>% - rename(liquidationTime = timestamp.y) %>% - group_by(ID) %>% - mutate(status = case_when(borrowTime >= max(liquidationTime) ~ 0, - is.na(liquidationTime) ~ 0, - TRUE ~ 1)) %>% - distinct() - -censoredBorrowsToLiquidations <- borrowsToLiquidations %>% - filter(status == 0) %>% - group_by(ID) %>% - summarise(ID, user, timeDiff = timeFinal - borrowTime, status, reserve) %>% - distinct() - -uncensoredBorrowsToLiquidations <- borrowsToLiquidations %>% - filter(status == 1) %>% - filter(liquidationTime > borrowTime) %>% - summarise(ID, user, timeDiff = min(liquidationTime) - borrowTime, status, reserve) %>% - distinct() - -allBorrowsToLiquidations <- bind_rows(censoredBorrowsToLiquidations, uncensoredBorrowsToLiquidations) %>% - arrange(ID) - - -borrowToLiquidationsFit <- survfit(Surv(as.numeric(timeDiff/86400), as.numeric(status)) ~ 1, data=allBorrowsToLiquidations) - -borrowToLiquidationPlot <- ggsurvplot(borrowToLiquidationsFit, xlab = "Time (days)", ylab = "Probability of No Repayments", title="How Long Do Loans Last Before Being Liquidated?", legend = "none", censor=FALSE) - -borrowToLiquidationPlot -``` - - -```{r} -# Here we set up a survival curve representing all borrows. Any borrow that is followed at any time by the user being liquidated counts as a "death". Any borrow after which no liquidation has yet occurred for the same user is considered censored. -borrowsThatLiquidated <- left_join(borrows, liquidations, by = "user") %>% - rename(borrowTime = timestamp.x) %>% - rename(liquidationTime = timestamp.y) %>% - group_by(user, borrowTime) %>% - slice_min(liquidationTime) %>% - ungroup() %>% - select(liquidationTime, ID, principalReserve, collateralReserve) - -borrowsToLiquidations <- left_join(borrows, borrowsThatLiquidated, by = "ID") %>% - mutate(borrowTime = timestamp, borrowedReserve = reserve) %>% - select(user, borrowTime, liquidationTime, principalReserve, collateralReserve, borrowedReserve) %>% - mutate(timeDiff = case_when(!is.na(liquidationTime) ~ liquidationTime - borrowTime, - TRUE ~ borrowTime - timeFinal)) %>% - mutate(status = case_when(timeDiff <= 0 ~ 0, TRUE ~ 1)) %>% - mutate(timeDiff = abs(timeDiff)) %>% - distinct() - -borrowsToLiquidationTypes <- left_join(borrowsToLiquidations, reserveTypes, by = c("principalReserve" = "reserve")) %>% - rename('principalType' = 'reserveType')%>% - left_join(reserveTypes, by = c("collateralReserve" = "reserve")) %>% - rename(collateralType = reserveType) %>% - left_join(reserveTypes, by = c("borrowedReserve" = "reserve")) %>% - rename(borrowType = reserveType) - - -borrowsToLiquidationsFit <- survfit(Surv(timeDiff/86400, status) ~ borrowType, data=borrowsToLiquidationTypes) - -borrowsToLiquidationsPlot <- ggsurvplot(borrowsToLiquidationsFit, xlab="Time (Days)", ylab="Probability of Liquidation", legend.title="Principal Type", censor=FALSE, conf.int = FALSE, fun = "event", legend.labs = c("Non-Stable", "Stable"), legend = c(0.8,0.6)) - -borrowsToLiquidationsPlot - -``` - -```{r} -# Compute aggregate liquidations - -df2 <- left_join(df, reserveTypes, by="reserve") %>% - distinct() - -numLiqPerUser <- liquidations %>% - group_by(user) %>% - dplyr::summarise(numLiquidations = n()) - - -aggregateLiquidations <- df2 %>% - filter(user %in% numLiqPerUser$user) %>% # First, let's filter out all users who have never been liquidated. - group_by(user) %>% # The next set of logic is to sort users' transactions by timestamp and pull out all liquidations that are - arrange(timestamp) %>% # part of a consecutive set of liquidations. - mutate(nextTransaction = lead(type)) %>% - mutate(prevTransaction = lag(type)) %>% - filter(type == "liquidation" & (nextTransaction == "liquidation" | prevTransaction == "liquidation")) %>% - mutate(liquidationDay = floor_date(as_datetime(timestamp), unit = "day")) %>% # Then we want to use some approximation for the timeframe of this liquidation event, so we naively group consecutive liquidations by the day on which they took place. - group_by(user,liquidationDay) %>% # Doing this means that we can group by user and liquidationDay, which is functionally grouping by "liquidation event" - mutate(liquidationDuration = max(timestamp) - min(timestamp)) %>% # Now we can compute some basic stats about the event. - mutate(liquidationStart = min(timestamp), liquidationEnd = max(timestamp)) %>% - mutate(liquidationStartDatetime = as_datetime(liquidationStart), liquidationEndDatetime = as_datetime(liquidationEnd)) %>% - mutate(reserve = collateralReserve) %>% - left_join(reserveTypes, by = "reserve") %>% - dplyr::rename(collateralType = reserveType.y) %>% - mutate(reserve = principalReserve) %>% - left_join(reserveTypes, by = "reserve") %>% - dplyr::rename(principalType = reserveType) %>% - mutate(totalCollateralUSD = sum(amountUSDCollateral), totalPrincipalUSD = sum(amountUSDPrincipal))%>% - dplyr::mutate(numLiquidations = n()) %>% - dplyr::summarise(userAlias, numLiquidations, liquidationDuration, liquidationStart, liquidationEnd, liquidationStartDatetime, liquidationEndDatetime, - collateralReserves = str_flatten(str_sort(unique(collateralReserve)), collapse = ","), - collateralTypes = str_flatten(str_sort(unique(collateralType)), collapse= ","), - principalReserves = str_flatten(str_sort(unique(principalReserve)), collapse = ","), - principalTypes = str_flatten(str_sort(unique(principalType)), collapse = ","), - totalCollateralUSD, totalPrincipalUSD, liquidationType = str_c(principalTypes, collateralTypes, sep = ":")) %>% - distinct() - -rm(df2) - - - -numAggregateLiqPerUser <- aggregateLiquidations %>% - group_by(user) %>% - summarise(userAlias, numLiquidations = n()) %>% - distinct() - -loanDataTimeToLiquidate <- left_join(borrows,aggregateLiquidations,by=c("user")) %>% - dplyr::rename(borrowTime=timestamp) %>% - dplyr::rename(liquidationTime=liquidationStart) %>% - group_by(user) %>% - filter(borrowTime <= liquidationTime) %>% - mutate(timeDiff=case_when(min(liquidationTime)-min(borrowTime)>0 ~ min(liquidationTime)-min(borrowTime), - TRUE ~ borrowTime - timeFinal)) %>% - mutate(status=case_when(timeDiff<=0 ~ 0, timeDiff>0 ~ 1)) %>% - mutate(timeDiff = abs(timeDiff))%>% - select(user,reserve,principalReserves,collateralReserves,principalTypes,collateralTypes,liquidationType,timeDiff,status) %>% - distinct() - -loanDataTimeToLiquidate <- left_join(loanDataTimeToLiquidate, reserveTypes, by="reserve") %>% - mutate(liquidationType2 = if_else(!is.na(collateralTypes), paste(reserveType, collateralTypes, sep=":"), "NA")) - -loanDataTimeToLiquidate$liquidationType2 <- na_if(loanDataTimeToLiquidate$liquidationType2, "NA") - -liquidationCounts <- loanDataTimeToLiquidate %>% - group_by(liquidationType) %>% - dplyr::summarise(liquidationCount = n()) %>% - arrange(-liquidationCount) %>% - head(7) - -liquidationCounts - -``` - -```{r} -loanDataTimeToLiquidate$principalTypes <- as.factor(loanDataTimeToLiquidate$principalTypes) - -loanDataTimeToLiquidate$principalTypes <- fct_relevel(loanDataTimeToLiquidate$principalTypes, c("Non-Stable,Stable", "Non-Stable", "Stable")) - -loanDataTimeToLiquidate$collateralTypes <- as.factor(loanDataTimeToLiquidate$collateralTypes) - -loanDataTimeToLiquidate$collateralTypes <- fct_relevel(loanDataTimeToLiquidate$collateralTypes, c("Non-Stable,Stable", "Non-Stable", "Stable")) - -loanDataTimeToLiquidate <- loanDataTimeToLiquidate %>% - mutate(principalStable = (principalTypes == "Stable" | principalTypes == "Non-Stable,Stable"), principalNonStable = (principalTypes == "Non-Stable" | principalTypes == "Non-Stable,Stable")) %>% - mutate(collateralStable = (collateralTypes == "Stable" | collateralTypes == "Non-Stable,Stable"), collateralNonStable = (collateralTypes == "Non-Stable" | collateralTypes == "Non-Stable,Stable")) - - -loanDataTimeToLiquidate <- loanDataTimeToLiquidate %>% - mutate(timeDiffDays = as.numeric(timeDiff/86400)) %>% - mutate(timeDiffWeeks = as.numeric(timeDiffDays/7)) -km_fitTimeToLiquidate <- survfit(Surv(timeDiffDays, as.numeric(status)) ~ liquidationType2, data=loanDataTimeToLiquidate) - -originalCoxFit <- coxph(Surv(timeDiffDays, as.numeric(status)) ~ liquidationType, data = loanDataTimeToLiquidate) -originalCoxFit - -loanDataTimeToLiquidate$liquidationType2 <- as.factor(loanDataTimeToLiquidate$liquidationType2) - - -coxFit <- coxph(Surv(timeDiffDays, as.numeric(status)) ~ liquidationType2, data = loanDataTimeToLiquidate) -coxFit - -coxFitWithInteractionTerm <- coxph(Surv(timeDiffDays, as.numeric(status)) ~ principalStable*collateralStable + principalStable*collateralNonStable + principalNonStable*collateralStable + principalNonStable*collateralNonStable, data = loanDataTimeToLiquidate) -coxFitWithInteractionTerm - -kmPlotTimeToLiquidate <- ggsurvplot(km_fitTimeToLiquidate, xlab="Time (Days)", ylab="Probability of No Liquidation", legend.title="Principal:Collateral", censor=FALSE, conf.int = FALSE, legend=c(0.8,0.6), legend.labs = c("Non-Stable: Non-Stable", "Non-Stable: Mixed", "Non-Stable: Stable", "Stable: Non-Stable", "Stable: Mixed", "Stable: Stable")) - -kmPlotTimeToLiquidate -``` - - -# Let's factor in the quartile of the loan amount into our analysis: - -```{r} -borrowSummaries <- borrows %>% - summarize(quantilesUSD = quantile(amountUSD, c(0.25, 0.5, 0.75)), - quantilesETH = quantile(amountETH, c(0.25, 0.5, 0.75))) - -borrowsWithQuantiles <- borrows %>% - mutate(amountUSDQuartile = case_when(amountUSD < borrowSummaries$quantilesUSD[1] ~ 1, - amountUSD >= borrowSummaries$quantilesUSD[1] & amountUSD < borrowSummaries$quantilesUSD[2] ~ 2, - amountUSD >= borrowSummaries$quantilesUSD[2] & amountUSD < borrowSummaries$quantilesUSD[3] ~ 3, - amountUSD >= borrowSummaries$quantilesUSD[3] ~ 4)) - -borrowsToRepays <- left_join(borrowsWithQuantiles, repays, by = c("user", "reserve")) %>% - rename(borrowTime = timestamp.x) %>% - rename(repayTime = timestamp.y) %>% - group_by(ID) %>% - mutate(status = case_when(borrowTime >= max(repayTime) ~ 0, - is.na(repayTime) ~ 0, - TRUE ~ 1)) %>% - distinct() - -censoredBorrows <- borrowsToRepays %>% - filter(status == 0) %>% - group_by(ID) %>% - summarise(ID, user, timeDiff = timeFinal - borrowTime, status, reserve, amountUSDQuartile) %>% - distinct() - -uncensoredBorrows <- borrowsToRepays %>% - filter(status == 1) %>% - filter(repayTime > borrowTime) %>% - summarise(ID, user, timeDiff = min(repayTime) - borrowTime, status, reserve, amountUSDQuartile) %>% - distinct() - -allBorrowsToRepays <- bind_rows(censoredBorrows, uncensoredBorrows) %>% - arrange(ID) - - -borrowToRepayFit <- survfit(Surv(as.numeric(timeDiff/86400), as.numeric(status)) ~ amountUSDQuartile, data=allBorrowsToRepays) - -borrowToRepayPlot <- ggsurvplot(borrowToRepayFit, xlab = "Time (days)", ylab = "Probability of No Repayments", title="How Long Do Users Wait to Repay Loans?", censor=FALSE, legend = c(0.8, 0.6), conf.int = TRUE) - -borrowToRepayPlot - -``` - - - -```{r} -loanDataTimeToLiquidate <- left_join(borrowsWithQuantiles,aggregateLiquidations,by=c("user")) %>% - dplyr::rename(borrowTime=timestamp) %>% - dplyr::rename(liquidationTime=liquidationStart) %>% - group_by(user) %>% - filter(borrowTime <= liquidationTime) %>% - mutate(timeDiff=case_when(min(liquidationTime)-min(borrowTime)>0 ~ min(liquidationTime)-min(borrowTime), - TRUE ~ borrowTime - timeFinal)) %>% - mutate(status=case_when(timeDiff<=0 ~ 0, timeDiff>0 ~ 1)) %>% - mutate(timeDiff = abs(timeDiff))%>% - select(user,reserve,principalReserves,collateralReserves,principalTypes,collateralTypes,liquidationType,timeDiff,status,amountUSDQuartile) %>% - distinct() - - -loanDataTimeToLiquidate <- loanDataTimeToLiquidate %>% - mutate(timeDiffDays = as.numeric(timeDiff/86400)) %>% - mutate(timeDiffWeeks = as.numeric(timeDiffDays/7)) -km_fitTimeToLiquidate <- survfit(Surv(timeDiffDays, as.numeric(status)) ~ amountUSDQuartile, data=loanDataTimeToLiquidate) - -kmPlotTimeToLiquidate <- ggsurvplot(km_fitTimeToLiquidate, xlab="Time (Days)", ylab="Probability of No Liquidation", legend.title="Loan Amount Quartile", censor=FALSE, conf.int = FALSE, legend=c(0.8,0.6)) - -kmPlotTimeToLiquidate -``` - -````{r} -borrowsWithQuantiles <- borrows %>% - mutate(amountUSDQuartile = case_when(amountUSD < borrowSummaries$quantilesUSD[1] ~ 1, - amountUSD >= borrowSummaries$quantilesUSD[1] & amountUSD < borrowSummaries$quantilesUSD[2] ~ 2, - amountUSD >= borrowSummaries$quantilesUSD[2] & amountUSD < borrowSummaries$quantilesUSD[3] ~ 3, - amountUSD >= borrowSummaries$quantilesUSD[3] ~ 4)) - -borrowsToRepays <- left_join(borrowsWithQuantiles, repays, by = c("user", "reserve")) %>% - rename(borrowTime = timestamp.x) %>% - rename(repayTime = timestamp.y) %>% - group_by(ID) %>% - mutate(status = case_when(borrowTime >= max(repayTime) ~ 0, - is.na(repayTime) ~ 0, - TRUE ~ 1)) %>% - distinct() - -censoredBorrows <- borrowsToRepays %>% - filter(status == 0) %>% - group_by(ID) %>% - summarise(ID, user, timeDiff = timeFinal - borrowTime, status, reserve, amountUSDQuartile) %>% - distinct() - -uncensoredBorrows <- borrowsToRepays %>% - filter(status == 1) %>% - filter(repayTime > borrowTime) %>% - summarise(ID, user, timeDiff = min(repayTime) - borrowTime, status, reserve, amountUSDQuartile) %>% - distinct() - -allBorrowsToRepays <- bind_rows(censoredBorrows, uncensoredBorrows) %>% - arrange(ID) - - -borrowToRepayFit <- survfit(Surv(as.numeric(timeDiff/86400), as.numeric(status)) ~ amountUSDQuartile, data=allBorrowsToRepays) - -borrowToRepayPlot <- ggsurvplot(borrowToRepayFit, xlab = "Time (days)", ylab = "Probability of No Repayments", title="How Long Do Users Wait to Start to Repay Loans?", censor=FALSE, legend = c(0.8, 0.6), conf.int = TRUE) - -borrowToRepayPlot - -``` - - - -```{r} -loanDataTimeToLiquidate <- left_join(borrowsWithQuantiles,aggregateLiquidations,by=c("user")) %>% - dplyr::rename(borrowTime=timestamp) %>% - dplyr::rename(liquidationTime=liquidationStart) %>% - group_by(user) %>% - filter(borrowTime <= liquidationTime) %>% - mutate(timeDiff=case_when(min(liquidationTime)-min(borrowTime)>0 ~ min(liquidationTime)-min(borrowTime), - TRUE ~ borrowTime - timeFinal)) %>% - mutate(status=case_when(timeDiff<=0 ~ 0, timeDiff>0 ~ 1)) %>% - mutate(timeDiff = abs(timeDiff))%>% - select(user,reserve,principalReserves,collateralReserves,principalTypes,collateralTypes,liquidationType,timeDiff,status,amountUSDQuartile) %>% - distinct() - - -loanDataTimeToLiquidate <- loanDataTimeToLiquidate %>% - mutate(timeDiffDays = as.numeric(timeDiff/86400)) %>% - mutate(timeDiffWeeks = as.numeric(timeDiffDays/7)) -km_fitTimeToLiquidate <- survfit(Surv(timeDiffDays, as.numeric(status)) ~ amountUSDQuartile, data=loanDataTimeToLiquidate) - -kmPlotTimeToLiquidate <- ggsurvplot(km_fitTimeToLiquidate, xlab="Time (Days)", ylab="Probability of No Liquidation", legend.title="Loan Amount Quartile", censor=FALSE, conf.int = FALSE, legend=c(0.8,0.6), title = "How Does Loan Amount Affect Time to Liquidation?") - -kmPlotTimeToLiquidate - -``` -# Calculate time until each borrow has been fully repaid: -```{r} -borrowsFullyRepaid <- borrowsWithQuantiles %>% - group_by(ID) %>% - left_join(repays, by = c("user","reserve")) %>% - filter(timestamp.y >= timestamp.x) %>% - arrange(timestamp.y) %>% - mutate(amountRepaid = cumsum(amount.y)) %>% - filter(amountRepaid >= amount.x) %>% - slice_head() %>% - summarize(ID, amountRepaid, repaidTime = timestamp.y) - -borrowsFullyRepaidSurvival <- borrowsWithQuantiles %>% - left_join(borrowsFullyRepaid, by = "ID") %>% - mutate(repaid = case_when(is.na(repaidTime) ~ 0, - TRUE ~ 1), - timeToRepay = case_when(repaid == 0 ~ timeFinal - timestamp, - repaid == 1 ~ repaidTime - timestamp)) %>% - mutate(timeDiffDays = as.numeric(timeToRepay / 86400), - timeDiffWeeks = as.numeric(timeDiffDays/7)) - -borrowsFullyRepaidFit <- survfit(Surv(timeDiffDays, as.numeric(repaid)) ~ amountUSDQuartile, data = borrowsFullyRepaidSurvival) -bfrPlot <- ggsurvplot(borrowsToFullRepays, xlab="Time (Days)", ylab="Probability of Outstanding Balance", legend.title="Loan Amount Quartile", censor=FALSE, conf.int = TRUE, legend=c(0.8,0.6), title = "How Long Do Users Take to Repay Loans Entirely?") - -bfrPlot -``` - -# Following the repayment of a loan, how quickly do users withdraw from AAVE? -```{r} -repays <- repays %>% - mutate(ID = row_number()) - -repaysToRedeems <- repays %>% - group_by(ID) %>% - left_join(redeems, by = "user") %>% - filter(timestamp.y >= timestamp.x) %>% - arrange(timestamp.y) %>% - slice_head() %>% - summarize(ID, timeToRedeem = timestamp.y - timestamp.x, repaymentTime = timestamp.x) - -repaysToRedeemsSurvival <- repays %>% - left_join(repaysToRedeems, by = "ID") %>% - mutate(status = case_when(is.na(timetoRedeem) ~ 0, - TRUE ~ 1)) %>% - mutate(timeDiff = case_when(status == 1 ~ timeToRedeem)) - -``` \ No newline at end of file diff --git a/dataLoaders/loadAaveData.r b/dataLoaders/loadAaveData.r deleted file mode 100644 index ccb532aa..00000000 --- a/dataLoaders/loadAaveData.r +++ /dev/null @@ -1,43 +0,0 @@ -# This script provides an easy way to load a set of AAVE dataframes. -library(readr) -aavePath = "/data/IDEA_DeFi_Summer2022/Aave/" - -# If the specified deployment is "mainnet" or "all", load from mainnet data: -if(deployment == "all" | deployment == "mainnet"){ - - mainnetPath = "mainnet/" - - # Load the appropriate dataframes depending on what has been selected: - if(type == "all" | type == "transactions"){ - aaveMainnetTransactions <- read_csv(paste(aavePath, mainnetPath, "transactions.csv", sep="")) - } - - if(type == "all" | type == "reserveInfo"){ - aaveMainnetReserveInfo <- read_csv(paste(aavePath, mainnetPath, "reserveInfo.csv", sep="")) - } - - if(type == "all" | type == "reserveParamsHistory"){ - aaveMainnetReserveParamsHistory <- read_csv(paste(aavePath, mainnetPath, "reserveParamsHistory.csv", sep="")) - } - -} - -# If the specified deployment is "matic" or "all", load matic data: -if(deployment == "all" | deployment == "matic"){ - - maticPath = "matic/" - - # Load the appropriate dataframes depending on what has been selected: - if(type == "all" | type == "transactions"){ - aaveMaticTransactions <- read_csv(paste(aavePath, maticPath, "transactions.csv", sep="")) - } - - if(type == "all" | type == "reserveInfo"){ - aaveMaticReserveInfo <- read_csv(paste(aavePath, maticPath, "reserveInfo.csv", sep="")) - } - - if(type == "all" | type == "reserveParamsHistory"){ - aaveMaticReserveParamsHistory <- read_csv(paste(aavePath, maticPath, "reserveParamsHistory.csv", sep="")) - } - -}