Move libs to top level
This commit is contained in:
parent
87ce108bd1
commit
57f46b2210
212 changed files with 16 additions and 29 deletions
20
gdxapp4d-lib-warpme/pom.xml
Normal file
20
gdxapp4d-lib-warpme/pom.xml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<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.gdxapp4d</groupId>
|
||||
<artifactId>gdxapp4d</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>gdxapp4d-lib-warpme</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.gdxapp4d</groupId>
|
||||
<artifactId>gdxapp4d-lib-bassboonyd</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.x4o</groupId>
|
||||
<artifactId>x4o-driver</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package love.distributedrebirth.warpme;
|
||||
|
||||
public class Warpᵐᵉ {
|
||||
|
||||
public static final String WARP_CORE = "warp-core.xml";
|
||||
public static final String WARP_HASH = "warp-hash.xml";
|
||||
public static final String WARP_SEA = "warp-sea.xml";
|
||||
public static final String WARP_SHIP = "warp-ship.xml";
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package love.distributedrebirth.warpme.core;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterBucket {
|
||||
|
||||
private WaterCipher water;
|
||||
|
||||
public WaterCipher theWater() {
|
||||
return water;
|
||||
}
|
||||
|
||||
public void fillWater(WaterCipher water) {
|
||||
this.water = water;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package love.distributedrebirth.warpme.core;
|
||||
|
||||
import org.x4o.xml.X4ODriver;
|
||||
import org.x4o.xml.X4ODriverManager;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterBucketDriver extends X4ODriver<WaterBucket> {
|
||||
|
||||
static final public String LANGUAGE_NAME = "warp-core";
|
||||
static final public String[] LANGUAGE_VERSIONS = new String[]{X4ODriver.DEFAULT_LANGUAGE_VERSION};
|
||||
|
||||
@Override
|
||||
public String getLanguageName() {
|
||||
return LANGUAGE_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getLanguageVersions() {
|
||||
return LANGUAGE_VERSIONS;
|
||||
}
|
||||
|
||||
static public WaterBucketDriver newInstance() {
|
||||
return (WaterBucketDriver)X4ODriverManager.getX4ODriver(LANGUAGE_NAME);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
package love.distributedrebirth.warpme.core;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterCipher {
|
||||
|
||||
private String name;
|
||||
private String description;
|
||||
private List<WaterCipherHeart> cipherHearts;
|
||||
|
||||
public WaterCipher() {
|
||||
cipherHearts = new ArrayList<>();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public List<WaterCipherHeart> getCipherHearts() {
|
||||
return cipherHearts;
|
||||
}
|
||||
|
||||
public void addCipherHeart(WaterCipherHeart cipherHeart) {
|
||||
this.cipherHearts.add(cipherHeart);
|
||||
}
|
||||
|
||||
public void setCipherHearts(List<WaterCipherHeart> cipherHearts) {
|
||||
this.cipherHearts = cipherHearts;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package love.distributedrebirth.warpme.core;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterCipherHeart {
|
||||
|
||||
private Integer bass;
|
||||
private List<WaterCipherHeartTone> heartTones;
|
||||
|
||||
public WaterCipherHeart() {
|
||||
heartTones = new ArrayList<>();
|
||||
}
|
||||
|
||||
public Integer getBass() {
|
||||
return bass;
|
||||
}
|
||||
|
||||
public void setBass(Integer bass) {
|
||||
this.bass = bass;
|
||||
}
|
||||
|
||||
public List<WaterCipherHeartTone> getHeartTones() {
|
||||
return heartTones;
|
||||
}
|
||||
|
||||
public void addHeartTone(WaterCipherHeartTone heartTone) {
|
||||
heartTones.add(heartTone);
|
||||
}
|
||||
|
||||
public void setHeartTones(List<WaterCipherHeartTone> heartTones) {
|
||||
this.heartTones = heartTones;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
package love.distributedrebirth.warpme.core;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterCipherHeartTone {
|
||||
|
||||
private String part;
|
||||
private String dialTone;
|
||||
private String chinaKey;
|
||||
private String chinaValue;
|
||||
|
||||
public WaterCipherHeartTone() {
|
||||
}
|
||||
|
||||
public String getPart() {
|
||||
return part;
|
||||
}
|
||||
|
||||
public void setPart(String part) {
|
||||
this.part = part;
|
||||
}
|
||||
|
||||
public String getDialTone() {
|
||||
return dialTone;
|
||||
}
|
||||
|
||||
public void setDialTone(String dialTone) {
|
||||
this.dialTone = dialTone;
|
||||
}
|
||||
|
||||
public String getChinaKey() {
|
||||
return chinaKey;
|
||||
}
|
||||
|
||||
public void setChinaKey(String chinaKey) {
|
||||
this.chinaKey = chinaKey;
|
||||
}
|
||||
|
||||
public String getChinaValue() {
|
||||
return chinaValue;
|
||||
}
|
||||
|
||||
public void setChinaValue(String chinaValue) {
|
||||
this.chinaValue = chinaValue;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package love.distributedrebirth.warpme.hash;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterShot {
|
||||
|
||||
private List<WaterSoftHash> softHashes = new ArrayList<>();
|
||||
|
||||
public List<WaterSoftHash> getSoftHashes() {
|
||||
return softHashes;
|
||||
}
|
||||
|
||||
public void setSoftHashes(List<WaterSoftHash> shotHashes) {
|
||||
for (WaterSoftHash hash:shotHashes) {
|
||||
addSoftHash(hash);
|
||||
}
|
||||
}
|
||||
|
||||
public void addSoftHash(WaterSoftHash softHash) {
|
||||
this.softHashes.add(softHash);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
package love.distributedrebirth.warpme.hash;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
||||
import org.x4o.xml.io.X4OConnectionException;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.warpme.Warpᵐᵉ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterShotAddict {
|
||||
|
||||
public boolean validateWarpChainLink(File folder) throws FileNotFoundException, X4OConnectionException, SAXException, IOException, NoSuchAlgorithmException {
|
||||
File fileWarpHash = new File(folder, Warpᵐᵉ.WARP_HASH);
|
||||
if (!fileWarpHash.exists()) {
|
||||
return false;
|
||||
}
|
||||
WaterShot waterShot = WaterShotDriver.newInstance().createReader().readFile(fileWarpHash);
|
||||
for (WaterSoftHash hash:waterShot.getSoftHashes()) {
|
||||
File checkFile = new File(folder, hash.getFile());
|
||||
if (!checkFile.exists()) {
|
||||
return false;
|
||||
}
|
||||
String fileHex = calcHashInHex(checkFile);
|
||||
if (!fileHex.equals(hash.getHex())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public void updateWarpHashes(File folder) throws FileNotFoundException, X4OConnectionException, SAXException, IOException, NoSuchAlgorithmException {
|
||||
File fileWarpHash = new File(folder, Warpᵐᵉ.WARP_HASH);
|
||||
WaterShot waterShot = WaterShotDriver.newInstance().createReader().readFile(fileWarpHash);
|
||||
for (WaterSoftHash hash:waterShot.getSoftHashes()) {
|
||||
hash.setHex(calcHashInHex(new File(folder, hash.getFile())));
|
||||
}
|
||||
WaterShotDriver.newInstance().createWriter().writeFile(waterShot, fileWarpHash);
|
||||
}
|
||||
|
||||
private String calcHashInHex(File file) throws IOException, NoSuchAlgorithmException {
|
||||
MessageDigest digest = MessageDigest.getInstance("SHA-256");
|
||||
byte[] bytes = Files.readAllBytes(file.toPath());
|
||||
byte[] encodedhash = digest.digest(bytes);
|
||||
return bytesToHex(encodedhash);
|
||||
}
|
||||
|
||||
private String bytesToHex(byte[] hash) {
|
||||
StringBuilder hexString = new StringBuilder(2 * hash.length);
|
||||
for (int i = 0; i < hash.length; i++) {
|
||||
String hex = Integer.toHexString(0xff & hash[i]);
|
||||
if(hex.length() == 1) {
|
||||
hexString.append('0');
|
||||
}
|
||||
hexString.append(hex);
|
||||
}
|
||||
return hexString.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package love.distributedrebirth.warpme.hash;
|
||||
|
||||
import org.x4o.xml.X4ODriver;
|
||||
import org.x4o.xml.X4ODriverManager;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterShotDriver extends X4ODriver<WaterShot> {
|
||||
|
||||
static final public String LANGUAGE_NAME = "warp-hash";
|
||||
static final public String[] LANGUAGE_VERSIONS = new String[]{X4ODriver.DEFAULT_LANGUAGE_VERSION};
|
||||
|
||||
@Override
|
||||
public String getLanguageName() {
|
||||
return LANGUAGE_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getLanguageVersions() {
|
||||
return LANGUAGE_VERSIONS;
|
||||
}
|
||||
|
||||
static public WaterShotDriver newInstance() {
|
||||
return (WaterShotDriver)X4ODriverManager.getX4ODriver(LANGUAGE_NAME);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package love.distributedrebirth.warpme.hash;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterSoftHash {
|
||||
|
||||
private String file;
|
||||
private String hex;
|
||||
|
||||
public WaterSoftHash() {
|
||||
}
|
||||
|
||||
public WaterSoftHash(String file, String hex) {
|
||||
setFile(file);
|
||||
setHex(hex);
|
||||
}
|
||||
|
||||
public String getFile() {
|
||||
return file;
|
||||
}
|
||||
|
||||
public void setFile(String file) {
|
||||
this.file = file;
|
||||
}
|
||||
|
||||
public String getHex() {
|
||||
return hex;
|
||||
}
|
||||
|
||||
public void setHex(String hex) {
|
||||
this.hex = hex;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package love.distributedrebirth.warpme.sea;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterOcean {
|
||||
|
||||
private WaterSea water;
|
||||
|
||||
public WaterSea theWater() {
|
||||
return water;
|
||||
}
|
||||
|
||||
public void fillWater(WaterSea water) {
|
||||
this.water = water;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package love.distributedrebirth.warpme.sea;
|
||||
|
||||
import org.x4o.xml.X4ODriver;
|
||||
import org.x4o.xml.X4ODriverManager;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterOceanDriver extends X4ODriver<WaterOcean> {
|
||||
|
||||
static final public String LANGUAGE_NAME = "warp-sea";
|
||||
static final public String[] LANGUAGE_VERSIONS = new String[]{X4ODriver.DEFAULT_LANGUAGE_VERSION};
|
||||
|
||||
@Override
|
||||
public String getLanguageName() {
|
||||
return LANGUAGE_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getLanguageVersions() {
|
||||
return LANGUAGE_VERSIONS;
|
||||
}
|
||||
|
||||
static public WaterOceanDriver newInstance() {
|
||||
return (WaterOceanDriver)X4ODriverManager.getX4ODriver(LANGUAGE_NAME);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
package love.distributedrebirth.warpme.sea;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterSea {
|
||||
|
||||
private String name;
|
||||
private String author;
|
||||
private String provider;
|
||||
private List<WaterSeaChain> seaChains = new ArrayList<>();
|
||||
private List<WaterSeaMagic> seaMagics = new ArrayList<>();
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getAuthor() {
|
||||
return author;
|
||||
}
|
||||
|
||||
public void setAuthor(String author) {
|
||||
this.author = author;
|
||||
}
|
||||
|
||||
public String getProvider() {
|
||||
return provider;
|
||||
}
|
||||
|
||||
public void setProvider(String provider) {
|
||||
this.provider = provider;
|
||||
}
|
||||
|
||||
public List<WaterSeaChain> getSeaChains() {
|
||||
return seaChains;
|
||||
}
|
||||
|
||||
public void setSeaChains(List<WaterSeaChain> seaChains) {
|
||||
for (WaterSeaChain seaChain:seaChains) {
|
||||
addSeaChain(seaChain);
|
||||
}
|
||||
}
|
||||
|
||||
public void addSeaChain(WaterSeaChain seaChain) {
|
||||
seaChains.add(seaChain);
|
||||
}
|
||||
|
||||
public List<WaterSeaMagic> getSeaMagics() {
|
||||
return seaMagics;
|
||||
}
|
||||
|
||||
public void setSeaMagics(List<WaterSeaMagic> seaMagics) {
|
||||
for (WaterSeaMagic seaMagic: seaMagics) {
|
||||
addSeaMagic(seaMagic);
|
||||
}
|
||||
}
|
||||
|
||||
public void addSeaMagic(WaterSeaMagic seaMagic) {
|
||||
seaMagics.add(seaMagic);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package love.distributedrebirth.warpme.sea;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterSeaChain {
|
||||
|
||||
private String key;
|
||||
private String tag;
|
||||
|
||||
public WaterSeaChain() {
|
||||
}
|
||||
|
||||
public WaterSeaChain(String key) {
|
||||
setKey(key);
|
||||
}
|
||||
|
||||
public WaterSeaChain(String key, String tag) {
|
||||
setKey(key);
|
||||
setTag(tag);
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public String getTag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
public void setTag(String tag) {
|
||||
this.tag = tag;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package love.distributedrebirth.warpme.sea;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterSeaMagic {
|
||||
|
||||
private String mime;
|
||||
private String file;
|
||||
|
||||
public WaterSeaMagic() {
|
||||
}
|
||||
|
||||
public WaterSeaMagic(String mime, String file) {
|
||||
setMime(mime);
|
||||
setFile(file);
|
||||
}
|
||||
|
||||
public String getMime() {
|
||||
return mime;
|
||||
}
|
||||
|
||||
public void setMime(String mime) {
|
||||
this.mime = mime;
|
||||
}
|
||||
|
||||
public String getFile() {
|
||||
return file;
|
||||
}
|
||||
|
||||
public void setFile(String file) {
|
||||
this.file = file;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package love.distributedrebirth.warpme.ship;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterDevice {
|
||||
|
||||
private WaterShip ship;
|
||||
|
||||
public WaterShip theShip() {
|
||||
return ship;
|
||||
}
|
||||
|
||||
public void buildShip(WaterShip ship) {
|
||||
this.ship = ship;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package love.distributedrebirth.warpme.ship;
|
||||
|
||||
import org.x4o.xml.X4ODriver;
|
||||
import org.x4o.xml.X4ODriverManager;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterDeviceDriver extends X4ODriver<WaterDevice> {
|
||||
|
||||
static final public String LANGUAGE_NAME = "warp-ship";
|
||||
static final public String[] LANGUAGE_VERSIONS = new String[]{X4ODriver.DEFAULT_LANGUAGE_VERSION};
|
||||
|
||||
@Override
|
||||
public String getLanguageName() {
|
||||
return LANGUAGE_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getLanguageVersions() {
|
||||
return LANGUAGE_VERSIONS;
|
||||
}
|
||||
|
||||
static public WaterDeviceDriver newInstance() {
|
||||
return (WaterDeviceDriver)X4ODriverManager.getX4ODriver(LANGUAGE_NAME);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
package love.distributedrebirth.warpme.ship;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterShip {
|
||||
|
||||
private String name;
|
||||
private String engine;
|
||||
private List<WaterShipOcean> shipOceans = new ArrayList<>();
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getEngine() {
|
||||
return engine;
|
||||
}
|
||||
|
||||
public void setEngine(String engine) {
|
||||
this.engine = engine;
|
||||
}
|
||||
|
||||
public List<WaterShipOcean> getShipOceans() {
|
||||
return shipOceans;
|
||||
}
|
||||
|
||||
public void setShipOcean(List<WaterShipOcean> shipOceans) {
|
||||
for (WaterShipOcean shipOcean:shipOceans) {
|
||||
addShipOcean(shipOcean);
|
||||
}
|
||||
}
|
||||
|
||||
public void addShipOcean(WaterShipOcean shipSea) {
|
||||
shipOceans.add(shipSea);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package love.distributedrebirth.warpme.ship;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterShipOcean {
|
||||
|
||||
private String sea;
|
||||
|
||||
public WaterShipOcean() {
|
||||
}
|
||||
|
||||
public WaterShipOcean(String sea) {
|
||||
setSea(sea);
|
||||
}
|
||||
|
||||
public String getSea() {
|
||||
return sea;
|
||||
}
|
||||
|
||||
public void setSea(String sea) {
|
||||
this.sea = sea;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<root:module xmlns:root="http://eld.x4o.org/xml/ns/eld-root"
|
||||
xmlns:eld="http://eld.x4o.org/xml/ns/eld-lang"
|
||||
xmlns:conv="http://eld.x4o.org/xml/ns/eld-conv"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://eld.x4o.org/xml/ns/eld-root http://eld.x4o.org/xml/ns/eld-root-1.0.xsd"
|
||||
providerHost="warp-core.x4o.distributedrebirth.love" providerName="WarpCoreᵐᵉ"
|
||||
id="warp-core-module">
|
||||
|
||||
<eld:classBindingHandler id="Bucket-Water"
|
||||
parentClass="love.distributedrebirth.warpme.core.WaterBucket"
|
||||
childClass="love.distributedrebirth.warpme.core.WaterCipher"
|
||||
addMethod="fillWater" getMethod="theWater" />
|
||||
<eld:classBindingHandler id="Water-Heart"
|
||||
parentClass="love.distributedrebirth.warpme.core.WaterCipher"
|
||||
childClass="love.distributedrebirth.warpme.core.WaterCipherHeart"
|
||||
addMethod="addCipherHeart" getMethod="getCipherHearts" />
|
||||
<eld:classBindingHandler id="Heart-Tone"
|
||||
parentClass="love.distributedrebirth.warpme.core.WaterCipherHeart"
|
||||
childClass="love.distributedrebirth.warpme.core.WaterCipherHeartTone"
|
||||
addMethod="addHeartTone" getMethod="getHeartTones" />
|
||||
|
||||
<eld:namespace
|
||||
uri="http://wrap-core.x4o.distributedrebirth.love/xml/ns/warp-core-root"
|
||||
schemaUri="http://warp-core.x4o.distributedrebirth.love/xml/ns/warp-core-root-1.0.xsd"
|
||||
schemaResource="warp-core-root-1.0.xsd" schemaPrefix="root"
|
||||
description="Root namespace to have nice namespaceing."
|
||||
name="WarpCore Root Namespace" languageRoot="true" id="root">
|
||||
<eld:element tag="bucket"
|
||||
objectClass="love.distributedrebirth.warpme.core.WaterBucket"/>
|
||||
</eld:namespace>
|
||||
|
||||
<eld:namespace
|
||||
uri="http://warp-core.x4o.distributedrebirth.love/xml/ns/warp-core-cipher"
|
||||
schemaUri="http://warp-core.x4o.distributedrebirth.love/xml/ns/warp-core-cipher-1.0.xsd"
|
||||
schemaResource="warp-core-lang-1.0.xsd" schemaPrefix="cipher"
|
||||
description="Language namespace to store warp cipher"
|
||||
name="WarpCore Language Namespace" id="cipher">
|
||||
<eld:element tag="water"
|
||||
objectClass="love.distributedrebirth.warpme.core.WaterCipher" />
|
||||
<eld:element tag="heart"
|
||||
objectClass="love.distributedrebirth.warpme.core.WaterCipherHeart" />
|
||||
<eld:element tag="tone"
|
||||
objectClass="love.distributedrebirth.warpme.core.WaterCipherHeartTone" />
|
||||
</eld:namespace>
|
||||
</root:module>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<modules version="1.0"
|
||||
xmlns="http://language.x4o.org/xml/ns/modules"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://language.x4o.org/xml/ns/modules http://language.x4o.org/xml/ns/modules-1.0.xsd"
|
||||
>
|
||||
<language version="1.0">
|
||||
<eld-resource>warp-core-lang.eld</eld-resource>
|
||||
</language>
|
||||
</modules>
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<root:module xmlns:root="http://eld.x4o.org/xml/ns/eld-root"
|
||||
xmlns:eld="http://eld.x4o.org/xml/ns/eld-lang"
|
||||
xmlns:conv="http://eld.x4o.org/xml/ns/eld-conv"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://eld.x4o.org/xml/ns/eld-root http://eld.x4o.org/xml/ns/eld-root-1.0.xsd"
|
||||
providerHost="warp-hash.x4o.distributedrebirth.love" providerName="WarpHashᵐᵉ"
|
||||
id="warp-hash-module">
|
||||
|
||||
<eld:classBindingHandler id="WaterShot-WaterSoftHash"
|
||||
parentClass="love.distributedrebirth.warpme.hash.WaterShot"
|
||||
childClass="love.distributedrebirth.warpme.hash.WaterSoftHash"
|
||||
addMethod="addSoftHash" getMethod="getSoftHashes" />
|
||||
|
||||
<eld:namespace
|
||||
uri="http://wrap-core.x4o.distributedrebirth.love/xml/ns/warp-hash-root"
|
||||
schemaUri="http://warp-hash.x4o.distributedrebirth.love/xml/ns/warp-hash-root-1.0.xsd"
|
||||
schemaResource="warp-hash-root-1.0.xsd" schemaPrefix="root"
|
||||
description="Root namespace to have nice namespaceing."
|
||||
name="WarpHash Root Namespace" languageRoot="true" id="root">
|
||||
<eld:element tag="shot"
|
||||
objectClass="love.distributedrebirth.warpme.hash.WaterShot"/>
|
||||
</eld:namespace>
|
||||
|
||||
<eld:namespace
|
||||
uri="http://warp-hash.x4o.distributedrebirth.love/xml/ns/warp-hash-soft"
|
||||
schemaUri="http://warp-hash.x4o.distributedrebirth.love/xml/ns/warp-hash-soft-1.0.xsd"
|
||||
schemaResource="warp-hash-soft-1.0.xsd" schemaPrefix="soft"
|
||||
description="Language namespace to store warp hash"
|
||||
name="WarpHash Language Namespace" id="soft">
|
||||
<eld:element tag="hash"
|
||||
objectClass="love.distributedrebirth.warpme.hash.WaterSoftHash" />
|
||||
</eld:namespace>
|
||||
</root:module>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<modules version="1.0"
|
||||
xmlns="http://language.x4o.org/xml/ns/modules"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://language.x4o.org/xml/ns/modules http://language.x4o.org/xml/ns/modules-1.0.xsd"
|
||||
>
|
||||
<language version="1.0">
|
||||
<eld-resource>warp-hash-lang.eld</eld-resource>
|
||||
</language>
|
||||
</modules>
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<root:module xmlns:root="http://eld.x4o.org/xml/ns/eld-root"
|
||||
xmlns:eld="http://eld.x4o.org/xml/ns/eld-lang"
|
||||
xmlns:conv="http://eld.x4o.org/xml/ns/eld-conv"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://eld.x4o.org/xml/ns/eld-root http://eld.x4o.org/xml/ns/eld-root-1.0.xsd"
|
||||
providerHost="warp-sea.x4o.distributedrebirth.love" providerName="WarpSeaᵐᵉ"
|
||||
id="warp-sea-module">
|
||||
|
||||
<eld:classBindingHandler id="WaterOcean-WaterSea"
|
||||
parentClass="love.distributedrebirth.warpme.sea.WaterOcean"
|
||||
childClass="love.distributedrebirth.warpme.sea.WaterSea"
|
||||
addMethod="fillWater" getMethod="theWater" />
|
||||
<eld:classBindingHandler id="WaterSea-WaterSeaChain"
|
||||
parentClass="love.distributedrebirth.warpme.sea.WaterSea"
|
||||
childClass="love.distributedrebirth.warpme.sea.WaterSeaChain"
|
||||
addMethod="addSeaChain" getMethod="getSeaChains" />
|
||||
<eld:classBindingHandler id="WaterSea-Tone"
|
||||
parentClass="love.distributedrebirth.warpme.sea.WaterSea"
|
||||
childClass="love.distributedrebirth.warpme.sea.WaterSeaMagic"
|
||||
addMethod="addSeaMagic" getMethod="getSeaMagics" />
|
||||
|
||||
<eld:namespace
|
||||
uri="http://wrap-sea.x4o.distributedrebirth.love/xml/ns/warp-sea-root"
|
||||
schemaUri="http://warp-sea.x4o.distributedrebirth.love/xml/ns/warp-sea-root-1.0.xsd"
|
||||
schemaResource="warp-sea-root-1.0.xsd" schemaPrefix="root"
|
||||
description="Root namespace to have nice namespaceing."
|
||||
name="WarpSea Root Namespace" languageRoot="true" id="root">
|
||||
<eld:element tag="ocean"
|
||||
objectClass="love.distributedrebirth.warpme.sea.WaterOcean"/>
|
||||
</eld:namespace>
|
||||
|
||||
<eld:namespace
|
||||
uri="http://warp-sea.x4o.distributedrebirth.love/xml/ns/warp-sea-link"
|
||||
schemaUri="http://warp-sea.x4o.distributedrebirth.love/xml/ns/warp-sea-link-1.0.xsd"
|
||||
schemaResource="warp-sea-link-1.0.xsd" schemaPrefix="link"
|
||||
description="Language namespace to store warp sea"
|
||||
name="WarpSea Language Namespace" id="link">
|
||||
<eld:element tag="sea"
|
||||
objectClass="love.distributedrebirth.warpme.sea.WaterSea">
|
||||
<eld:attribute id="name" writeOrder="0"/>
|
||||
<eld:attribute id="provider" writeOrder="1" required="false"/>
|
||||
<eld:attribute id="author" writeOrder="2" required="false"/>
|
||||
</eld:element>
|
||||
<eld:element tag="chain"
|
||||
objectClass="love.distributedrebirth.warpme.sea.WaterSeaChain" />
|
||||
<eld:element tag="magic"
|
||||
objectClass="love.distributedrebirth.warpme.sea.WaterSeaMagic" />
|
||||
</eld:namespace>
|
||||
</root:module>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<modules version="1.0"
|
||||
xmlns="http://language.x4o.org/xml/ns/modules"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://language.x4o.org/xml/ns/modules http://language.x4o.org/xml/ns/modules-1.0.xsd"
|
||||
>
|
||||
<language version="1.0">
|
||||
<eld-resource>warp-sea-lang.eld</eld-resource>
|
||||
</language>
|
||||
</modules>
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<root:module xmlns:root="http://eld.x4o.org/xml/ns/eld-root"
|
||||
xmlns:eld="http://eld.x4o.org/xml/ns/eld-lang"
|
||||
xmlns:conv="http://eld.x4o.org/xml/ns/eld-conv"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://eld.x4o.org/xml/ns/eld-root http://eld.x4o.org/xml/ns/eld-root-1.0.xsd"
|
||||
providerHost="warp-ship.x4o.distributedrebirth.love" providerName="WarpShipᵐᵉ"
|
||||
id="warp-ship-module">
|
||||
|
||||
<eld:classBindingHandler id="WaterDevice-WaterShip"
|
||||
parentClass="love.distributedrebirth.warpme.ship.WaterDevice"
|
||||
childClass="love.distributedrebirth.warpme.ship.WaterShip"
|
||||
addMethod="buildShip" getMethod="theShip" />
|
||||
<eld:classBindingHandler id="WaterShip-WaterShipOcean"
|
||||
parentClass="love.distributedrebirth.warpme.ship.WaterShip"
|
||||
childClass="love.distributedrebirth.warpme.ship.WaterShipOcean"
|
||||
addMethod="addShipOcean" getMethod="getShipOceans" />
|
||||
|
||||
<eld:namespace
|
||||
uri="http://wrap-ship.x4o.distributedrebirth.love/xml/ns/warp-ship-root"
|
||||
schemaUri="http://warp-ship.x4o.distributedrebirth.love/xml/ns/warp-ship-root-1.0.xsd"
|
||||
schemaResource="warp-ship-root-1.0.xsd" schemaPrefix="root"
|
||||
description="Root namespace to have nice namespaceing."
|
||||
name="WarpShip Root Namespace" languageRoot="true" id="root">
|
||||
<eld:element tag="device"
|
||||
objectClass="love.distributedrebirth.warpme.ship.WaterDevice"/>
|
||||
</eld:namespace>
|
||||
|
||||
<eld:namespace
|
||||
uri="http://warp-ship.x4o.distributedrebirth.love/xml/ns/warp-ship-boot"
|
||||
schemaUri="http://warp-ship.x4o.distributedrebirth.love/xml/ns/warp-ship-boot-1.0.xsd"
|
||||
schemaResource="warp-ship-boot-1.0.xsd" schemaPrefix="boot"
|
||||
description="Language namespace to store the warp ship."
|
||||
name="WarpShip Language Namespace" id="boot">
|
||||
<eld:element tag="ship"
|
||||
objectClass="love.distributedrebirth.warpme.ship.WaterShip" >
|
||||
<eld:attribute id="name" writeOrder="0"/>
|
||||
<eld:attribute id="engine" writeOrder="1"/>
|
||||
</eld:element>
|
||||
<eld:element tag="ocean"
|
||||
objectClass="love.distributedrebirth.warpme.ship.WaterShipOcean" />
|
||||
</eld:namespace>
|
||||
</root:module>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<modules version="1.0"
|
||||
xmlns="http://language.x4o.org/xml/ns/modules"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://language.x4o.org/xml/ns/modules http://language.x4o.org/xml/ns/modules-1.0.xsd"
|
||||
>
|
||||
<language version="1.0">
|
||||
<eld-resource>warp-ship-lang.eld</eld-resource>
|
||||
</language>
|
||||
</modules>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<drivers version="1.0"
|
||||
xmlns="http://language.x4o.org/xml/ns/drivers"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://language.x4o.org/xml/ns/drivers http://language.x4o.org/xml/ns/drivers-1.0.xsd"
|
||||
>
|
||||
<driver language="warp-core" className="love.distributedrebirth.warpme.core.WaterBucketDriver"/>
|
||||
<driver language="warp-hash" className="love.distributedrebirth.warpme.hash.WaterShotDriver"/>
|
||||
<driver language="warp-sea" className="love.distributedrebirth.warpme.sea.WaterOceanDriver"/>
|
||||
<driver language="warp-ship" className="love.distributedrebirth.warpme.ship.WaterDeviceDriver"/>
|
||||
</drivers>
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package love.distributedrebirth.warpme.core;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.x4o.xml.io.X4OConnectionException;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterBucketDriverTest {
|
||||
|
||||
|
||||
@Test
|
||||
public void testWaterOcean() throws X4OConnectionException, SAXException, IOException {
|
||||
|
||||
WaterBucket bucket = new WaterBucket();
|
||||
WaterCipher cipher = new WaterCipher();
|
||||
|
||||
bucket.fillWater(cipher);
|
||||
cipher.setName("name");
|
||||
|
||||
WaterCipherHeartTone tone = new WaterCipherHeartTone();
|
||||
tone.setChinaKey("cn");
|
||||
tone.setDialTone("T1");
|
||||
tone.setPart("PART_0");
|
||||
tone.setChinaValue("china");
|
||||
|
||||
WaterCipherHeart heart = new WaterCipherHeart();
|
||||
heart.setBass(12345);
|
||||
heart.addHeartTone(tone);
|
||||
cipher.addCipherHeart(heart);
|
||||
|
||||
Assertions.assertNotNull(bucket);
|
||||
WaterBucketDriver.newInstance().createWriter().writeFile(bucket, new java.io.File("target/out-core.xml"));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package love.distributedrebirth.warpme.hash;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.x4o.xml.io.X4OConnectionException;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterShotDriverTest {
|
||||
|
||||
|
||||
@Test
|
||||
public void testWaterShot() throws X4OConnectionException, SAXException, IOException {
|
||||
|
||||
WaterShot drugs = new WaterShot();
|
||||
drugs.addSoftHash(new WaterSoftHash("test.txt", "234SDFSDF234234SDFSDF234"));
|
||||
drugs.addSoftHash(new WaterSoftHash("test2.txt", "ASDFYYF234234SDFSDFASDFS"));
|
||||
|
||||
Assertions.assertNotNull(drugs);
|
||||
WaterShotDriver.newInstance().createWriter().writeFile(drugs, new java.io.File("target/out-hash.xml"));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package love.distributedrebirth.warpme.sea;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.x4o.xml.io.X4OConnectionException;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterOceanDriverTest {
|
||||
|
||||
@Test
|
||||
public void testWaterOcean() throws X4OConnectionException, SAXException, IOException {
|
||||
WaterOcean ocean = new WaterOcean();
|
||||
WaterSea sea = new WaterSea();
|
||||
sea.setName("MyFirstSea");
|
||||
sea.setAuthor("willemtsade");
|
||||
sea.setProvider("GDXApp-base");
|
||||
|
||||
ocean.fillWater(sea);
|
||||
|
||||
sea.addSeaChain(new WaterSeaChain("2891738927138923"));
|
||||
sea.addSeaChain(new WaterSeaChain("2389473875891293"));
|
||||
|
||||
sea.addSeaMagic(new WaterSeaMagic("audio/mpegurl", "album/test.m3u"));
|
||||
sea.addSeaMagic(new WaterSeaMagic("inode/directory", "album/"));
|
||||
|
||||
Assertions.assertNotNull(ocean);
|
||||
WaterOceanDriver.newInstance().createWriter().writeFile(ocean, new java.io.File("target/out-sea.xml"));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package love.distributedrebirth.warpme.ship;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.x4o.xml.io.X4OConnectionException;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterDeviceDriverTest {
|
||||
|
||||
@Test
|
||||
public void testWaterDevice() throws X4OConnectionException, SAXException, IOException {
|
||||
WaterDevice device = new WaterDevice();
|
||||
|
||||
WaterShip ship = new WaterShip();
|
||||
ship.setName("tos4-mark1");
|
||||
ship.setEngine("123349858934");
|
||||
ship.addShipOcean(new WaterShipOcean("2349058490584"));
|
||||
ship.addShipOcean(new WaterShipOcean("7867834823244"));
|
||||
ship.addShipOcean(new WaterShipOcean("3948758927389"));
|
||||
|
||||
device.buildShip(ship);
|
||||
|
||||
Assertions.assertNotNull(device);
|
||||
WaterDeviceDriver.newInstance().createWriter().writeFile(device, new java.io.File("target/out-ship.xml"));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue