From 28fed8d4022e8d5b4395c8ab3805540b0a55b9bb Mon Sep 17 00:00:00 2001 From: Samruddhi Adhikary <136476753+Samruddhi345A@users.noreply.github.com> Date: Thu, 17 Apr 2025 23:49:23 +0530 Subject: [PATCH 1/3] Create README.md --- Team 66 CodeCrushers/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 Team 66 CodeCrushers/README.md diff --git a/Team 66 CodeCrushers/README.md b/Team 66 CodeCrushers/README.md new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/Team 66 CodeCrushers/README.md @@ -0,0 +1 @@ + From a08537c184c927c06caefa73749c9712cb2e65d0 Mon Sep 17 00:00:00 2001 From: Samruddhi Adhikary <136476753+Samruddhi345A@users.noreply.github.com> Date: Thu, 17 Apr 2025 23:54:20 +0530 Subject: [PATCH 2/3] Project Upload Files uploaded --- Team 66 CodeCrushers/demo/HELP.md | 31 +++ Team 66 CodeCrushers/demo/mvnw | 259 ++++++++++++++++++ Team 66 CodeCrushers/demo/mvnw.cmd | 149 ++++++++++ Team 66 CodeCrushers/demo/pom.xml | 87 ++++++ .../src/main/java/loop/demo/Annotation.java | 34 +++ .../main/java/loop/demo/DemoApplication.java | 11 + .../main/java/loop/demo/DocumentGraph.java | 91 ++++++ .../demo/HistoricalVersionControlSys.java | 127 +++++++++ .../src/main/java/loop/demo/Manuscript.java | 80 ++++++ .../java/loop/demo/ReconstructionTheory.java | 60 ++++ .../src/main/java/loop/demo/Relationship.java | 46 ++++ .../src/main/java/loop/demo/TextVersion.java | 50 ++++ .../main/java/loop/demo/WebController.java | 110 ++++++++ .../src/main/resources/application.properties | 1 + .../resources/templates/graphDetails.html | 64 +++++ .../src/main/resources/templates/index.html | 94 +++++++ .../resources/templates/theoryDetails.html | 30 ++ .../resources/templates/versionDetails.html | 33 +++ .../java/loop/demo/DemoApplicationTests.java | 13 + .../target/classes/application.properties | 1 + .../target/classes/loop/demo/Annotation.class | Bin 0 -> 1570 bytes .../classes/loop/demo/DocumentGraph.class | Bin 0 -> 4117 bytes .../demo/HistoricalVersionControlSys.class | Bin 0 -> 5801 bytes .../target/classes/loop/demo/Manuscript.class | Bin 0 -> 2521 bytes .../loop/demo/ReconstructionTheory.class | Bin 0 -> 2942 bytes .../classes/loop/demo/Relationship.class | Bin 0 -> 2534 bytes .../classes/loop/demo/TextVersion.class | Bin 0 -> 2676 bytes .../classes/loop/demo/WebController.class | Bin 0 -> 6242 bytes .../classes/templates/graphDetails.html | 64 +++++ .../demo/target/classes/templates/index.html | 94 +++++++ .../classes/templates/theoryDetails.html | 30 ++ .../classes/templates/versionDetails.html | 33 +++ .../compile/default-compile/createdFiles.lst | 0 .../compile/default-compile/inputFiles.lst | 10 + .../default-testCompile/createdFiles.lst | 0 .../default-testCompile/inputFiles.lst | 1 + .../loop/demo/DemoApplicationTests.class | Bin 0 -> 517 bytes 37 files changed, 1603 insertions(+) create mode 100644 Team 66 CodeCrushers/demo/HELP.md create mode 100644 Team 66 CodeCrushers/demo/mvnw create mode 100644 Team 66 CodeCrushers/demo/mvnw.cmd create mode 100644 Team 66 CodeCrushers/demo/pom.xml create mode 100644 Team 66 CodeCrushers/demo/src/main/java/loop/demo/Annotation.java create mode 100644 Team 66 CodeCrushers/demo/src/main/java/loop/demo/DemoApplication.java create mode 100644 Team 66 CodeCrushers/demo/src/main/java/loop/demo/DocumentGraph.java create mode 100644 Team 66 CodeCrushers/demo/src/main/java/loop/demo/HistoricalVersionControlSys.java create mode 100644 Team 66 CodeCrushers/demo/src/main/java/loop/demo/Manuscript.java create mode 100644 Team 66 CodeCrushers/demo/src/main/java/loop/demo/ReconstructionTheory.java create mode 100644 Team 66 CodeCrushers/demo/src/main/java/loop/demo/Relationship.java create mode 100644 Team 66 CodeCrushers/demo/src/main/java/loop/demo/TextVersion.java create mode 100644 Team 66 CodeCrushers/demo/src/main/java/loop/demo/WebController.java create mode 100644 Team 66 CodeCrushers/demo/src/main/resources/application.properties create mode 100644 Team 66 CodeCrushers/demo/src/main/resources/templates/graphDetails.html create mode 100644 Team 66 CodeCrushers/demo/src/main/resources/templates/index.html create mode 100644 Team 66 CodeCrushers/demo/src/main/resources/templates/theoryDetails.html create mode 100644 Team 66 CodeCrushers/demo/src/main/resources/templates/versionDetails.html create mode 100644 Team 66 CodeCrushers/demo/src/test/java/loop/demo/DemoApplicationTests.java create mode 100644 Team 66 CodeCrushers/demo/target/classes/application.properties create mode 100644 Team 66 CodeCrushers/demo/target/classes/loop/demo/Annotation.class create mode 100644 Team 66 CodeCrushers/demo/target/classes/loop/demo/DocumentGraph.class create mode 100644 Team 66 CodeCrushers/demo/target/classes/loop/demo/HistoricalVersionControlSys.class create mode 100644 Team 66 CodeCrushers/demo/target/classes/loop/demo/Manuscript.class create mode 100644 Team 66 CodeCrushers/demo/target/classes/loop/demo/ReconstructionTheory.class create mode 100644 Team 66 CodeCrushers/demo/target/classes/loop/demo/Relationship.class create mode 100644 Team 66 CodeCrushers/demo/target/classes/loop/demo/TextVersion.class create mode 100644 Team 66 CodeCrushers/demo/target/classes/loop/demo/WebController.class create mode 100644 Team 66 CodeCrushers/demo/target/classes/templates/graphDetails.html create mode 100644 Team 66 CodeCrushers/demo/target/classes/templates/index.html create mode 100644 Team 66 CodeCrushers/demo/target/classes/templates/theoryDetails.html create mode 100644 Team 66 CodeCrushers/demo/target/classes/templates/versionDetails.html create mode 100644 Team 66 CodeCrushers/demo/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst create mode 100644 Team 66 CodeCrushers/demo/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst create mode 100644 Team 66 CodeCrushers/demo/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst create mode 100644 Team 66 CodeCrushers/demo/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst create mode 100644 Team 66 CodeCrushers/demo/target/test-classes/loop/demo/DemoApplicationTests.class diff --git a/Team 66 CodeCrushers/demo/HELP.md b/Team 66 CodeCrushers/demo/HELP.md new file mode 100644 index 00000000..36d63e2f --- /dev/null +++ b/Team 66 CodeCrushers/demo/HELP.md @@ -0,0 +1,31 @@ +# Getting Started + +### Reference Documentation +For further reference, please consider the following sections: + +* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html) +* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/3.4.4/maven-plugin) +* [Create an OCI image](https://docs.spring.io/spring-boot/3.4.4/maven-plugin/build-image.html) +* [Spring Boot DevTools](https://docs.spring.io/spring-boot/3.4.4/reference/using/devtools.html) +* [Spring Web](https://docs.spring.io/spring-boot/3.4.4/reference/web/servlet.html) +* [Spring Session](https://docs.spring.io/spring-session/reference/) +* [htmx](https://github.com/wimdeblauwe/htmx-spring-boot) +* [Spring Data MongoDB](https://docs.spring.io/spring-boot/3.4.4/reference/data/nosql.html#data.nosql.mongodb) + +### Guides +The following guides illustrate how to use some features concretely: + +* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/) +* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/) +* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/) +* [htmx](https://www.youtube.com/watch?v=j-rfPoXe5aE) +* [Accessing Data with MongoDB](https://spring.io/guides/gs/accessing-data-mongodb/) +* [Accessing data with MySQL](https://spring.io/guides/gs/accessing-data-mysql/) + +### Maven Parent overrides + +Due to Maven's design, elements are inherited from the parent POM to the project POM. +While most of the inheritance is fine, it also inherits unwanted elements like `` and `` from the parent. +To prevent this, the project POM contains empty overrides for these elements. +If you manually switch to a different parent and actually want the inheritance, you need to remove those overrides. + diff --git a/Team 66 CodeCrushers/demo/mvnw b/Team 66 CodeCrushers/demo/mvnw new file mode 100644 index 00000000..19529ddf --- /dev/null +++ b/Team 66 CodeCrushers/demo/mvnw @@ -0,0 +1,259 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Apache Maven Wrapper startup batch script, version 3.3.2 +# +# Optional ENV vars +# ----------------- +# JAVA_HOME - location of a JDK home dir, required when download maven via java source +# MVNW_REPOURL - repo url base for downloading maven distribution +# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output +# ---------------------------------------------------------------------------- + +set -euf +[ "${MVNW_VERBOSE-}" != debug ] || set -x + +# OS specific support. +native_path() { printf %s\\n "$1"; } +case "$(uname)" in +CYGWIN* | MINGW*) + [ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" + native_path() { cygpath --path --windows "$1"; } + ;; +esac + +# set JAVACMD and JAVACCMD +set_java_home() { + # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched + if [ -n "${JAVA_HOME-}" ]; then + if [ -x "$JAVA_HOME/jre/sh/java" ]; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACCMD="$JAVA_HOME/jre/sh/javac" + else + JAVACMD="$JAVA_HOME/bin/java" + JAVACCMD="$JAVA_HOME/bin/javac" + + if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then + echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 + echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 + return 1 + fi + fi + else + JAVACMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v java + )" || : + JAVACCMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v javac + )" || : + + if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then + echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 + return 1 + fi + fi +} + +# hash string like Java String::hashCode +hash_string() { + str="${1:-}" h=0 + while [ -n "$str" ]; do + char="${str%"${str#?}"}" + h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) + str="${str#?}" + done + printf %x\\n $h +} + +verbose() { :; } +[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } + +die() { + printf %s\\n "$1" >&2 + exit 1 +} + +trim() { + # MWRAPPER-139: + # Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. + # Needed for removing poorly interpreted newline sequences when running in more + # exotic environments such as mingw bash on Windows. + printf "%s" "${1}" | tr -d '[:space:]' +} + +# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties +while IFS="=" read -r key value; do + case "${key-}" in + distributionUrl) distributionUrl=$(trim "${value-}") ;; + distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; + esac +done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties" +[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties" + +case "${distributionUrl##*/}" in +maven-mvnd-*bin.*) + MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ + case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in + *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; + :Darwin*x86_64) distributionPlatform=darwin-amd64 ;; + :Darwin*arm64) distributionPlatform=darwin-aarch64 ;; + :Linux*x86_64*) distributionPlatform=linux-amd64 ;; + *) + echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 + distributionPlatform=linux-amd64 + ;; + esac + distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" + ;; +maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; +*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; +esac + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ +[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" +distributionUrlName="${distributionUrl##*/}" +distributionUrlNameMain="${distributionUrlName%.*}" +distributionUrlNameMain="${distributionUrlNameMain%-bin}" +MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" +MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" + +exec_maven() { + unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : + exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" +} + +if [ -d "$MAVEN_HOME" ]; then + verbose "found existing MAVEN_HOME at $MAVEN_HOME" + exec_maven "$@" +fi + +case "${distributionUrl-}" in +*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; +*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; +esac + +# prepare tmp dir +if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then + clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } + trap clean HUP INT TERM EXIT +else + die "cannot create temp dir" +fi + +mkdir -p -- "${MAVEN_HOME%/*}" + +# Download and Install Apache Maven +verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +verbose "Downloading from: $distributionUrl" +verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +# select .zip or .tar.gz +if ! command -v unzip >/dev/null; then + distributionUrl="${distributionUrl%.zip}.tar.gz" + distributionUrlName="${distributionUrl##*/}" +fi + +# verbose opt +__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' +[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v + +# normalize http auth +case "${MVNW_PASSWORD:+has-password}" in +'') MVNW_USERNAME='' MVNW_PASSWORD='' ;; +has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; +esac + +if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then + verbose "Found wget ... using wget" + wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" +elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then + verbose "Found curl ... using curl" + curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" +elif set_java_home; then + verbose "Falling back to use Java to download" + javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" + targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" + cat >"$javaSource" <<-END + public class Downloader extends java.net.Authenticator + { + protected java.net.PasswordAuthentication getPasswordAuthentication() + { + return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); + } + public static void main( String[] args ) throws Exception + { + setDefault( new Downloader() ); + java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); + } + } + END + # For Cygwin/MinGW, switch paths to Windows format before running javac and java + verbose " - Compiling Downloader.java ..." + "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" + verbose " - Running Downloader.java ..." + "$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" +fi + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +if [ -n "${distributionSha256Sum-}" ]; then + distributionSha256Result=false + if [ "$MVN_CMD" = mvnd.sh ]; then + echo "Checksum validation is not supported for maven-mvnd." >&2 + echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + elif command -v sha256sum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then + distributionSha256Result=true + fi + elif command -v shasum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then + distributionSha256Result=true + fi + else + echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 + echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + fi + if [ $distributionSha256Result = false ]; then + echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 + echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 + exit 1 + fi +fi + +# unzip and move +if command -v unzip >/dev/null; then + unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" +else + tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" +fi +printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url" +mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" + +clean || : +exec_maven "$@" diff --git a/Team 66 CodeCrushers/demo/mvnw.cmd b/Team 66 CodeCrushers/demo/mvnw.cmd new file mode 100644 index 00000000..249bdf38 --- /dev/null +++ b/Team 66 CodeCrushers/demo/mvnw.cmd @@ -0,0 +1,149 @@ +<# : batch portion +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Apache Maven Wrapper startup batch script, version 3.3.2 +@REM +@REM Optional ENV vars +@REM MVNW_REPOURL - repo url base for downloading maven distribution +@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output +@REM ---------------------------------------------------------------------------- + +@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) +@SET __MVNW_CMD__= +@SET __MVNW_ERROR__= +@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% +@SET PSModulePath= +@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( + IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) +) +@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% +@SET __MVNW_PSMODULEP_SAVE= +@SET __MVNW_ARG0_NAME__= +@SET MVNW_USERNAME= +@SET MVNW_PASSWORD= +@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*) +@echo Cannot start maven from wrapper >&2 && exit /b 1 +@GOTO :EOF +: end batch / begin powershell #> + +$ErrorActionPreference = "Stop" +if ($env:MVNW_VERBOSE -eq "true") { + $VerbosePreference = "Continue" +} + +# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties +$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl +if (!$distributionUrl) { + Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" +} + +switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { + "maven-mvnd-*" { + $USE_MVND = $true + $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" + $MVN_CMD = "mvnd.cmd" + break + } + default { + $USE_MVND = $false + $MVN_CMD = $script -replace '^mvnw','mvn' + break + } +} + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ +if ($env:MVNW_REPOURL) { + $MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" } + $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')" +} +$distributionUrlName = $distributionUrl -replace '^.*/','' +$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' +$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain" +if ($env:MAVEN_USER_HOME) { + $MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain" +} +$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' +$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" + +if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { + Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" + Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" + exit $? +} + +if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { + Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" +} + +# prepare tmp dir +$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile +$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" +$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null +trap { + if ($TMP_DOWNLOAD_DIR.Exists) { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } + } +} + +New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null + +# Download and Install Apache Maven +Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +Write-Verbose "Downloading from: $distributionUrl" +Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +$webclient = New-Object System.Net.WebClient +if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { + $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) +} +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 +$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum +if ($distributionSha256Sum) { + if ($USE_MVND) { + Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." + } + Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash + if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { + Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." + } +} + +# unzip and move +Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null +Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null +try { + Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null +} catch { + if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { + Write-Error "fail to move MAVEN_HOME" + } +} finally { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } +} + +Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" diff --git a/Team 66 CodeCrushers/demo/pom.xml b/Team 66 CodeCrushers/demo/pom.xml new file mode 100644 index 00000000..9ba29d5d --- /dev/null +++ b/Team 66 CodeCrushers/demo/pom.xml @@ -0,0 +1,87 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 3.4.4 + + + loop + demo + 0.0.1-SNAPSHOT + demo + Demo project for Spring Boot + + + + + + + + + + + + + + + 17 + + + + org.springframework.boot + spring-boot-starter-data-mongodb + + + org.springframework.boot + spring-boot-starter-web + + + io.github.wimdeblauwe + htmx-spring-boot + 4.0.1 + + + org.springframework.session + spring-session-core + + + + + org.springframework.boot + spring-boot-devtools + runtime + true + + + com.mysql + mysql-connector-j + runtime + + + org.springframework.boot + spring-boot-starter-test + test + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/Team 66 CodeCrushers/demo/src/main/java/loop/demo/Annotation.java b/Team 66 CodeCrushers/demo/src/main/java/loop/demo/Annotation.java new file mode 100644 index 00000000..30619f80 --- /dev/null +++ b/Team 66 CodeCrushers/demo/src/main/java/loop/demo/Annotation.java @@ -0,0 +1,34 @@ +package loop.demo; + +public class Annotation { + private String id; + private String content; + private String author; + private String targetId; + private String targetType; + + // Constructor + public Annotation(String id, String content, String author, String targetId, String targetType) { + this.id = id; + this.content = content; + this.author = author; + this.targetId = targetId; + this.targetType = targetType; + } + + // Getters and setters + public String getId() { return id; } + public void setId(String id) { this.id = id; } + + public String getContent() { return content; } + public void setContent(String content) { this.content = content; } + + public String getAuthor() { return author; } + public void setAuthor(String author) { this.author = author; } + + public String getTargetId() { return targetId; } + public void setTargetId(String targetId) { this.targetId = targetId; } + + public String getTargetType() { return targetType; } + public void setTargetType(String targetType) { this.targetType = targetType; } +} diff --git a/Team 66 CodeCrushers/demo/src/main/java/loop/demo/DemoApplication.java b/Team 66 CodeCrushers/demo/src/main/java/loop/demo/DemoApplication.java new file mode 100644 index 00000000..d2192100 --- /dev/null +++ b/Team 66 CodeCrushers/demo/src/main/java/loop/demo/DemoApplication.java @@ -0,0 +1,11 @@ +// package loop.demo; + +// import org.springframework.boot.SpringApplication; +// import org.springframework.boot.autoconfigure.SpringBootApplication; + +// @SpringBootApplication +// public class DemoApplication { +// public static void main(String[] args) { +// SpringApplication.run(DemoApplication.class, args); +// } +// } \ No newline at end of file diff --git a/Team 66 CodeCrushers/demo/src/main/java/loop/demo/DocumentGraph.java b/Team 66 CodeCrushers/demo/src/main/java/loop/demo/DocumentGraph.java new file mode 100644 index 00000000..9daf3dba --- /dev/null +++ b/Team 66 CodeCrushers/demo/src/main/java/loop/demo/DocumentGraph.java @@ -0,0 +1,91 @@ +package loop.demo; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.springframework.stereotype.Component; + +public class DocumentGraph { + private String id; // Unique identifier for the graph + private Map versions; + private List relationships; + private Map annotations; + private Map manuscripts; + private List theories; // List to hold theories + + // Constructor + public DocumentGraph(String id) { + this.id = id; + this.versions = new HashMap<>(); + this.relationships = new ArrayList<>(); + this.annotations = new HashMap<>(); + this.manuscripts = new HashMap<>(); + this.theories = new ArrayList<>(); // Initialize the theories list + } + + // Methods to add items + public void addTheory(ReconstructionTheory theory) { + theories.add(theory); + } + + public List getAllTheories() { + return theories; + } + // Getter for ID + public String getId() { + return id; + } + + // Methods to add items + public void addVersion(TextVersion version) { + versions.put(version.getId(), version); + } + + public void addRelationship(Relationship relationship) { + relationships.add(relationship); + } + + public void addAnnotation(Annotation annotation) { + annotations.put(annotation.getId(), annotation); + } + + public void addManuscript(Manuscript manuscript) { + manuscripts.put(manuscript.getId(), manuscript); + } + + + // Methods to retrieve items + public TextVersion getVersion(String id) { + return versions.get(id); + } + + public List getAllVersions() { + return new ArrayList<>(versions.values()); + } + + // Methods to find related items + public List getRelationshipsForVersion(String versionId) { + List result = new ArrayList<>(); + for (Relationship rel : relationships) { + if (rel.getSource().getId().equals(versionId) || + rel.getTarget().getId().equals(versionId)) { + result.add(rel); + } + } + return result; + } + + public List getAnnotationsForVersion(String versionId) { + List result = new ArrayList<>(); + for (Annotation anno : annotations.values()) { + if (anno.getTargetId().equals(versionId) && + anno.getTargetType().equals("version")) { + result.add(anno); + } + } + return result; + } + + +} \ No newline at end of file diff --git a/Team 66 CodeCrushers/demo/src/main/java/loop/demo/HistoricalVersionControlSys.java b/Team 66 CodeCrushers/demo/src/main/java/loop/demo/HistoricalVersionControlSys.java new file mode 100644 index 00000000..682b3787 --- /dev/null +++ b/Team 66 CodeCrushers/demo/src/main/java/loop/demo/HistoricalVersionControlSys.java @@ -0,0 +1,127 @@ +package loop.demo; + +import java.util.ArrayList; +import java.util.List; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class HistoricalVersionControlSys { + + private final List graphs; + + public HistoricalVersionControlSys() { + this.graphs = new ArrayList<>(); + } + public static void main(String[] args) { + SpringApplication.run(HistoricalVersionControlSys.class, args); + } + + + public List getGraphs() { + return graphs; + } + + @jakarta.annotation.PostConstruct + private void initializeExampleData() { + // Create multiple graphs for different manuscripts + DocumentGraph manuscript1Graph = createManuscriptGraph1(); + DocumentGraph manuscript2Graph = createManuscriptGraph2(); + + // Add graphs to the list + graphs.add(manuscript1Graph); + graphs.add(manuscript2Graph); + } + + private DocumentGraph createManuscriptGraph1() { + DocumentGraph graph = new DocumentGraph("Mahabharat"); + + // Add versions for Manuscript 1 + TextVersion northern = new TextVersion("v1", "Northern Recension", "North India", + "1500-1700 CE", 90000, + "More extensive battle descriptions", 0.95); + TextVersion southern = new TextVersion("v2", "Southern Recension", "South India", + "1600-1800 CE", 95000, + "Additional philosophical sections", 0.9); + + graph.addVersion(northern); + graph.addVersion(southern); + + // Add relationships for Manuscript 1 + Relationship rel1 = new Relationship("r1", northern, southern, "regional variant", + 0.8, "Shares core narrative but with regional variations"); + graph.addRelationship(rel1); + + // Add annotations for Manuscript 1 + Annotation anno1 = new Annotation("a1", + "The Southern Recension contains philosophical material likely added after 1700 CE", + "Dr. Sharma", "v2", "version"); + graph.addAnnotation(anno1); + + // Add manuscripts for Manuscript 1 + Manuscript ms1 = new Manuscript("ms1", "v1", "British Museum", "Sanskrit", "1700 CE", "Good"); + graph.addManuscript(ms1); + // Create theories for Manuscript 1 + ReconstructionTheory theory1 = new ReconstructionTheory("t1", "Theory of Northern Influence", + "Dr. Smith", "2023", "This theory suggests that the Northern Recension influenced the Southern Recension."); + theory1.addVersion(northern); + theory1.addVersion(southern); + theory1.addRelationship(new Relationship("r1", northern, southern, "derived from", + 0.8, "Northern Recension influenced Southern Recension")); + + // Create a child theory for Northern Influence + ReconstructionTheory childTheory1 = new ReconstructionTheory("t1.1", "Sub-Theory of Northern Influence", + "Dr. Adams", "2024", "This sub-theory discusses specific examples of Northern influence on Southern texts."); + childTheory1.addVersion(northern); + childTheory1.addVersion(southern); + theory1.addChildTheory(childTheory1); // Add the child theory to the parent theory + + // Create another theory for Manuscript 1 + ReconstructionTheory theory2 = new ReconstructionTheory("t2", "Theory of Southern Influence", + "Dr. Jones", "2024", "This theory suggests that the Southern Recension influenced the Northern Recension."); + theory2.addVersion(northern); + theory2.addVersion(southern); + theory2.addRelationship(new Relationship("r2", southern, northern, "derived from", + 0.7, "Southern Recension influenced Northern Recension")); + + graph.addTheory(theory1); + graph.addTheory(theory2); // Add the second theory to the graph + + return graph; + } + + private DocumentGraph createManuscriptGraph2() { + DocumentGraph graph = new DocumentGraph("Ramayan"); + +// Add versions for Manuscript 2 +TextVersion bengali = new TextVersion("v3", "Bengali Recension", "Bengal", + "1700-1800 CE", 92000, + "The Bengali Recension of the Ramayana is known for its unique narrative style and regional adaptations, incorporating local folklore and cultural elements. It reflects the socio-political context of Bengal during the 18th century, emphasizing themes of devotion and morality.", 0.85); + +TextVersion critical = new TextVersion("v4", "Critical Edition", "Bhandarkar Institute", + "1919-1966 CE", 88000, + "The Critical Edition of the Ramayana, compiled by scholars at the Bhandarkar Institute, represents a comprehensive scholarly effort to collate and analyze various manuscripts of the text. This edition aims to provide a standardized version by comparing different recensions, highlighting textual variations, and offering critical commentary, thus serving as a foundational reference for future studies.", 1.0); + + graph.addVersion(bengali); + graph.addVersion(critical); + + // Add relationships for Manuscript 2 + Relationship rel2 = new Relationship("r2", critical, bengali, "derived from", + 0.9, "Critical edition heavily based on Bengali sources"); + graph.addRelationship(rel2); + + // Add annotations for Manuscript 2 + Annotation anno2 = new Annotation("a2", + "Bengali manuscript traditions show evidence of independent development", + "Prof. Das", "v3", "version"); + graph.addAnnotation(anno2); + + // Add manuscripts for Manuscript 2 + Manuscript ms2 = new Manuscript("ms2", "v2", "National Archives, India", "Sanskrit", "1800 CE", "Fair"); + graph.addManuscript(ms2); + + return graph; + } +} + diff --git a/Team 66 CodeCrushers/demo/src/main/java/loop/demo/Manuscript.java b/Team 66 CodeCrushers/demo/src/main/java/loop/demo/Manuscript.java new file mode 100644 index 00000000..38c916f2 --- /dev/null +++ b/Team 66 CodeCrushers/demo/src/main/java/loop/demo/Manuscript.java @@ -0,0 +1,80 @@ +package loop.demo; +public class Manuscript { + private String id; + private String name; + private String content; + private String versionId; + private String author; + private String date; + + // Updated constructor with more arguments + public Manuscript(String id, String name, String content, String versionId, String author, String date) { + this.id = id; + this.name = name; + this.content = content; + this.versionId = versionId; + this.author = author; + this.date = date; + } + + // Getters and Setters for all properties + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getVersionId() { + return versionId; + } + + public void setVersionId(String versionId) { + this.versionId = versionId; + } + + public String getAuthor() { + return author; + } + + public void setAuthor(String author) { + this.author = author; + } + + public String getDate() { + return date; + } + + public void setDate(String date) { + this.date = date; + } + + @Override + public String toString() { + return "Manuscript{" + + "id='" + id + '\'' + + ", name='" + name + '\'' + + ", content='" + content + '\'' + + ", versionId='" + versionId + '\'' + + ", author='" + author + '\'' + + ", date='" + date + '\'' + + '}'; + } +} diff --git a/Team 66 CodeCrushers/demo/src/main/java/loop/demo/ReconstructionTheory.java b/Team 66 CodeCrushers/demo/src/main/java/loop/demo/ReconstructionTheory.java new file mode 100644 index 00000000..717bf7d4 --- /dev/null +++ b/Team 66 CodeCrushers/demo/src/main/java/loop/demo/ReconstructionTheory.java @@ -0,0 +1,60 @@ +package loop.demo; + +import java.util.ArrayList; +import java.util.List; + +public class ReconstructionTheory { + private String id; + private String name; + private String scholar; + private String date; + private String description; + private List versions; // The versions associated with this theory + private List relationships; // Relationships specific to this theory + private List children; // List to hold child theories + + // Constructor + public ReconstructionTheory(String id, String name, String scholar, + String date, String description) { + this.id = id; + this.name = name; + this.scholar = scholar; + this.date = date; + this.description = description; + this.versions = new ArrayList<>(); // Initialize the versions list + this.relationships = new ArrayList<>(); // Initialize the relationships list + this.children = new ArrayList<>(); // Initialize the children list + } + + public void addVersion(TextVersion version) { + versions.add(version); + } + + public void addRelationship(Relationship relationship) { + relationships.add(relationship); + } + + public void addChildTheory(ReconstructionTheory child) { + children.add(child); + } + + // Getters and setters + public String getId() { return id; } + public void setId(String id) { this.id = id; } + + public String getName() { return name; } + public void setName(String name) { this.name = name; } + + public String getScholar() { return scholar; } + public void setScholar(String scholar) { this.scholar = scholar; } + + public String getDate() { return date; } + public void setDate(String date) { this.date = date; } + + public String getDescription() { return description; } + public void setDescription(String description) { this.description = description; } + + public List getVersions() { return versions; } + public List getRelationships() { return relationships; } + public List getChildren() { return children; } +} \ No newline at end of file diff --git a/Team 66 CodeCrushers/demo/src/main/java/loop/demo/Relationship.java b/Team 66 CodeCrushers/demo/src/main/java/loop/demo/Relationship.java new file mode 100644 index 00000000..39939b01 --- /dev/null +++ b/Team 66 CodeCrushers/demo/src/main/java/loop/demo/Relationship.java @@ -0,0 +1,46 @@ +package loop.demo; + +public class Relationship { + private String id; + private TextVersion source; + private TextVersion target; + private String type; // "regional variant", "derived from", etc. + private double similarity; // 0.0 to 1.0 + private String notes; + + // Constructor + public Relationship(String id, TextVersion source, TextVersion target, + String type, double similarity, String notes) { + this.id = id; + this.source = source; + this.target = target; + this.type = type; + this.similarity = similarity; + this.notes = notes; + } + + // Getters and setters + public String getId() { return id; } + public void setId(String id) { this.id = id; } + + public TextVersion getSource() { return source; } + public void setSource(TextVersion source) { this.source = source; } + + public TextVersion getTarget() { return target; } + public void setTarget(TextVersion target) { this.target = target; } + + public String getType() { return type; } + public void setType(String type) { this.type = type; } + + public double getSimilarity() { return similarity; } + public void setSimilarity(double similarity) { this.similarity = similarity; } + + public String getNotes() { return notes; } + public void setNotes(String notes) { this.notes = notes; } + + @Override + public String toString() { + return source.getName() + " " + type + " " + target.getName() + + " (similarity: " + similarity + ")"; + } +} diff --git a/Team 66 CodeCrushers/demo/src/main/java/loop/demo/TextVersion.java b/Team 66 CodeCrushers/demo/src/main/java/loop/demo/TextVersion.java new file mode 100644 index 00000000..74579ddd --- /dev/null +++ b/Team 66 CodeCrushers/demo/src/main/java/loop/demo/TextVersion.java @@ -0,0 +1,50 @@ +package loop.demo; + +public class TextVersion { + private String id; + private String name; + private String region; + private String approximateDate; + private int verseCount; + private String uniqueFeatures; + private double completeness; // 0.0 to 1.0 + + // Constructor + public TextVersion(String id, String name, String region, String approximateDate, + int verseCount, String uniqueFeatures, double completeness) { + this.id = id; + this.name = name; + this.region = region; + this.approximateDate = approximateDate; + this.verseCount = verseCount; + this.uniqueFeatures = uniqueFeatures; + this.completeness = completeness; + } + + // Getters and setters + public String getId() { return id; } + public void setId(String id) { this.id = id; } + + public String getName() { return name; } + public void setName(String name) { this.name = name; } + + public String getRegion() { return region; } + public void setRegion(String region) { this.region = region; } + + public String getApproximateDate() { return approximateDate; } + public void setApproximateDate(String approximateDate) { this.approximateDate = approximateDate; } + + public int getVerseCount() { return verseCount; } + public void setVerseCount(int verseCount) { this.verseCount = verseCount; } + + public String getUniqueFeatures() { return uniqueFeatures; } + public void setUniqueFeatures(String uniqueFeatures) { this.uniqueFeatures = uniqueFeatures; } + + public double getCompleteness() { return completeness; } + public void setCompleteness(double completeness) { this.completeness = completeness; } + + @Override + public String toString() { + return name + " (" + region + ", " + approximateDate + ")"; + } +} diff --git a/Team 66 CodeCrushers/demo/src/main/java/loop/demo/WebController.java b/Team 66 CodeCrushers/demo/src/main/java/loop/demo/WebController.java new file mode 100644 index 00000000..0acacb71 --- /dev/null +++ b/Team 66 CodeCrushers/demo/src/main/java/loop/demo/WebController.java @@ -0,0 +1,110 @@ +package loop.demo; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +@Controller +public class WebController { + + private final HistoricalVersionControlSys historicalVersionControlSys; + + public WebController(HistoricalVersionControlSys historicalVersionControlSys) { + this.historicalVersionControlSys = historicalVersionControlSys; + } + + @GetMapping("/") + public String index() { + return "index"; // This will return the index.html + } + + @GetMapping("/graphs") + @ResponseBody + public List getAllGraphs() { + return historicalVersionControlSys.getGraphs(); // Return the list of graphs + } + + @GetMapping("/graph/{id}") + public String viewGraphDetails(@PathVariable String id, Model model) { + DocumentGraph graph = historicalVersionControlSys.getGraphs().stream() + .filter(g -> g.getId().equals(id)) + .findFirst() + .orElse(null); + + if (graph != null) { + model.addAttribute("graph", graph); + model.addAttribute("versions", graph.getAllVersions()); + model.addAttribute("theories", graph.getAllTheories()); // Add theories to the model + return "graphDetails"; // This will return graphDetails.html + } + return "error"; // Handle case where graph is not found + } + + @GetMapping("/versions") + @ResponseBody + public List getAllVersions() { + // Collect all versions from all graphs + return historicalVersionControlSys.getGraphs().stream() + .flatMap(graph -> graph.getAllVersions().stream()) + .toList(); + } + + @GetMapping("/version/{id}") + public String viewVersionDetails(@PathVariable String id, Model model) { + // Find the version in all graphs + TextVersion version = historicalVersionControlSys.getGraphs().stream() + .flatMap(graph -> graph.getAllVersions().stream()) + .filter(v -> v.getId().equals(id)) + .findFirst() + .orElse(null); + + if (version != null) { + model.addAttribute("version", version); + model.addAttribute("annotations", historicalVersionControlSys.getGraphs().stream() + .flatMap(graph -> graph.getAnnotationsForVersion(id).stream()) + .toList()); + model.addAttribute("relationships", historicalVersionControlSys.getGraphs().stream() + .flatMap(graph -> graph.getRelationshipsForVersion(id).stream()) + .toList()); + } + return "versionDetails"; // This will return versionDetails.html + } + + @GetMapping("/relationships/{id}") + @ResponseBody + public List getRelationships(@PathVariable String id) { + // Collect relationships from all graphs for the given version ID + return historicalVersionControlSys.getGraphs().stream() + .flatMap(graph -> graph.getRelationshipsForVersion(id).stream()) + .toList(); + } + + @GetMapping("/theories") + @ResponseBody + public List getAllTheories() { + // Collect all theories from all graphs + return historicalVersionControlSys.getGraphs().stream() + .flatMap(graph -> graph.getAllTheories().stream()) + .toList(); + } + @GetMapping("/theory/{id}") +public String viewTheoryDetails(@PathVariable String id, Model model) { + // Find the theory in all graphs + ReconstructionTheory theory = historicalVersionControlSys.getGraphs().stream() + .flatMap(graph -> graph.getAllTheories().stream()) + .filter(t -> t.getId().equals(id)) + .findFirst() + .orElse(null); + + if (theory != null) { + model.addAttribute("theory", theory); + model.addAttribute("children", theory.getChildren()); // Add child theories to the model + return "theoryDetails"; // Corrected template name + } + return "error"; // Handle case where theory is not found +} +} \ No newline at end of file diff --git a/Team 66 CodeCrushers/demo/src/main/resources/application.properties b/Team 66 CodeCrushers/demo/src/main/resources/application.properties new file mode 100644 index 00000000..2109a440 --- /dev/null +++ b/Team 66 CodeCrushers/demo/src/main/resources/application.properties @@ -0,0 +1 @@ +spring.application.name=demo diff --git a/Team 66 CodeCrushers/demo/src/main/resources/templates/graphDetails.html b/Team 66 CodeCrushers/demo/src/main/resources/templates/graphDetails.html new file mode 100644 index 00000000..f9f4c615 --- /dev/null +++ b/Team 66 CodeCrushers/demo/src/main/resources/templates/graphDetails.html @@ -0,0 +1,64 @@ + + + + + + Graph Details + + + + +
+

Graph Details

+

Graph ID:

+ +

Versions

+
    + + +
  • + +
  • +
    +
+ +

Theories

+
    + + +
  • + +
  • +
    +
+ + Back to Home +
+ + \ No newline at end of file diff --git a/Team 66 CodeCrushers/demo/src/main/resources/templates/index.html b/Team 66 CodeCrushers/demo/src/main/resources/templates/index.html new file mode 100644 index 00000000..ad5f4015 --- /dev/null +++ b/Team 66 CodeCrushers/demo/src/main/resources/templates/index.html @@ -0,0 +1,94 @@ + + + + + + Historical Version Control System + + + + +
+

Welcome to the Historical Version Control System

+ +

Available Manuscripts

+
    + +

    Available Versions

    +
      + +

      Reconstruction Theories

      +
        +
        + + + + + + \ No newline at end of file diff --git a/Team 66 CodeCrushers/demo/src/main/resources/templates/theoryDetails.html b/Team 66 CodeCrushers/demo/src/main/resources/templates/theoryDetails.html new file mode 100644 index 00000000..6d07710a --- /dev/null +++ b/Team 66 CodeCrushers/demo/src/main/resources/templates/theoryDetails.html @@ -0,0 +1,30 @@ + + + + + + Theory Details + + + +
        +

        Theory Details for

        +

        Scholar:

        +

        Date:

        +

        Description:

        +

        Ordered Versions:

        + +

        Child Theories

        +
          +
        • + + + - +

          Scholar:

          +

          Date:

          +

          Ordered Versions:

          +
        • +
        +
        + + \ No newline at end of file diff --git a/Team 66 CodeCrushers/demo/src/main/resources/templates/versionDetails.html b/Team 66 CodeCrushers/demo/src/main/resources/templates/versionDetails.html new file mode 100644 index 00000000..be70712f --- /dev/null +++ b/Team 66 CodeCrushers/demo/src/main/resources/templates/versionDetails.html @@ -0,0 +1,33 @@ + + + + + + Version Details + + + +
        +

        Version Details for

        +

        Region:

        +

        Date:

        +

        Verses:

        +

        Unique Features:

        +

        Completeness: %

        + +

        Annotations

        +
          + +
        • +
          +
        + +

        Relationships

        +
          + +
        • +
          +
        +
        + + \ No newline at end of file diff --git a/Team 66 CodeCrushers/demo/src/test/java/loop/demo/DemoApplicationTests.java b/Team 66 CodeCrushers/demo/src/test/java/loop/demo/DemoApplicationTests.java new file mode 100644 index 00000000..5ff077bb --- /dev/null +++ b/Team 66 CodeCrushers/demo/src/test/java/loop/demo/DemoApplicationTests.java @@ -0,0 +1,13 @@ +package loop.demo; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class DemoApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/Team 66 CodeCrushers/demo/target/classes/application.properties b/Team 66 CodeCrushers/demo/target/classes/application.properties new file mode 100644 index 00000000..2109a440 --- /dev/null +++ b/Team 66 CodeCrushers/demo/target/classes/application.properties @@ -0,0 +1 @@ +spring.application.name=demo diff --git a/Team 66 CodeCrushers/demo/target/classes/loop/demo/Annotation.class b/Team 66 CodeCrushers/demo/target/classes/loop/demo/Annotation.class new file mode 100644 index 0000000000000000000000000000000000000000..ab97b1360de6f47c14612949b9df72b2fc2f1b3f GIT binary patch literal 1570 zcmb`G+fLg+5QhH^aY7QO1VRFVLPL*G?rSu?yxa);UEHDZ-GNw}BqYu(b zjVkq`5739I`p-IbDzmw3BJb?X?2f-V_}A|rKLNbNUKu&e6_K}Lp`cK^bU(ViksF-% z-kn`~gIJ;P!VmoTKw+-aJuP7#r6S5UDzFunM`3u~8+un^?=T3$*p2-#P{{d1g{A&9 z)^Qy9!TG-2zGq`Wt`-Mj5PLx^wnZCDVk@|}@kJPkY1u|YO!KiDoqO@?p%_EHqfJh^zw0d8x6cyzEogg+VnkXHn!NL90$wd$^qdn zC*9VP9oCX<)smg0tbiG!#dB-aK2sJb+s=0=XM2pIvol83*&U@n7dVTd3gy7IB~6gCr(4cv^mK&8GBD=!Cc}6Novz6T-aS38Te0 zK*QoCFfe$KDxXz8iWj%I3Ve@Jf?Ccu6u)qjgAf+9aaoht$$<%p!b3coWd58|I0`!J zX@1G=hQ8fQPNaDhCV2>-#YR#nJT~%Fvpg$Co+oCWYL;hp29H!z>3WezYNhbh$WzPm ztQmQpnR#kip7j|#($kbj`liq^^3=0D8%Cb4nWvuR*_^>6la=zw3@JE9o@SP(ZRFWD Z^ZfIDB=fU1gGc5&QG zy*~7{)=FK}TCKkH#edMp{)Q{7XU_~X`@q5S3upE_dq3~5T@(c< z)DY28gkpiJGscwBo-k75?Z-yWn4^wBafg+%oIL`CEv>_)C_$-)sE#t|0`-Y>da`}Y zOs3nr(xcg=nQ{)<#^i)Rfi)&j(-XoCI<}P>k87w9sCLa+$4az!8<~k-V={_z6iV=F z9W_`aP%>rO87rO22vm9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>ai6K*vkN(;f^}bG0tO} zD^hR+7I>D=Mf{ZUN8mX;?=$VZi+ITgZ|5sPTag6+fe!_cp%lBuCKpla#tlBAmyMTcvmUdJ20169BJ1@zlM z{n{09RlkdPGX%frg1?2g^RQn^_S+UcFT@ff>k*{(;42mnx)XLha zmhB|rXRue`7P{u5?{(3=LaWXxw2uhzF+L%XEVMt#w1~e0et-57w0;JM1p3y`;Hbbg z?BK(3!4OXDiZn)U;-svon|Sm(YUJ`Me|Zi1y2gmtOyB?W`#Q-e;+Fn0Xna1vUOtFs z9HOY*=;Fn^7e~?0TePge822_~Ek0#wL?oX;kpWzF2Tci%kjxVDz0UVCGS4E%)@QWT zBXSot8rEp&`3oC0oVbIMJACOE@m22eTJ3Y5{UT7{k30%2b!DBws3ODWSsAu_GCVCc zxQ0flfmM@m7pelc=PA%n#>d%l1K7!b8@ez=1%|1>$v}ZNPP{K!yZ5KSSH1$3D7=e$ SPl2s@BmbI_e?uJ#@a?~n@6Eda literal 0 HcmV?d00001 diff --git a/Team 66 CodeCrushers/demo/target/classes/loop/demo/HistoricalVersionControlSys.class b/Team 66 CodeCrushers/demo/target/classes/loop/demo/HistoricalVersionControlSys.class new file mode 100644 index 0000000000000000000000000000000000000000..d6a47c34fe65d04f0854bfc48e582cc21b1dd08b GIT binary patch literal 5801 zcmcIo36vaF6}^8lOHHRqLM4F=o0UW`voAm(nUIj3#F-E>!-PqI@Ta@FyE4^PO)V29 z;)aTdf)Q767e#S7fWizgif~j^1b0Pn!wp3c_g&Qct9qtuGLz^z9{ZfG<=6l3zjxpL z@4f#Y`scm(0XRq0rBH=Ab*N6G2DJhU_RA63Zc8WMe*VyYGZP5ZuCW{|SSv7RMdLsn zG=YUtr!cVW_Vu18M|&(kNTCjM>Msc9T515{B zxz0w{2|U;C8}&Iu-jk&Q9~SgfBrBoaDI5#E4hz#*gvA0)u9t83OP=NAbDk`k2V8Hs zeaLl#_P(fbeW_$~j)3y1t{3t;v?7)nnY7WCzTdq!(b5+v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^N!T2mfAWXdNHa_z0_r?WvNGzeqeYGT-WxST`LIeAcv;H z{VVU315yWBnQ*w@yvOpW}lM6@cBgjal6k&cL&ND}6BBnfpUl7u_UT|hO< zZg(L|lg6FyvBLhdF$a9nR6q zMz1mUSpIbYH_3D>vQW{xMxF_pSQXBUiZ~TE5}Ar|rdlG?W-?PT&a_0PdsCR?jYmxK zZVC?)nM!e{l|-hkWTsM_$t2Up6efxGh)Lq87_p?-mE%lXiA*0PGnL~^56Se=6eh{L z5tHPV!iR}Wl{nL*M5c$yOqDp(V=^_SFi8cBm?X~?@sr-E8fV%`WcoOnX`-rij_;DG zIfY4Tam1wS?voMI{;rgZF?q?DGlO+OV8v@QD7V@F_myJj*LT R=lB9oxhhcF#WU=o`ZucWzJ>q* literal 0 HcmV?d00001 diff --git a/Team 66 CodeCrushers/demo/target/classes/loop/demo/ReconstructionTheory.class b/Team 66 CodeCrushers/demo/target/classes/loop/demo/ReconstructionTheory.class new file mode 100644 index 0000000000000000000000000000000000000000..09e68767fcc4fd0eef8c1ae0c9a5977ed4ce2ce5 GIT binary patch literal 2942 zcmbtVYfl?T6g^}72xcJ;=4GHMiQ5F0fb*b9gMri~O`FysDNv$T>W9T%;f;)q)=Sj< zt5&KNwUsLMYkySLb7vQOS=RJJk-Rf==gygP&)j?Y`=8(c1h9$MStKx&LDE19X@%Sy z>#bF4TCJnf%fmNz%~MEkI4#H9QW#oXIvBYVfcR=oHw@eqzfsq2S_0i^I42!J_{hM=8ll#3nswK1jo>yGGgvZUVp(CV zf4!hlF00PiCl^D(`;wNIeoz?RbB-OA#g;)xNCz_D|k{&$+x+RxmH|-3@Wp z&i5~MzW84H(2rrp!E=RT_+OT#13ve5yUw7mR-Kl;b9#JeyZhE*la}#nyJj^HEZ32B zU`%=qhmW-ok|ZwEs7&sK?KRrI2`i?QjXcZ_NiO5pE;7i zg}BUImA-%*>>vqtT=}wda+Z+hr$_cYJ+jZ~k?l>7Y*=7adcHz`Hm2Tsm20-6-nxWq zoTqS?_Io_>7lx4LSTWy2naf>d%sX9-nk!x8%tEq@yje(fF=hUN!uRhn*TsB)y3n5% zf6>?9=hsA*-*F_7$1o-^#>Sk-6g%uRiOg`nfKM=s&oGAv^xX0ZV2xJ!tLVU$o=NB; zM@1Swsme^kPwJTnkitXGCsRBGDkT?l$=?ir3Xkw<5b0Bn0%e%LVt)BI+)ChepS1jY z16%(HDGI46-?vA~z+3hfRB`YkB?vGJ9rtSWH_JaqkJC6@bUZRD4`Am35s1P=ZM#X=0o literal 0 HcmV?d00001 diff --git a/Team 66 CodeCrushers/demo/target/classes/loop/demo/Relationship.class b/Team 66 CodeCrushers/demo/target/classes/loop/demo/Relationship.class new file mode 100644 index 0000000000000000000000000000000000000000..5a563ff60f4e92a8a904ae25808d0cbce8baf2d4 GIT binary patch literal 2534 zcma);+fo}x5QhH|k`|N|SRfAK6fh?tY%Avja-75{1Y#LGh9VcaT3`#Uk#<$u!46mY2ecC6cuds&h7<0d9>hkc3TC58y#6qlI4rrgJ+mz<~B@hVvFca>&o8q+;dBR=jb{uUt6yB6`m9aSN@-w zYRrxb^|)xU_?02a9NfD)IJJGswC;HqJo-eZz^k-o`2o;i4N`Zv2F5;@vY;Xk}&dh@dF{szO$_ip(a9RS7&w=Od9AO?upz z+6#40ZH9dNj$|?yP0<4>5~k^~=V@QJtyY*XeqGT6u01`b4RhYIVr_2js(yeqpL zh7Sd}Z=GweP3iv_O=s6J40>R>7Y*BAuX*0pb*nNcfXK|h7D`HD+`o_bhy9`wm2Wr1 zp4Dg^JKC;{;t8uxt;k>Twpe#p)V6|o=(=`$uVMMV?Hf2!*cdo&+$jt^S6KdUS2mmQ z$XI1lNU(s@e6xkoN=P>fMmCyYWOoThHkDvx2jMsl3Km8BZ}aOXj4%?gS^5L2w9|o6 zy4OLrbiadKsgUd-Uz$sGFk31Z9W4AB#3}K8H&~TLlJUm4^EmgMLXHh=lFexf8^~ja zeg`llI_}{K^<`kbLJ_=>5 z@hyicbCfMorQcxuLL&iTP6v~-0awV7>T)T(gLk_b+2t5yHps^9iNn=%!RndNqjxI7 zl8C~XQURmFdw8Ey{XE%zp7~gw5Ab0ePqv?DVF-`pw#Os+QurvAC)dxj6wC8*JWsBl zXL$&Z+;ERa?oQ#8*!#-&^Q^@3d>VgW`F@_&Av~h99*^iqVHXv?!~06m3iUJlGmWTz z)?#@c@}H2fqIRid(Q>-9#k%R|Ss%h9YVYxgrWGE==4YWlKbx^UpU3AXQo*5~w}$XY z&GmS~`ud{Bv(Lhm{4BD*vcF@QL!M7AG-uyn9q7m0iC`{v3ugph2FZPlJ&vP{S>^K$ PYW&L3dWvWG7KMKRiJiwc literal 0 HcmV?d00001 diff --git a/Team 66 CodeCrushers/demo/target/classes/loop/demo/TextVersion.class b/Team 66 CodeCrushers/demo/target/classes/loop/demo/TextVersion.class new file mode 100644 index 0000000000000000000000000000000000000000..9d161f3fcfcbd1662158b52c745ba5b82db6ba30 GIT binary patch literal 2676 zcmbW3?Q+^y5Qg7_0T~x;jK6{t$8KUfAd`@Of8ZufaNUp+C$(MoM}Kr=e8yG`5|xA} zxszT*XWGt`=}e~63+P34`W^{m5TeuR59utc-PN$IZWr_-2GzH!TFNu`)gBc~KeN1oDKspivIP^uZD-FEC( zX3Oy84lng=DUEB$3rt<`ZL(^2EJBK!dUQRF8_I3EW0^m6{h!eJ!whTrQc4Db-0zrZLA9{wTyE{v>Jx@t?8Xnay`THX!o=*n#_OE6i1B&zW<-W zMq|}RRXfEa*0yS&NS3c|T5_+`I+o6%aonUPSGOBR^T=>a^}DBxduJwdT&hQY%?i8X zne@)=lNW}=Pv)`g0*O=U)%cO;3y~=%+~Dy-M5+ohNgqsc%h~cW@-G*P@hmo)39!acGaP#Vb~oOm$t+D zc)>6Jq-O{1&K^CmJ5EFHnyU8Mff2c0g>!c~&^}21JciNTFmKo3tIUc@l%Lw!D z2JC|+Q5o!kUWlsEY#x}NtW4r7fl0Ae5T!LynlZ%397VL6t&~KB!{=fuM zJWKlT5c*aZnqKN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)_W4DX`a9vnkMk3JJ=bn-z!4Vtiju9pCAA?b`PMPzp`G`ax&{6D`y~>;ttRr zLa0^c3Pj*BVAcp*A`y6K@DRdI+!5u()(}7q-ouoVPVf-n0c`N1P}j`a=Oex73PIE< zFC+xd98nN=MMCV3gy0cn_7HuM5IoU%5MegB5k;_ZG=vba!Sm0o5e6d>cv|uh!fbpv zij8y#pavhIVENx5s$CPzOPz8z>o10)%q!ZfnTcDukc&^PPKlIKjF`+^%wjd|4^-e;y?H=9^qQ@*!n*q IL?ssgANRe`&;S4c literal 0 HcmV?d00001 diff --git a/Team 66 CodeCrushers/demo/target/classes/templates/graphDetails.html b/Team 66 CodeCrushers/demo/target/classes/templates/graphDetails.html new file mode 100644 index 00000000..f9f4c615 --- /dev/null +++ b/Team 66 CodeCrushers/demo/target/classes/templates/graphDetails.html @@ -0,0 +1,64 @@ + + + + + + Graph Details + + + + +
        +

        Graph Details

        +

        Graph ID:

        + +

        Versions

        +
          + + +
        • + +
        • +
          +
        + +

        Theories

        +
          + + +
        • + +
        • +
          +
        + + Back to Home +
        + + \ No newline at end of file diff --git a/Team 66 CodeCrushers/demo/target/classes/templates/index.html b/Team 66 CodeCrushers/demo/target/classes/templates/index.html new file mode 100644 index 00000000..ad5f4015 --- /dev/null +++ b/Team 66 CodeCrushers/demo/target/classes/templates/index.html @@ -0,0 +1,94 @@ + + + + + + Historical Version Control System + + + + +
        +

        Welcome to the Historical Version Control System

        + +

        Available Manuscripts

        +
          + +

          Available Versions

          +
            + +

            Reconstruction Theories

            +
              +
              + + + + + + \ No newline at end of file diff --git a/Team 66 CodeCrushers/demo/target/classes/templates/theoryDetails.html b/Team 66 CodeCrushers/demo/target/classes/templates/theoryDetails.html new file mode 100644 index 00000000..6d07710a --- /dev/null +++ b/Team 66 CodeCrushers/demo/target/classes/templates/theoryDetails.html @@ -0,0 +1,30 @@ + + + + + + Theory Details + + + +
              +

              Theory Details for

              +

              Scholar:

              +

              Date:

              +

              Description:

              +

              Ordered Versions:

              + +

              Child Theories

              +
                +
              • + + + - +

                Scholar:

                +

                Date:

                +

                Ordered Versions:

                +
              • +
              +
              + + \ No newline at end of file diff --git a/Team 66 CodeCrushers/demo/target/classes/templates/versionDetails.html b/Team 66 CodeCrushers/demo/target/classes/templates/versionDetails.html new file mode 100644 index 00000000..be70712f --- /dev/null +++ b/Team 66 CodeCrushers/demo/target/classes/templates/versionDetails.html @@ -0,0 +1,33 @@ + + + + + + Version Details + + + +
              +

              Version Details for

              +

              Region:

              +

              Date:

              +

              Verses:

              +

              Unique Features:

              +

              Completeness: %

              + +

              Annotations

              +
                + +
              • +
                +
              + +

              Relationships

              +
                + +
              • +
                +
              +
              + + \ No newline at end of file diff --git a/Team 66 CodeCrushers/demo/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/Team 66 CodeCrushers/demo/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 00000000..e69de29b diff --git a/Team 66 CodeCrushers/demo/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/Team 66 CodeCrushers/demo/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 00000000..08783b4a --- /dev/null +++ b/Team 66 CodeCrushers/demo/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,10 @@ +C:\Users\Samruddhi\OneDrive\Dokumen\buffer\demo\src\main\java\loop\demo\Annotation.java +C:\Users\Samruddhi\OneDrive\Dokumen\buffer\demo\src\main\java\loop\demo\ConsoleUI.java +C:\Users\Samruddhi\OneDrive\Dokumen\buffer\demo\src\main\java\loop\demo\DemoApplication.java +C:\Users\Samruddhi\OneDrive\Dokumen\buffer\demo\src\main\java\loop\demo\DocumentGraph.java +C:\Users\Samruddhi\OneDrive\Dokumen\buffer\demo\src\main\java\loop\demo\HistoricalVersionControlSys.java +C:\Users\Samruddhi\OneDrive\Dokumen\buffer\demo\src\main\java\loop\demo\Manuscript.java +C:\Users\Samruddhi\OneDrive\Dokumen\buffer\demo\src\main\java\loop\demo\ReconstructionTheory.java +C:\Users\Samruddhi\OneDrive\Dokumen\buffer\demo\src\main\java\loop\demo\Relationship.java +C:\Users\Samruddhi\OneDrive\Dokumen\buffer\demo\src\main\java\loop\demo\TextVersion.java +C:\Users\Samruddhi\OneDrive\Dokumen\buffer\demo\src\main\java\loop\demo\WebController.java diff --git a/Team 66 CodeCrushers/demo/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst b/Team 66 CodeCrushers/demo/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst new file mode 100644 index 00000000..e69de29b diff --git a/Team 66 CodeCrushers/demo/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/Team 66 CodeCrushers/demo/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst new file mode 100644 index 00000000..54895c3a --- /dev/null +++ b/Team 66 CodeCrushers/demo/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst @@ -0,0 +1 @@ +C:\Users\Samruddhi\OneDrive\Dokumen\buffer\demo\src\test\java\loop\demo\DemoApplicationTests.java diff --git a/Team 66 CodeCrushers/demo/target/test-classes/loop/demo/DemoApplicationTests.class b/Team 66 CodeCrushers/demo/target/test-classes/loop/demo/DemoApplicationTests.class new file mode 100644 index 0000000000000000000000000000000000000000..1b29cd538a5dc5083d6f241fa9e68cb67cf3e01f GIT binary patch literal 517 zcmaJ-%TB{E5FEFqg|^UAxKu)@M;;Qsap55q5T^(vTJ`Rvrnn?_F^uO&9Lpw3r$tM>XF(pO+rqoVla-s@Fc0;X=3o&T66&X9@^OB+y=E_OS zMXtC{NKVa>DQzMzl~2|G>n{%cB^VBaPmx=tXSY^l^3m9P9vkDhBP+g0#7AM{jQH>c z4A7v<`o|;P77Q!&#;G#T?7e_JhjEk8k3o_aVf$-=>MC`>8ci!fyic9q`z37s5Ym}~ TutSU9woA2w^?*Hmvm3xC1bBAU literal 0 HcmV?d00001 From 18795298deb59094d9137244a4fd286207a643f9 Mon Sep 17 00:00:00 2001 From: prashika-2005 Date: Fri, 18 Apr 2025 00:46:51 +0530 Subject: [PATCH 3/3] README.md --- README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f59525d1..8606ffea 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,19 @@ # Buffer-6.0 +4. Custom Data Structure + Document Version Control System +Problem Statement This project addresses the challenge of managing complex document version histories, especially in collaborative or research environments. Traditional linear version systems struggle with non-linear changes, branching, and reconstruction. This system models versions as a graph, allowing flexible navigation, annotation, and recovery of versions. -The themes for Buffer 6.0 are - +Data Structures Used -1. FinTech +Graph (Adjacency List): To represent document versions and their relationships. HashMap: For quick retrieval of versions, annotations, and relationships. ArrayList: To maintain collections of versions, annotations, and connections. File Overview -2. Women Safety +Java Backend Files: -3. Next-Gen Academic Solutions +HistoricalVersionControlSys.java: Main driver of the system. DocumentGraph.java: Core graph structure and traversal logic. Annotation.java: Stores metadata or notes per version. Manuscript.java: Wraps content and metadata. ReconstructionTheory.java: Contains logic to recover lost versions. Relationship.java: Models edges in the version graph. TextVersion.java: Represents a single document version. WebController.java: Connects backend to frontend using REST. Frontend HTML Files: -4. Custom Data Structure +index.html: Main entry page with navigation. graphdetails.html: Displays version graph visually. theorydetails.html: Shows reconstruction logic and outcomes. versiondetails.html: Displays details of each document version. Features + +Non-linear version tracking with graphsclass Annotation support Lost version reconstruction Clean HTML interface Use Cases + +Historical document preservation Academic and research collaboration Manuscript revision tracking +video link : https://drive.google.com/file/d/129dls0s7CW4SAxMka36FkI5SraTCE_sv/view?usp=drive_link