Added hyper FS and king projects.
This commit is contained in:
parent
91e27685a0
commit
155894bb26
|
@ -1,4 +1,5 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
|
@ -6,4 +7,15 @@
|
|||
<version>〇一。壬寅。一〄-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>nx01-king-java3</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-jpp-base</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -1,4 +1,5 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
|
@ -6,4 +7,15 @@
|
|||
<version>〇一。壬寅。一〄-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>nx01-king-java3c</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-jpp-base</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.king.java3c;
|
||||
|
||||
import java.io.PrintStream;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
|
||||
|
||||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public class Java3Compiler extends PrintStream {
|
||||
|
||||
public Java3Compiler() {
|
||||
// The first class a child uses in basic print example has invalid hidden magic code path;
|
||||
// this.charset = out instanceof PrintStream ps ? ps.charset() : Charset.defaultCharset();
|
||||
super(System.out/*, false, Charset.defaultCharset()*/); // use the force to remove dark magic
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
try (Java3Compiler java3c = new Java3Compiler()) {
|
||||
java3c.start(Arrays.asList(args));
|
||||
}
|
||||
}
|
||||
|
||||
//blic void start(Listᴿᵈ<String> args) { // TODO: delete babel tower from collections and than use this
|
||||
public void start(List<String> args) {
|
||||
println("TODO:");
|
||||
println("");
|
||||
println("- Upgrade X4O: java 1.8 add methodische interface callbacks");
|
||||
println("- Upgrade X4O: java 11 add default methods in interfaces");
|
||||
println("- Upgrade X4O: Redo most reflection + fix some bugs");
|
||||
println("- Upgrade X4O: Add missing feature; namespaced attributes");
|
||||
println("- Upgrade X4O: Add support for read/write binary byte aligned XML");
|
||||
println("");
|
||||
println("- Upgrade XML: XML 4.0 is octal aligned and uses 18 bit hinarī4C to replace all unicode");
|
||||
println("- Upgrade XML: Cleanup and upgrade XSD/XSLT/etc/etc/etc to binary hinarī4C");
|
||||
println("- Upgrade XML: Replace entities with unicode4D which embeddes the ttf like glyph");
|
||||
println("");
|
||||
println("- Wrap eclipse java AST in X4O ELD files");
|
||||
println("- Wait until nether db for 'word to number' defenitions are defines in XML");
|
||||
println("- Create converter javadoc to JEP467");
|
||||
println("- Create converter unicode to hinarī4C"); // code + javadoc in hinarī4C
|
||||
println("- Create converter java2 ascii source -> java3 binary source");
|
||||
println("- Create converter java3 binary source -> java2 ascii source");
|
||||
println("- Write this class");
|
||||
println("");
|
||||
println("DONE");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
|
@ -6,4 +7,29 @@
|
|||
<version>〇一。壬寅。一〄-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>nx01-king-java3do</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-jpp-base</artifactId>
|
||||
</dependency>
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-poop-fireant</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-poop-firemake</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-firemake</artifactId>
|
||||
</dependency>
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.king.java3do;
|
||||
|
||||
import java.io.PrintStream;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
|
||||
|
||||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public class Java3DoScript extends PrintStream {
|
||||
|
||||
public Java3DoScript() {
|
||||
super(System.out);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
try (Java3DoScript java3DoScript = new Java3DoScript()) {
|
||||
java3DoScript.start(Arrays.asList(args));
|
||||
}
|
||||
}
|
||||
|
||||
public void start(List<String> args) {
|
||||
println("TODO: run the to do script engine...");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
|
@ -6,4 +7,19 @@
|
|||
<version>〇一。壬寅。一〄-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>nx01-king-java3doc</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-jpp-base</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-popcorn-duytsdoc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.king.java3doc;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.x4o.xml.eld.doc.api.ApiDocProject;
|
||||
import org.x4o.xml.io.X4OConnectionException;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import love.distributedrebirth.nx01.popcorn.PopCornDriver;
|
||||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
|
||||
|
||||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public class Java3Documentation extends PrintStream {
|
||||
|
||||
public Java3Documentation() {
|
||||
super(System.out);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
try (Java3Documentation java3doc = new Java3Documentation()) {
|
||||
java3doc.start(Arrays.asList(args));
|
||||
}
|
||||
}
|
||||
|
||||
public void start(List<String> args) {
|
||||
println("TODO:");
|
||||
ApiDocProject project = loadProject(new File("poop-popcorn.xml"));
|
||||
}
|
||||
|
||||
private ApiDocProject loadProject(File popcornFile) {
|
||||
try {
|
||||
return PopCornDriver.newInstance().createReader().readFile(popcornFile);
|
||||
} catch (X4OConnectionException | SAXException | IOException e) {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
|
@ -6,4 +7,41 @@
|
|||
<version>〇一。壬寅。一〄-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>nx01-king-java3seed</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-jpp-base</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-utils</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.shrinkwrap</groupId>
|
||||
<artifactId>shrinkwrap-depchain</artifactId>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.shrinkwrap.resolver</groupId>
|
||||
<artifactId>shrinkwrap-resolver-depchain</artifactId>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-redsea-hyper-local</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-redsea-hyper-nostr</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-warp-manifestor</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,383 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.king.java3seed;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.InputStream;
|
||||
import java.io.PrintStream;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.file.Files;
|
||||
import java.time.Instant;
|
||||
import java.time.ZoneOffset;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.jboss.shrinkwrap.api.ArchivePath;
|
||||
import org.jboss.shrinkwrap.api.asset.ByteArrayAsset;
|
||||
import org.jboss.shrinkwrap.api.asset.StringAsset;
|
||||
import org.jboss.shrinkwrap.api.exporter.ZipExporter;
|
||||
import org.jboss.shrinkwrap.api.spec.JavaArchive;
|
||||
import org.jboss.shrinkwrap.resolver.api.InvalidConfigurationFileException;
|
||||
import org.jboss.shrinkwrap.resolver.api.maven.ConfigurableMavenResolverSystem;
|
||||
import org.jboss.shrinkwrap.resolver.api.maven.Maven;
|
||||
import org.jboss.shrinkwrap.resolver.api.maven.MavenFormatStage;
|
||||
import org.jboss.shrinkwrap.resolver.api.maven.MavenResolvedArtifact;
|
||||
import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage;
|
||||
|
||||
import love.distributedrebirth.no2all.wire.fetch.WireFetch;
|
||||
import love.distributedrebirth.no2all.wire.fetch.WireFetchFactory;
|
||||
import love.distributedrebirth.no2all.wire.fetch.WireFetchFactoryDefault;
|
||||
import love.distributedrebirth.no2all.wire.fetch.WireFetchHandler;
|
||||
import love.distributedrebirth.no2all.wire.fetch.WireFetchResource;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.HyperFileSystem;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.model.HyperBeeHive;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.model.HyperFlower;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.model.HyperFlowerAnther;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.local.HyperLocalFileSystem;
|
||||
import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor;
|
||||
import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver;
|
||||
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3;
|
||||
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestTheMimeType;
|
||||
|
||||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
|
||||
|
||||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public class Java3Seed extends PrintStream {
|
||||
|
||||
public Java3Seed() {
|
||||
super(System.out);
|
||||
}
|
||||
|
||||
public static void main(String[] arguments) {
|
||||
List<String> args = Arrays.asList(arguments);
|
||||
try (Java3Seed java3seed = new Java3Seed()) {
|
||||
java3seed.start(args);
|
||||
} catch (Exception e) {
|
||||
System.err.println("Error;");
|
||||
if (args.contains("--stack-trace")) {
|
||||
e.printStackTrace(System.err);
|
||||
} else {
|
||||
System.err.println(e.toString());
|
||||
}
|
||||
if (BassFaultAnchor.class.isAssignableFrom(e.getClass())) {
|
||||
System.err.println(BassFaultAnchor.class.cast(e).toStringZilLaLa());
|
||||
}
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
public void start(List<String> args) throws Exception {
|
||||
println("TODO:");
|
||||
println("");
|
||||
println("- Generate wfs-jdatstart2 app template");
|
||||
println("- Generate wfs-maven3 meta-data files");
|
||||
println("- Generate wfs artifact files"); // deps are chain linked to m3 central (optional)
|
||||
println("- Connect to nostr");
|
||||
println("- Auth deployer optional");
|
||||
println("- Request temporal write bee hive access key");
|
||||
println("- Wait until human or machine signs a access key");
|
||||
println("- Push files over binary websocket to nostr dat managed drive");
|
||||
println("- Push file signasure signed event in nostr");
|
||||
println("- Push app/lib update event, to request external signing to allow boot");
|
||||
println("");
|
||||
println("DONE");
|
||||
|
||||
String projectPath = null;
|
||||
Iterator<String> projectIterator = args.iterator();
|
||||
while (projectIterator.hasNext()) {
|
||||
if (projectIterator.next().equals("--project")) {
|
||||
if (!projectIterator.hasNext()) {
|
||||
throw new IllegalArgumentException("Missing project path.");
|
||||
}
|
||||
projectPath = projectIterator.next();
|
||||
}
|
||||
}
|
||||
if (projectPath == null) {
|
||||
throw new IllegalArgumentException("Missing project path.");
|
||||
}
|
||||
if (projectPath.isEmpty()) {
|
||||
throw new IllegalArgumentException("Empty project path.");
|
||||
}
|
||||
File projectRoot = new File(projectPath);
|
||||
if (!projectRoot.exists()) {
|
||||
throw new IllegalArgumentException("Project does not exists");
|
||||
}
|
||||
|
||||
DeployTarget deployTarget = DeployTarget.POOP;
|
||||
Iterator<String> deployTargetIterator = args.iterator();
|
||||
while (deployTargetIterator.hasNext()) {
|
||||
if (deployTargetIterator.next().equals("--deploy")) {
|
||||
if (!deployTargetIterator.hasNext()) {
|
||||
throw new IllegalArgumentException("Missing deploy target.");
|
||||
}
|
||||
String deployTargetRaw = deployTargetIterator.next();
|
||||
Optional<DeployTarget> deployTargetOpt = DeployTarget.parseTarget(deployTargetRaw);
|
||||
if (deployTargetOpt.isEmpty()) {
|
||||
throw new IllegalArgumentException("Unknown deploy target: " + deployTargetRaw);
|
||||
}
|
||||
deployTarget = deployTargetOpt.get();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Iterator<String> deployLocalIterator = args.iterator();
|
||||
while (deployLocalIterator.hasNext()) {
|
||||
if (deployLocalIterator.next().equals("--local")) {
|
||||
if (!deployLocalIterator.hasNext()) {
|
||||
throw new IllegalArgumentException("Missing local hyper bee hive key.");
|
||||
}
|
||||
println("");
|
||||
println("Deploying to local hyper drive");
|
||||
deployLocal(projectRoot, deployLocalIterator.next(), deployTarget);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum DeployTarget {
|
||||
ALL,POOP,LIBS,
|
||||
;
|
||||
static public Optional<DeployTarget> parseTarget(String target) {
|
||||
for (DeployTarget v : values()) {
|
||||
if (v.name().equalsIgnoreCase(target)) {
|
||||
return Optional.of(v);
|
||||
}
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
private ConfigurableMavenResolverSystem startMaven() {
|
||||
try {
|
||||
return Maven.configureResolver().workOffline();
|
||||
} catch (InvalidConfigurationFileException ex) {
|
||||
return Maven.configureResolver(); // fallback to online if offline fails.
|
||||
}
|
||||
}
|
||||
|
||||
private void deployLocal(File projectRoot, String beehive, DeployTarget deployTarget) throws Exception {
|
||||
|
||||
File pomFile = new File(projectRoot, "pom.xml");
|
||||
ConfigurableMavenResolverSystem maven = startMaven();
|
||||
PomEquippedResolveStage mavenPomStage = maven.loadPomFromFile(pomFile);
|
||||
MavenFormatStage mavenFormatStage = mavenPomStage.importRuntimeDependencies().resolve().withTransitivity();
|
||||
|
||||
//maven.resolve("").withoutTransitivity().asSingleResolvedArtifact()
|
||||
|
||||
MavenResolvedArtifact projectArtifact = mavenFormatStage.asResolvedArtifact()[0]; // FIXME: error this is not root!!!
|
||||
|
||||
System.out.println("groupId; " + projectArtifact.getCoordinate().getGroupId());
|
||||
System.out.println("atrifactId; " + projectArtifact.getCoordinate().getArtifactId());
|
||||
|
||||
String projectGroupId = projectArtifact.getCoordinate().getGroupId();
|
||||
JavaArchive[] libs = mavenFormatStage.as(JavaArchive.class);
|
||||
|
||||
HyperBeeHive hive = new HyperBeeHive(beehive);
|
||||
HyperFileSystem jdat = new HyperLocalFileSystem();
|
||||
|
||||
List<JavaArchive> deployAll = new ArrayList<>();
|
||||
List<JavaArchive> deployPoop = new ArrayList<>();
|
||||
List<JavaArchive> deployLibs = new ArrayList<>();
|
||||
|
||||
for (JavaArchive lib : libs) {
|
||||
deployAll.add(lib);
|
||||
for (ArchivePath path : lib.getContent().keySet()) {
|
||||
String file = path.get();
|
||||
if (file.endsWith("pom.properties")) {
|
||||
try (InputStream in = lib.get(path).getAsset().openStream()) {
|
||||
Properties p = new Properties();
|
||||
p.load(in);
|
||||
String libGroupId = p.getProperty("groupId");
|
||||
if (libGroupId.startsWith(projectGroupId)) {
|
||||
deployPoop.add(lib);
|
||||
} else {
|
||||
deployLibs.add(lib); // TODO: To migrate central create uber size dep all lib project + filter junk
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
System.out.println("deployAll.size=" + deployAll.size());
|
||||
System.out.println("deployPoop.size=" + deployPoop.size());
|
||||
System.out.println("deployLibs.size=" + deployLibs.size());
|
||||
|
||||
List<JavaArchive> deploy;
|
||||
if (DeployTarget.ALL.equals(deployTarget)) {
|
||||
deploy = deployAll;
|
||||
} else if (DeployTarget.LIBS.equals(deployTarget)) {
|
||||
deploy = deployLibs;
|
||||
} else {
|
||||
deploy = deployPoop;
|
||||
}
|
||||
System.out.println("deploy.target=" + deployTarget + " size=" + deploy.size());
|
||||
|
||||
// Cleaning
|
||||
String toiletCleanDate = DateTimeFormatter.RFC_1123_DATE_TIME.format(ZonedDateTime.ofInstant(Instant.now(), ZoneOffset.UTC));
|
||||
int deletedCerts = 0;
|
||||
int convertedManifests = 0;
|
||||
for (JavaArchive jar : deploy) {
|
||||
for (ArchivePath path : jar.getContent().keySet()) {
|
||||
String file = path.get();
|
||||
if (file.endsWith(".DSA")) {
|
||||
jar.delete(path);
|
||||
deletedCerts++;
|
||||
}
|
||||
if (file.endsWith(".SF")) {
|
||||
jar.delete(path);
|
||||
deletedCerts++;
|
||||
}
|
||||
if (file.equals("/META-INF/MANIFEST.MF")) {
|
||||
System.out.println("jar: " + jar.getName());
|
||||
InputStream in = jar.get(path).getAsset().openStream();
|
||||
WarpManifest3 manifest = WarpManifestorDriver.亞.readV1Stream(in);
|
||||
in.close();
|
||||
jar.delete(path);
|
||||
manifest.withAttribute("Manifest-Toilet-Cleaned-By", Java3Seed.class.getName());
|
||||
manifest.withAttribute("Manifest-Toilet-Cleaned-Date", toiletCleanDate);
|
||||
jar.add(new StringAsset(WarpManifestorDriver.亞.writeV1String(manifest)), "/META-INF/"+WarpManifestTheMimeType.MANIFEST_1.getQFileName());
|
||||
jar.add(new StringAsset(WarpManifestorDriver.亞.writeV2String(manifest)), "/META-INF/"+WarpManifestTheMimeType.MANIFEST_2.getQFileName());
|
||||
jar.add(new ByteArrayAsset(WarpManifestorDriver.亞.writeV3Array(manifest)), "/META-INF/"+WarpManifestTheMimeType.MANIFEST_3.getQFileName());
|
||||
convertedManifests++;
|
||||
}
|
||||
}
|
||||
new File("target/test-jar3/").mkdir();
|
||||
File jar3Export = new File("target/test-jar3/"+jar.getName());
|
||||
jar.as(ZipExporter.class).exportTo(jar3Export, true);
|
||||
}
|
||||
System.out.println("Deleted certs: " + deletedCerts);
|
||||
System.out.println("Converted manifests: " + convertedManifests);
|
||||
|
||||
WireFetchFactory wire = new WireFetchFactoryDefault();
|
||||
|
||||
for (JavaArchive jar : deploy) {
|
||||
File jar3Export = new File("target/test-jar3/"+jar.getName());
|
||||
for (ArchivePath path : jar.getContent().keySet()) {
|
||||
String file = path.get();
|
||||
if (file.endsWith("pom.properties")) {
|
||||
try (InputStream in = jar.get(path).getAsset().openStream()) {
|
||||
Properties p = new Properties();
|
||||
p.load(in);
|
||||
String libArtifactId = p.getProperty("artifactId");
|
||||
String libGroupId = p.getProperty("groupId");
|
||||
String libVersion = p.getProperty("version");
|
||||
System.out.println("Deploying: " + libGroupId + "/" + libArtifactId + "@" + libVersion);
|
||||
|
||||
String artifactFolder = libGroupId.replaceAll("\\.|_", "/") + "/" + libArtifactId + "/" + libVersion + "/";
|
||||
String artifactFile = artifactFolder + libArtifactId + "-" + libVersion + ".jar";
|
||||
ByteBuffer artifactBuffer = ByteBuffer.wrap(Files.readAllBytes(jar3Export.toPath()));
|
||||
|
||||
jdat.put(hive, hive.createHyperLint(artifactFile), artifactBuffer);
|
||||
|
||||
if (libGroupId.startsWith(projectGroupId)) {
|
||||
continue;
|
||||
}
|
||||
copyFromCentral(jdat, hive, wire, artifactFolder, libArtifactId, libVersion);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HyperFlower flower = jdat.eden(hive);
|
||||
for (HyperFlowerAnther anther : flower.getAnthers()) {
|
||||
System.out.println("anther: " + anther.toString());
|
||||
}
|
||||
System.out.println("Deployed done to: " + hive.getKey());
|
||||
}
|
||||
|
||||
private void copyFromCentral(HyperFileSystem jdat, HyperBeeHive hive, WireFetchFactory wire, String artifactFolder, String artifact, String version) throws URISyntaxException {
|
||||
String central = "https://repo1.maven.org/maven2/";
|
||||
String centralBase = central + artifactFolder + artifact + "-" +version;
|
||||
String flowerBase = artifactFolder + artifact + "-" + version;
|
||||
String[] copyTypes = new String[] {
|
||||
".jar.asc",
|
||||
".jar.asc.md5",
|
||||
".jar.asc.sha1",
|
||||
".jar.md5",
|
||||
".jar.sha1",
|
||||
".pom",
|
||||
".pom.asc",
|
||||
".pom.asc.md5",
|
||||
".pom.asc.sha1",
|
||||
".pom.md5",
|
||||
".pom.sha1",
|
||||
"-sources.jar",
|
||||
"-sources.jar.asc",
|
||||
"-sources.jar.asc.md5",
|
||||
"-sources.jar.asc.sha1",
|
||||
"-sources.jar.md5",
|
||||
"-sources.jar.sha1",
|
||||
"-javadoc.jar",
|
||||
"-javadoc.jar.asc",
|
||||
"-javadoc.jar.asc.md5",
|
||||
"-javadoc.jar.asc.sha1",
|
||||
"-javadoc.jar.md5",
|
||||
"-javadoc.jar.sha1",
|
||||
};
|
||||
for (String copyType : copyTypes) {
|
||||
copyResource(jdat, hive, wire, centralBase + copyType, flowerBase + copyType);
|
||||
}
|
||||
}
|
||||
|
||||
private void copyResource(HyperFileSystem jdat, HyperBeeHive hive, WireFetchFactory wire, String resource, String file) throws URISyntaxException {
|
||||
System.out.println("Fetch: " + resource + " target: " + file);
|
||||
WireFetch result = wire.buildFetcher(new WireFetchResource(new URI(resource)), new WireFetchHandler() {
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReady(ByteBuffer result) {
|
||||
jdat.put(hive, hive.createHyperLint(file), result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProgress(int totalBytes) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable error) {
|
||||
if (error instanceof FileNotFoundException) {
|
||||
System.out.println("404: " + resource);
|
||||
} else {
|
||||
error.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
result.run();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
love.distributedrebirth.nx01.warp.fault.report.ReportSitraFaultStackTraceJava3
|
||||
love.distributedrebirth.nx01.warp.fault.report.ReportSitraFaultWarpVersion
|
||||
love.distributedrebirth.nx01.warp.fault.report.ReportSitraRuntimeChapter
|
||||
love.distributedrebirth.nx01.warp.fault.report.ReportSitraRuntimeThreads
|
||||
love.distributedrebirth.nx01.warp.fault.report.ReportSitraSystemChapter
|
||||
love.distributedrebirth.nx01.warp.fault.report.ReportSitraSystemLocale
|
21
nx01-redsea-hyper-local/pom.xml
Normal file
21
nx01-redsea-hyper-local/pom.xml
Normal file
|
@ -0,0 +1,21 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01</artifactId>
|
||||
<version>〇一。壬寅。一〄-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>nx01-redsea-hyper-local</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-redsea-hyper</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,387 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.redsea.hyper.local;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import love.distributedrebirth.nx01.redsea.hyper.HyperFileSystem;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.local.drive.HyperLocalDriveCommand;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.local.drive.HyperLocalDriveInfo;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.local.drive.HyperLocalDriveResult;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.local.drive.HyperLocalDriveTouch;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.model.HyperBeeEntry;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.model.HyperBeeHive;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.model.HyperFlower;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.model.HyperFlowerAnther;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.model.HyperFlowerBeeFly;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.model.HyperFlowerBeeFormation;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.model.HyperLint;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.model.HyperLintSlime;
|
||||
import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor;
|
||||
import love.distributedrebirth.nx01.warp.fault.FaultBeanInterrupted;
|
||||
import love.distributedrebirth.nx01.warp.fault.FaultStreamDelegate;
|
||||
import love.distributedrebirth.nx01.warp.fault.FaultStreamInterrupted;
|
||||
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public class HyperLocalFileSystem implements HyperFileSystem {
|
||||
|
||||
// npm i -g drives
|
||||
|
||||
// TODO-1: replace with java dat version
|
||||
// TODO-2: write UDP react warp script
|
||||
// TODO-3: defined datV3? for octals
|
||||
// TODO-4: defined structs+code impl in xml for nether DB + orisis VHDL support
|
||||
// TODO-5: Export octal datX code to every computer language
|
||||
|
||||
private final String localStoragePath;
|
||||
private final String localMirrorPath;
|
||||
|
||||
public HyperLocalFileSystem() {
|
||||
this(null, ".drives/localdir/"); // we ALWAYS run in user.home
|
||||
}
|
||||
|
||||
public HyperLocalFileSystem(String localStoragePath, String localMirrorPath) {
|
||||
this.localStoragePath = localStoragePath;
|
||||
this.localMirrorPath = Objects.requireNonNull(localMirrorPath);
|
||||
}
|
||||
|
||||
|
||||
private Consumer<Map<String, String>> buildTracer(HyperBeeHive hive) {
|
||||
return buildTracer(hive, null);
|
||||
}
|
||||
|
||||
private Consumer<Map<String, String>> buildTracer(HyperBeeHive hive, HyperLint lint) {
|
||||
Consumer<Map<String, String>> tracer = v -> {
|
||||
v.put("jdat-local-mirror-path", localMirrorPath);
|
||||
if (localStoragePath != null) {
|
||||
v.put("jdat-local-storage-path", localStoragePath);
|
||||
}
|
||||
v.put("hyper-bee-hive-key", hive.getKey());
|
||||
if (lint != null) {
|
||||
v.put("hyper-lint-snail", lint.getSnail());
|
||||
}
|
||||
};
|
||||
return tracer;
|
||||
}
|
||||
|
||||
private void localMirrorRead(HyperBeeHive hive) {
|
||||
try {
|
||||
File localHivePath = Path.of(System.getProperty("user.home"), localMirrorPath, hive.getKey()).toFile();
|
||||
if (!localHivePath.exists()) {
|
||||
localHivePath.mkdirs();
|
||||
}
|
||||
System.out.println("mirror read path: " + localHivePath.getAbsolutePath());
|
||||
HyperLocalDriveResult res = cmdMirror(hive.getKey(), localHivePath.getAbsolutePath());
|
||||
System.out.println("mirror read result: " + res.getResult());
|
||||
} catch (BassFaultAnchor e) {
|
||||
throw e.withSignalTrace(getClass(), buildTracer(hive));
|
||||
}
|
||||
}
|
||||
|
||||
private void localMirrorWrite(HyperBeeHive hive) {
|
||||
try {
|
||||
File localHivePath = Path.of(System.getProperty("user.home"), localMirrorPath, hive.getKey()).toFile();
|
||||
System.out.println("mirror write path: " + localHivePath);
|
||||
HyperLocalDriveResult res = cmdMirror(localHivePath.getAbsolutePath(), hive.getKey());
|
||||
System.out.println("mirror write result: " + res.getResult());
|
||||
} catch (BassFaultAnchor e) {
|
||||
throw e.withSignalTrace(getClass(), buildTracer(hive));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public HyperFlower eden(HyperBeeHive hive) {
|
||||
localMirrorRead(hive);
|
||||
try {
|
||||
return cmdList(hive.getKey(), null, false);
|
||||
} catch (BassFaultAnchor e) {
|
||||
throw e.withSignalTrace(getClass(), buildTracer(hive));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public HyperFlower flower(HyperBeeHive hive, HyperLintSlime slime) {
|
||||
localMirrorRead(hive);
|
||||
try {
|
||||
return cmdList(hive.getKey(), slime.getSnail(), false);
|
||||
} catch (BassFaultAnchor e) {
|
||||
throw e.withSignalTrace(getClass(), buildTracer(hive, slime));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public HyperFlower garden(HyperBeeHive hive, HyperLintSlime slime) {
|
||||
localMirrorRead(hive);
|
||||
try {
|
||||
return cmdList(hive.getKey(), slime.getSnail(), true);
|
||||
} catch (BassFaultAnchor e) {
|
||||
throw e.withSignalTrace(getClass(), buildTracer(hive, slime));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<HyperBeeEntry> entry(HyperBeeHive hive, HyperLint lint) {
|
||||
localMirrorRead(hive);
|
||||
HyperLocalDriveResult res;
|
||||
try {
|
||||
res = cmdEntry(hive.getKey(), lint.getSnail());
|
||||
} catch (BassFaultAnchor e) {
|
||||
throw e.withSignalTrace(getClass(), buildTracer(hive, lint));
|
||||
}
|
||||
if (res.getResult().isEmpty()) {
|
||||
return Optional.empty();
|
||||
}
|
||||
Long seq = null;
|
||||
String name = null;
|
||||
for (String line : res.getResult().split("\n")) {
|
||||
if (line.startsWith("Sequence")) {
|
||||
String seqRaw = line.substring(line.indexOf(' ') + 1, line.length());
|
||||
seq = Long.parseLong(seqRaw);
|
||||
}
|
||||
if (line.startsWith("Key")) {
|
||||
name = line.substring(line.indexOf(' ') + 1, line.length());
|
||||
}
|
||||
}
|
||||
return Optional.of(new HyperBeeEntry(seq, name));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ByteBuffer get(HyperBeeHive hive, HyperLint lint) {
|
||||
localMirrorRead(hive);
|
||||
try {
|
||||
Path localSnailPath = Path.of(System.getProperty("user.home"), localMirrorPath, hive.getKey(), lint.getSnail());
|
||||
return ByteBuffer.wrap(Files.readAllBytes(localSnailPath));
|
||||
} catch (IOException e) {
|
||||
throw new FaultStreamInterrupted(e, getClass(), buildTracer(hive, lint));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void put(HyperBeeHive hive, HyperLint lint, ByteBuffer blob) {
|
||||
localMirrorRead(hive);
|
||||
try {
|
||||
Path localSnailPath = Path.of(System.getProperty("user.home"), localMirrorPath, hive.getKey(), lint.getSnail());
|
||||
localSnailPath.toFile().getParentFile().mkdirs();
|
||||
Files.write(localSnailPath, blob.array());
|
||||
} catch (IOException e) {
|
||||
throw new FaultStreamInterrupted(e, getClass(), buildTracer(hive, lint));
|
||||
}
|
||||
localMirrorWrite(hive);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long rm(HyperBeeHive hive, HyperLintSlime slime) {
|
||||
long result = 1; // TODO impl remove count
|
||||
try {
|
||||
cmdRemove(hive.getKey(), slime.getSnail());
|
||||
} catch (BassFaultAnchor e) {
|
||||
throw e.withSignalTrace(getClass(), buildTracer(hive, slime));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// =========== Local
|
||||
|
||||
public HyperLocalDriveResult cmdInit() throws IOException, InterruptedException {
|
||||
return executeHyperdrive(HyperLocalDriveCommand.INIT);
|
||||
}
|
||||
|
||||
public HyperLocalDriveTouch cmdTouch() throws IOException, InterruptedException {
|
||||
return new HyperLocalDriveTouch(executeHyperdrive(HyperLocalDriveCommand.TOUCH));
|
||||
}
|
||||
|
||||
public HyperLocalDriveResult cmdMirror(String src, String dst) {
|
||||
return cmdMirror(src, dst, false);
|
||||
}
|
||||
|
||||
public HyperLocalDriveResult cmdMirror(String src, String dst, boolean dryRun) {
|
||||
String argDryRun = null;
|
||||
if (dryRun) {
|
||||
argDryRun = "--dry-run";
|
||||
}
|
||||
return executeHyperdrive(HyperLocalDriveCommand.MIRROR, argDryRun, src, dst);
|
||||
}
|
||||
|
||||
public HyperFlower cmdList(String driveKey, String snail, boolean deepGarden) {
|
||||
String deeper = null;
|
||||
if (deepGarden) {
|
||||
deeper = "-r";
|
||||
}
|
||||
HyperLocalDriveResult res = executeHyperdrive(HyperLocalDriveCommand.LS, deeper, driveKey, snail);
|
||||
//System.out.println("\n\nRES:\n"+res.getResult());
|
||||
Set<String> folders = new LinkedHashSet<>();
|
||||
List<HyperFlowerAnther> flies = new ArrayList<>();
|
||||
for (String line : res.getResult().split("\n")) {
|
||||
if (line.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
int spaceIdx = line.indexOf(' ');
|
||||
if (spaceIdx == -1) {
|
||||
if (line.startsWith("/")) {
|
||||
flies.add(new HyperFlowerBeeFormation(line));
|
||||
} else { // TODO: TMP add slash + snail until upstream is fixed.
|
||||
flies.add(new HyperFlowerBeeFormation("/" + snail + "/" + line));
|
||||
}
|
||||
folders.add(line);
|
||||
continue;
|
||||
}
|
||||
String name = line.substring(0, spaceIdx);
|
||||
String sizeRaw = line.substring(line.indexOf('('), line.indexOf(')'));
|
||||
sizeRaw = sizeRaw
|
||||
.codePoints()
|
||||
.filter(v -> Character.isDigit(v))
|
||||
.mapToObj(v -> new StringBuilder().appendCodePoint(v))
|
||||
.collect(Collectors.joining());
|
||||
Long size = Long.parseLong(sizeRaw);
|
||||
flies.add(new HyperFlowerBeeFly(name, size));
|
||||
|
||||
// TODO: -r has no folders, TMP delete after upstream issue is fixed
|
||||
int folderIdx = name.lastIndexOf('/');
|
||||
if (folderIdx > 0) {
|
||||
String folder = name.substring(0, folderIdx);
|
||||
if (!folders.contains(folder)) {
|
||||
folders.add(folder);
|
||||
flies.add(new HyperFlowerBeeFormation(folder));
|
||||
}
|
||||
}
|
||||
}
|
||||
return new HyperFlower(flies);
|
||||
}
|
||||
|
||||
public HyperLocalDriveResult cmdSeed(String driveKey) {
|
||||
return executeHyperdrive(HyperLocalDriveCommand.SEED, driveKey);
|
||||
}
|
||||
|
||||
public HyperLocalDriveResult cmdDownload(String driveKey) {
|
||||
return executeHyperdrive(HyperLocalDriveCommand.DOWNLOAD, driveKey);
|
||||
}
|
||||
|
||||
public HyperLocalDriveResult cmdServe(String driveKey) {
|
||||
return executeHyperdrive(HyperLocalDriveCommand.SERVE, driveKey);
|
||||
}
|
||||
|
||||
public HyperLocalDriveResult cmdEntry(String driveKey, String path) {
|
||||
return executeHyperdrive(HyperLocalDriveCommand.ENTRY, driveKey, path);
|
||||
}
|
||||
|
||||
public HyperLocalDriveResult cmdGet(String driveKey, String path) {
|
||||
return executeHyperdrive(HyperLocalDriveCommand.GET, driveKey, path);
|
||||
}
|
||||
|
||||
public HyperLocalDriveResult cmdPut(String driveKey, String path, String blob) {
|
||||
return executeHyperdrive(HyperLocalDriveCommand.PUT, driveKey, path, blob);
|
||||
}
|
||||
|
||||
public HyperLocalDriveInfo cmdInfo(String driveKey) {
|
||||
return new HyperLocalDriveInfo(executeHyperdrive(HyperLocalDriveCommand.INFO, driveKey));
|
||||
}
|
||||
|
||||
public HyperLocalDriveResult cmdPurge(String driveKey) {
|
||||
return executeHyperdrive(HyperLocalDriveCommand.PURGE, driveKey);
|
||||
}
|
||||
|
||||
public HyperLocalDriveResult cmdRemove(String driveKey, String path) {
|
||||
return executeHyperdrive(HyperLocalDriveCommand.RM, driveKey, path);
|
||||
}
|
||||
|
||||
private HyperLocalDriveResult executeHyperdrive(HyperLocalDriveCommand cmd, String...args) {
|
||||
List<String> cmdArgs = new ArrayList<>();
|
||||
cmdArgs.add("drives");
|
||||
cmdArgs.add(cmd.getQName());
|
||||
if (localStoragePath != null && !HyperLocalDriveCommand.INIT.equals(cmd)) {
|
||||
cmdArgs.add("--storage");
|
||||
cmdArgs.add(localStoragePath);
|
||||
}
|
||||
for (String arg : args) {
|
||||
if (arg == null) {
|
||||
continue;
|
||||
}
|
||||
cmdArgs.add(arg);
|
||||
}
|
||||
Consumer<Map<String, String>> tracer = v -> v.put("Hyper-Drives-Command", cmdArgs.stream().collect(Collectors.joining(" ")));
|
||||
ProcessBuilder builder = new ProcessBuilder();
|
||||
builder.command(cmdArgs);
|
||||
builder.directory(new File(System.getProperty("user.home")));
|
||||
builder.redirectErrorStream(true);
|
||||
try {
|
||||
Process process = builder.start();
|
||||
StringBuilder buf = new StringBuilder();
|
||||
try(BufferedReader input = new BufferedReader(new InputStreamReader(process.getInputStream()))) {
|
||||
String line;
|
||||
while ((line = input.readLine()) != null) {
|
||||
buf.append(line);
|
||||
buf.append('\n');
|
||||
}
|
||||
}
|
||||
if (buf.length() > 0) {
|
||||
buf.deleteCharAt(buf.length()-1);
|
||||
}
|
||||
int exitCode = process.waitFor();
|
||||
String result = buf.toString();
|
||||
String storagePath = result;
|
||||
int storagePathIdxStart = buf.indexOf("Storage:");
|
||||
if (storagePathIdxStart >= 0) {
|
||||
int storagePathIdxEnd = buf.indexOf("\n", storagePathIdxStart);
|
||||
if (storagePathIdxEnd > 0) {
|
||||
storagePath = buf.substring(storagePathIdxStart, storagePathIdxEnd);
|
||||
result = buf.substring(storagePathIdxEnd + 1);
|
||||
}
|
||||
}
|
||||
if (exitCode > 0) {
|
||||
//System.out.println("error:....");
|
||||
//System.out.println(result);
|
||||
//System.out.println("");
|
||||
throw FaultStreamDelegate.valueOfDuckTail(getClass(), "js", result).withSignalTrace(getClass(), v -> {
|
||||
v.put("Hyper-Drives-Exit-Code", Integer.toString(exitCode));
|
||||
tracer.accept(v);
|
||||
});
|
||||
}
|
||||
return new HyperLocalDriveResult(storagePath, result);
|
||||
} catch (IOException e) {
|
||||
throw new FaultStreamInterrupted(e, getClass(), tracer);
|
||||
} catch (InterruptedException e) {
|
||||
throw new FaultBeanInterrupted(e, getClass(), tracer);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.redsea.hyper.local.drive;
|
||||
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public enum HyperLocalDriveCommand {
|
||||
INIT,
|
||||
TOUCH,
|
||||
MIRROR,
|
||||
LS,
|
||||
SEED,
|
||||
DOWNLOAD,
|
||||
SERVE,
|
||||
PUT,
|
||||
ENTRY,
|
||||
GET,
|
||||
RM,
|
||||
INFO,
|
||||
PURGE,
|
||||
;
|
||||
|
||||
private final String qName;
|
||||
|
||||
private HyperLocalDriveCommand() {
|
||||
this.qName = name().toLowerCase();
|
||||
}
|
||||
|
||||
public String getQName() {
|
||||
return qName;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.redsea.hyper.local.drive;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public final class HyperLocalDriveInfo extends HyperLocalDriveResult {
|
||||
|
||||
private final Map<HyperLocalDriveInfoLine, String> driveInfo = new HashMap<>();
|
||||
|
||||
public HyperLocalDriveInfo(HyperLocalDriveResult cmd) {
|
||||
super(cmd.getStoragePath(), cmd.getResult());
|
||||
List<String> data = Arrays.asList(cmd.getResult().split("\n"));
|
||||
for (int i=0;i<data.size();i++) {
|
||||
String line = data.get(i);
|
||||
for (HyperLocalDriveInfoLine infoType : HyperLocalDriveInfoLine.values()) {
|
||||
if (line.startsWith(infoType.getSplitPrefix())) {
|
||||
String value = line.substring(infoType.getSplitPrefix().length(), line.length());
|
||||
driveInfo.put(infoType, value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String getDriveInfo(HyperLocalDriveInfoLine infoType) {
|
||||
return driveInfo.get(infoType);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.redsea.hyper.local.drive;
|
||||
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public enum HyperLocalDriveInfoLine {
|
||||
KEY("Key: "),
|
||||
CONTENT_KEY("Content key: "),
|
||||
VERSION("Version: "),
|
||||
WRITABLE("Writable? "),
|
||||
FILES_CORE_LENGTH("Files core length: "),
|
||||
BLOBS_CORE_LENGTH("Blobs core length: "),
|
||||
DRIVE_SIZE("Drive size: "),
|
||||
;
|
||||
|
||||
private final String splitPrefix;
|
||||
|
||||
private HyperLocalDriveInfoLine(String splitPrefix) {
|
||||
this.splitPrefix = splitPrefix;
|
||||
}
|
||||
|
||||
public String getSplitPrefix() {
|
||||
return splitPrefix;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.redsea.hyper.local.drive;
|
||||
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public class HyperLocalDriveResult {
|
||||
|
||||
private final String storagePath;
|
||||
private final String result;
|
||||
|
||||
public HyperLocalDriveResult(String storagePath, String result) {
|
||||
this.storagePath = storagePath;
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public String getStoragePath() {
|
||||
return storagePath;
|
||||
}
|
||||
|
||||
public String getResult() {
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.redsea.hyper.local.drive;
|
||||
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public final class HyperLocalDriveTouch extends HyperLocalDriveResult {
|
||||
|
||||
private final String driveId;
|
||||
|
||||
public HyperLocalDriveTouch(HyperLocalDriveResult cmd) {
|
||||
super(cmd.getStoragePath(), cmd.getResult());
|
||||
driveId = cmd.getResult().split("drive: ")[1];
|
||||
}
|
||||
|
||||
public String getDriveId() {
|
||||
return driveId;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,134 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.redsea.hyper.local;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.file.Files;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import love.distributedrebirth.nx01.redsea.hyper.model.HyperBeeHive;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.model.HyperFlower;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.model.HyperLint;
|
||||
import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.local.drive.HyperLocalDriveInfo;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.local.drive.HyperLocalDriveInfoLine;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.local.drive.HyperLocalDriveTouch;
|
||||
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public class HyperLocalFileSystemTest {
|
||||
|
||||
@Test
|
||||
public void testFail() throws IOException, InterruptedException {
|
||||
HyperLocalFileSystem datfs = new HyperLocalFileSystem();
|
||||
try {
|
||||
datfs.cmdList("", "", true);
|
||||
} catch (Exception e) {
|
||||
if (BassFaultAnchor.class.isAssignableFrom(e.getClass())) {
|
||||
System.err.println(BassFaultAnchor.class.cast(e).toStringZilLaLa());
|
||||
}
|
||||
//throw e;
|
||||
}
|
||||
//ERR: datfs.cmdList("0000000000000000000000000000000000000000000000000000");
|
||||
//Assertions.assertTrue(datfs.cmdInfo("").isError()); // ERR
|
||||
//Assertions.assertTrue(datfs.cmdInfo("0").isError()); // ERR
|
||||
}
|
||||
|
||||
// @Test
|
||||
// public void testMirrorFail() throws IOException, InterruptedException {
|
||||
// HyperLocalFileSystem datfs = new HyperLocalFileSystem();
|
||||
// String driveId = datfs.cmdTouch().getDriveId();
|
||||
// datfs.cmdPut(driveId, "boom/junit.txt", "junit");
|
||||
// datfs.cmdPut(driveId, "boom", "foo");
|
||||
// datfs.cmdMirror(driveId, Files.createTempDirectory("mirrorFail").toString());
|
||||
// }
|
||||
|
||||
@Test
|
||||
public void testBasic() throws IOException, InterruptedException {
|
||||
HyperLocalFileSystem datfs = new HyperLocalFileSystem();
|
||||
HyperLocalDriveTouch touchResult = datfs.cmdTouch();
|
||||
Assertions.assertNotNull(touchResult);
|
||||
Assertions.assertNotNull(touchResult.getResult());
|
||||
Assertions.assertNotNull(touchResult.getDriveId());
|
||||
String driveId = touchResult.getDriveId();
|
||||
Assertions.assertFalse(driveId.contains(" "));
|
||||
Assertions.assertFalse(driveId.contains(":"));
|
||||
|
||||
datfs.cmdPut(driveId, "junit-root.txt", "junit");
|
||||
datfs.cmdPut(driveId, "test/junit1.txt", "foo");
|
||||
datfs.cmdPut(driveId, "test/junit2.txt", "bar");
|
||||
|
||||
HyperBeeHive hive = new HyperBeeHive(touchResult.getDriveId());
|
||||
datfs.put(hive, hive.createHyperLint("junit-root2.txt"), ByteBuffer.wrap("test".getBytes()));
|
||||
|
||||
HyperFlower listResult = datfs.cmdList(driveId, null, true);
|
||||
Assertions.assertNotNull(listResult);
|
||||
Assertions.assertNotNull(listResult.getAnthers());
|
||||
Assertions.assertEquals(5, listResult.getAnthers().size());
|
||||
Assertions.assertEquals(4, listResult.getBeeFlies().size());
|
||||
Assertions.assertEquals(1, listResult.getBeeFormations().size());
|
||||
Assertions.assertEquals("junit", datfs.cmdGet(driveId, "junit-root.txt").getResult());
|
||||
|
||||
datfs.cmdPurge(driveId);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUnicode() throws IOException, InterruptedException {
|
||||
HyperLocalFileSystem datfs = new HyperLocalFileSystem();
|
||||
HyperLocalDriveTouch touchResult = datfs.cmdTouch();
|
||||
Assertions.assertNotNull(touchResult);
|
||||
String driveId = touchResult.getDriveId();
|
||||
|
||||
datfs.cmdPut(driveId, "仙上主天.txt", "仙上主天");
|
||||
datfs.cmdPut(driveId, "𑀳𑁂𑀮𑀺𑀉𑁄𑀤𑁄𑀭𑁂𑀡𑀪𑀸𑀕.txt", "𑀳𑁂𑀮𑀺𑀉𑁄𑀤𑁄𑀭𑁂𑀡𑀪𑀸𑀕");
|
||||
datfs.cmdPut(driveId, "ᒡᒢᑊᒻᒻᓫᔿ.txt", "ᒡᒢᑊᒻᒻᓫᔿ");
|
||||
datfs.cmdPut(driveId, "יֽ֕זְ֔/זֲ֟דֲ֩יֳ֟ײֳ֔יֳ֞וֶ֕זֵ֟ױֳ֩רְ֠װֶ֔רְ֠װֶ֔װֽ֕רֶ֔יֽ֔יֽ֔װֶ֕וְ֕ײֵ֔וֲ֩", "𑀳𑁂𑀮𑀺𑀉𑁄𑀤𑁄𑀭𑁂𑀡𑀪𑀸𑀕ᒡᒢᑊᒻᒻᓫᔿ仙上主天");
|
||||
|
||||
HyperFlower listResult = datfs.cmdList(driveId, null, true);
|
||||
Assertions.assertNotNull(listResult);
|
||||
Assertions.assertNotNull(listResult.getAnthers());
|
||||
Assertions.assertEquals(5, listResult.getAnthers().size());
|
||||
|
||||
Assertions.assertEquals("仙上主天", datfs.cmdGet(driveId, "仙上主天.txt").getResult());
|
||||
Assertions.assertEquals("𑀳𑁂𑀮𑀺𑀉𑁄𑀤𑁄𑀭𑁂𑀡𑀪𑀸𑀕", datfs.cmdGet(driveId, "𑀳𑁂𑀮𑀺𑀉𑁄𑀤𑁄𑀭𑁂𑀡𑀪𑀸𑀕.txt").getResult());
|
||||
Assertions.assertEquals("ᒡᒢᑊᒻᒻᓫᔿ", datfs.cmdGet(driveId, "ᒡᒢᑊᒻᒻᓫᔿ.txt").getResult());
|
||||
Assertions.assertEquals("𑀳𑁂𑀮𑀺𑀉𑁄𑀤𑁄𑀭𑁂𑀡𑀪𑀸𑀕ᒡᒢᑊᒻᒻᓫᔿ仙上主天", datfs.cmdGet(driveId, "יֽ֕זְ֔/זֲ֟דֲ֩יֳ֟ײֳ֔יֳ֞וֶ֕זֵ֟ױֳ֩רְ֠װֶ֔רְ֠װֶ֔װֽ֕רֶ֔יֽ֔יֽ֔װֶ֕וְ֕ײֵ֔וֲ֩").getResult());
|
||||
|
||||
HyperLocalDriveInfo infoResult = datfs.cmdInfo(driveId);
|
||||
Assertions.assertNotNull(infoResult);
|
||||
Assertions.assertNotNull(infoResult.getDriveInfo(HyperLocalDriveInfoLine.KEY));
|
||||
Assertions.assertNotNull("5", infoResult.getDriveInfo(HyperLocalDriveInfoLine.VERSION));
|
||||
Assertions.assertEquals("true", infoResult.getDriveInfo(HyperLocalDriveInfoLine.WRITABLE));
|
||||
Assertions.assertNotNull(infoResult.getDriveInfo(HyperLocalDriveInfoLine.FILES_CORE_LENGTH));
|
||||
|
||||
datfs.cmdPurge(driveId);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
love.distributedrebirth.nx01.warp.fault.report.ReportSitraFaultStackTraceJava3
|
||||
love.distributedrebirth.nx01.warp.fault.report.ReportSitraFaultWarpVersion
|
||||
love.distributedrebirth.nx01.warp.fault.report.ReportSitraRuntimeChapter
|
||||
love.distributedrebirth.nx01.warp.fault.report.ReportSitraRuntimeThreads
|
||||
love.distributedrebirth.nx01.warp.fault.report.ReportSitraSystemChapter
|
||||
love.distributedrebirth.nx01.warp.fault.report.ReportSitraSystemLocale
|
25
nx01-redsea-hyper-nostr/pom.xml
Normal file
25
nx01-redsea-hyper-nostr/pom.xml
Normal file
|
@ -0,0 +1,25 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01</artifactId>
|
||||
<version>〇一。壬寅。一〄-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>nx01-redsea-hyper-nostr</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-redsea-hyper</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-no2all-react-nostr</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.redsea.hyper.nostr;
|
||||
|
||||
/// Hyper NoStr file system
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public class HyperNoStrFileSystem {
|
||||
// TODO add nostr
|
||||
}
|
21
nx01-redsea-hyper/pom.xml
Normal file
21
nx01-redsea-hyper/pom.xml
Normal file
|
@ -0,0 +1,21 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01</artifactId>
|
||||
<version>〇一。壬寅。一〄-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>nx01-redsea-hyper</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-warp-fault</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.redsea.hyper;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Optional;
|
||||
|
||||
import love.distributedrebirth.nx01.redsea.hyper.model.HyperBeeEntry;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.model.HyperBeeHive;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.model.HyperFlower;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.model.HyperLint;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.model.HyperLintSlime;
|
||||
|
||||
/// JDAT file system (minimal)
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public interface HyperFileSystem {
|
||||
|
||||
/// Lists all the flies in the flower door at eden of the hyper bee hive.
|
||||
///
|
||||
/// @param hive The hyper bee hive.
|
||||
/// @return The hyper flower list of flies.
|
||||
HyperFlower eden(HyperBeeHive hive);
|
||||
|
||||
/// Lists the flower flies in an lint slime section of the hyper bee hive.
|
||||
///
|
||||
/// @param hive The hyper bee hive.
|
||||
/// @param slime The hyper lint slime to follow the snail into the bee hive.
|
||||
/// @return The hyper flower list of flies.
|
||||
HyperFlower flower(HyperBeeHive hive, HyperLintSlime slime);
|
||||
|
||||
/// Lists all the flower garden flies in the lint slime section and sub sections of the hyper bee hive.
|
||||
///
|
||||
/// @param hive The hyper bee hive.
|
||||
/// @param slime The hyper lint slime to follow all the snail into the bee hive.
|
||||
/// @return The hyper flower list of flies.
|
||||
HyperFlower garden(HyperBeeHive hive, HyperLintSlime slime);
|
||||
|
||||
/// Retrieves an bee entry from the hyper bee hive.
|
||||
///
|
||||
/// @param hive The hyper bee hive.
|
||||
/// @param lint The hyper lint which links to the bee entry of an bee blob.
|
||||
/// @return The optional bee entry for an bee blob.
|
||||
Optional<HyperBeeEntry> entry(HyperBeeHive hive, HyperLint lint);
|
||||
|
||||
/// Retrieves an bee blob from the hyper bee hive.
|
||||
///
|
||||
/// @param hive The hyper bee hive.
|
||||
/// @param lint The hyper lint which links to the bee blob.
|
||||
/// @return The bee blob honey you requested a lookup for.
|
||||
ByteBuffer get(HyperBeeHive hive, HyperLint lint);
|
||||
|
||||
/// Stores an bee blob in the hyper bee hive.
|
||||
///
|
||||
/// @param hive The hyper bee hive.
|
||||
/// @param lint The hyper lint to anchor the bee blob to.
|
||||
/// @param blob The bee blob honey to save.
|
||||
void put(HyperBeeHive hive, HyperLint lint, ByteBuffer blob);
|
||||
|
||||
/// Delete's an hyper fly bee blob or all lint slime from the hyper bee hive.
|
||||
///
|
||||
/// @param hive The hyper bee hive.
|
||||
/// @param slime The hyper lint slime snail identifier.
|
||||
/// @return The amount of bee hyper flies removed.
|
||||
long rm(HyperBeeHive hive, HyperLintSlime slime);
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.redsea.hyper.model;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/// Adds an hyper slime snail trail to an skull.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
abstract public class AbstractHyperSlime {
|
||||
|
||||
private final String snail; // one or more slugs
|
||||
|
||||
public AbstractHyperSlime(final String snail) {
|
||||
this.snail = Objects.requireNonNull(snail);
|
||||
}
|
||||
|
||||
public final String getSnail() {
|
||||
return snail;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.redsea.hyper.model;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/// The hyper bee hive blob bee entry information meta data.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public final class HyperBeeEntry {
|
||||
|
||||
private final Long sequence;
|
||||
private final String name;
|
||||
|
||||
public HyperBeeEntry(Long sequence, String name) {
|
||||
this.sequence = Objects.requireNonNull(sequence);
|
||||
this.name = Objects.requireNonNull(name);
|
||||
}
|
||||
|
||||
public Long getSequence() {
|
||||
return sequence;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.redsea.hyper.model;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/// The hyper bee hive identifier.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public final class HyperBeeHive {
|
||||
|
||||
private final String key;
|
||||
|
||||
public HyperBeeHive(final String key) {
|
||||
this.key = Objects.requireNonNull(key);
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public HyperLint createHyperLint(String snail) {
|
||||
return new HyperLint(snail);
|
||||
}
|
||||
|
||||
public HyperLintSlime createHyperLintSlime(String snail) {
|
||||
return new HyperLintSlime(snail);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.redsea.hyper.model;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/// An list of flower anther's from the hyper bee hive.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public final class HyperFlower {
|
||||
|
||||
/// Files and folders
|
||||
private final List<HyperFlowerAnther> anthers;
|
||||
|
||||
public HyperFlower(final List<HyperFlowerAnther> anthers) {
|
||||
this.anthers = Objects.requireNonNull(anthers);
|
||||
}
|
||||
|
||||
public List<HyperFlowerAnther> getAnthers() {
|
||||
return anthers;
|
||||
}
|
||||
|
||||
public List<HyperFlowerBeeFly> getBeeFlies() {
|
||||
return filterAnther(HyperFlowerBeeFly.class);
|
||||
}
|
||||
|
||||
public List<HyperFlowerBeeFormation> getBeeFormations() {
|
||||
return filterAnther(HyperFlowerBeeFormation.class);
|
||||
}
|
||||
|
||||
private <T extends HyperFlowerAnther> List<T> filterAnther(Class<T> filterType) {
|
||||
return anthers.stream()
|
||||
.filter(v -> filterType.isAssignableFrom(v.getClass()))
|
||||
.map(v -> filterType.cast(v))
|
||||
.toList();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.redsea.hyper.model;
|
||||
|
||||
/// An hyper flower anther to distribute the flower pollen.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public interface HyperFlowerAnther {
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.redsea.hyper.model;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/// An hyper flower bee fly snail slime anther distribution resource identifier. (a file)
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public final class HyperFlowerBeeFly extends AbstractHyperSlime implements HyperFlowerAnther {
|
||||
|
||||
private final Long size;
|
||||
|
||||
public HyperFlowerBeeFly(final String snail, final Long size) {
|
||||
super(snail);
|
||||
this.size = Objects.requireNonNull(size);
|
||||
}
|
||||
|
||||
public Long getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public HyperLint toHyperLint() {
|
||||
return new HyperLint(getSnail());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.redsea.hyper.model;
|
||||
|
||||
/// An hyper flower bee formation snail slime anther distribution resource identifier. (a folder)
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public class HyperFlowerBeeFormation extends AbstractHyperSlime implements HyperFlowerAnther {
|
||||
|
||||
public HyperFlowerBeeFormation(String snail) {
|
||||
super(snail);
|
||||
}
|
||||
|
||||
public HyperLintSlime toHyperLintSlime() {
|
||||
return new HyperLintSlime(getSnail());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.redsea.hyper.model;
|
||||
|
||||
/// Points to an hyper flower fly bee blob in an hyper bee hive.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public class HyperLint extends AbstractHyperSlime {
|
||||
|
||||
protected HyperLint(final String snail) {
|
||||
super(snail);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.redsea.hyper.model;
|
||||
|
||||
/// Points to an hyper flower fly slime folder in an hyper bee hive.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public class HyperLintSlime extends HyperLint {
|
||||
|
||||
protected HyperLintSlime(final String snail) {
|
||||
super(snail);
|
||||
}
|
||||
}
|
9
nx01-redsea/pom.xml
Normal file
9
nx01-redsea/pom.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01</artifactId>
|
||||
<version>〇一。壬寅。一〄-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>nx01-redsea</artifactId>
|
||||
</project>
|
141
pom.xml
141
pom.xml
|
@ -49,6 +49,10 @@
|
|||
<module>nx01-x4o-tool-ant-plugin</module>
|
||||
<module>nx01-x4o-tool-maven-plugin</module>
|
||||
<module>nx01-x4o-html</module>
|
||||
<module>nx01-redsea</module>
|
||||
<module>nx01-redsea-hyper-local</module>
|
||||
<module>nx01-redsea-hyper</module>
|
||||
<module>nx01-redsea-hyper-nostr</module>
|
||||
</modules>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
|
@ -250,7 +254,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-jpp</artifactId>
|
||||
<artifactId>nx01-jpp-base</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -278,91 +282,6 @@
|
|||
<artifactId>nx01-king-java3seed</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>bassboon-nx01-jdat</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>bassboon-nx01-jdat-local</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>bassboon-nx01-jdat-nostr</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>bassboon-nx01-nostr</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-nx01-wofs</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-poop-scripts</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-popcorn</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-popcorn-duytsdoc</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-popcorn-mm-jdbc</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-redsea</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-redsea-datunes</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-redsea-geofish</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-redsea-jdatstart</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-redsea-maven3</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-redsea-nether2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-warp-fault</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-warp-manifestor</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-no2all-nostr</artifactId>
|
||||
|
@ -408,6 +327,56 @@
|
|||
<artifactId>nx01-no2all-zerofungus</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-poop-scripts</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-popcorn</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-popcorn-duytsdoc</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-popcorn-mm-jdbc</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-redsea</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-redsea-hyper</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-redsea-hyper-local</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-redsea-hyper-nostr</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-warp-fault</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-warp-manifestor</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-x4o-driver</artifactId>
|
||||
|
|
Loading…
Reference in a new issue