Done warp sea and fixed warp core

This commit is contained in:
Willem Cazander 2022-02-23 20:45:23 +01:00
parent 5dc311c93e
commit 569fc724c5
12 changed files with 168 additions and 57 deletions

View file

@ -5,13 +5,13 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class WaterOcean { public class WaterOcean {
private WaterSea sea; private WaterSea water;
public WaterSea theSea() { public WaterSea theWater() {
return sea; return water;
} }
public void setSea(WaterSea sea) { public void fillWater(WaterSea water) {
this.sea = sea; this.water = water;
} }
} }

View file

@ -8,7 +8,7 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class WaterOceanDriver extends X4ODriver<WaterOcean> { public class WaterOceanDriver extends X4ODriver<WaterOcean> {
static final public String LANGUAGE_NAME = "warp-ocean"; static final public String LANGUAGE_NAME = "warp-sea";
static final public String[] LANGUAGE_VERSIONS = new String[]{X4ODriver.DEFAULT_LANGUAGE_VERSION}; static final public String[] LANGUAGE_VERSIONS = new String[]{X4ODriver.DEFAULT_LANGUAGE_VERSION};
@Override @Override

View file

@ -1,5 +1,6 @@
package love.distributedrebirth.warpme.sea; package love.distributedrebirth.warpme.sea;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@ -8,8 +9,8 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
public class WaterSea { public class WaterSea {
private String name; private String name;
private List<WaterSeaChain> seaChains; private List<WaterSeaChain> seaChains = new ArrayList<>();
private List<WaterSeaMagic> seaMagics; private List<WaterSeaMagic> seaMagics = new ArrayList<>();
public String getName() { public String getName() {
return name; return name;

View file

@ -5,19 +5,19 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class WaterSeaChain { public class WaterSeaChain {
private String path;
private String key; private String key;
private String tag; private String tag;
public WaterSeaChain() { public WaterSeaChain() {
} }
public String getPath() { public WaterSeaChain(String key) {
return path; setKey(key);
} }
public void setPath(String path) { public WaterSeaChain(String key, String tag) {
this.path = path; setKey(key);
setTag(tag);
} }
public String getKey() { public String getKey() {

View file

@ -1,34 +1,34 @@
package love.distributedrebirth.warpme.sea; package love.distributedrebirth.warpme.sea;
import java.util.List;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class WaterSeaMagic { public class WaterSeaMagic {
private String magicMime; private String mime;
private List<WaterSeaMagicResource> resources; private String file;
public String getMagicMime() { public WaterSeaMagic() {
return magicMime;
} }
public void setMagicMime(String magicMime) { public WaterSeaMagic(String mime, String file) {
this.magicMime = magicMime; setMime(mime);
setFile(file);
} }
public List<WaterSeaMagicResource> getResources() { public String getMime() {
return resources; return mime;
} }
public void setResources(List<WaterSeaMagicResource> resources) { public void setMime(String mime) {
for (WaterSeaMagicResource resource: resources) { this.mime = mime;
addResource(resource);
}
} }
public void addResource(WaterSeaMagicResource resource) { public String getFile() {
resources.add(resource); return file;
}
public void setFile(String file) {
this.file = file;
} }
} }

View file

@ -1,17 +0,0 @@
package love.distributedrebirth.warpme.sea;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class WaterSeaMagicResource {
private String file;
public String getFile() {
return file;
}
public void setFile(String file) {
this.file = file;
}
}

View file

@ -8,16 +8,16 @@
id="warp-core-module"> id="warp-core-module">
<eld:classBindingHandler id="Bucket-Water" <eld:classBindingHandler id="Bucket-Water"
parentClass="love.distributedrebirth.numberxd.base2t.part.warp.WaterBucket" parentClass="love.distributedrebirth.warpme.core.WaterBucket"
childClass="love.distributedrebirth.numberxd.base2t.part.warp.WaterCipher" childClass="love.distributedrebirth.warpme.core.WaterCipher"
addMethod="fillWater" getMethod="theWater" /> addMethod="fillWater" getMethod="theWater" />
<eld:classBindingHandler id="Water-Heart" <eld:classBindingHandler id="Water-Heart"
parentClass="love.distributedrebirth.numberxd.base2t.part.warp.WaterCipher" parentClass="love.distributedrebirth.warpme.core.WaterCipher"
childClass="love.distributedrebirth.numberxd.base2t.part.warp.WaterCipherHeart" childClass="love.distributedrebirth.warpme.core.WaterCipherHeart"
addMethod="addCipherHeart" getMethod="getCipherHearts" /> addMethod="addCipherHeart" getMethod="getCipherHearts" />
<eld:classBindingHandler id="Heart-Tone" <eld:classBindingHandler id="Heart-Tone"
parentClass="love.distributedrebirth.numberxd.base2t.part.warp.WaterCipherHeart" parentClass="love.distributedrebirth.warpme.core.WaterCipherHeart"
childClass="love.distributedrebirth.numberxd.base2t.part.warp.WaterCipherHeartTone" childClass="love.distributedrebirth.warpme.core.WaterCipherHeartTone"
addMethod="addHeartTone" getMethod="getHeartTones" /> addMethod="addHeartTone" getMethod="getHeartTones" />
<eld:namespace <eld:namespace
@ -27,7 +27,7 @@
description="Root namespace to have nice namespaceing." description="Root namespace to have nice namespaceing."
name="WarpCore Root Namespace" languageRoot="true" id="root"> name="WarpCore Root Namespace" languageRoot="true" id="root">
<eld:element tag="bucket" <eld:element tag="bucket"
objectClass="love.distributedrebirth.numberxd.base2t.part.warp.WaterBucket"/> objectClass="love.distributedrebirth.warpme.core.WaterBucket"/>
</eld:namespace> </eld:namespace>
<eld:namespace <eld:namespace
@ -37,10 +37,10 @@
description="Language namespace to store warp cipher" description="Language namespace to store warp cipher"
name="WarpCore Language Namespace" id="cipher"> name="WarpCore Language Namespace" id="cipher">
<eld:element tag="water" <eld:element tag="water"
objectClass="love.distributedrebirth.numberxd.base2t.part.warp.WaterCipher" /> objectClass="love.distributedrebirth.warpme.core.WaterCipher" />
<eld:element tag="heart" <eld:element tag="heart"
objectClass="love.distributedrebirth.numberxd.base2t.part.warp.WaterCipherHeart" /> objectClass="love.distributedrebirth.warpme.core.WaterCipherHeart" />
<eld:element tag="tone" <eld:element tag="tone"
objectClass="love.distributedrebirth.numberxd.base2t.part.warp.WaterCipherHeartTone" /> objectClass="love.distributedrebirth.warpme.core.WaterCipherHeartTone" />
</eld:namespace> </eld:namespace>
</root:module> </root:module>

View file

@ -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-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:element tag="chain"
objectClass="love.distributedrebirth.warpme.sea.WaterSeaChain" />
<eld:element tag="magic"
objectClass="love.distributedrebirth.warpme.sea.WaterSeaMagic" />
</eld:namespace>
</root:module>

View file

@ -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>

View file

@ -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("build/out-core.xml"));
}
}

View file

@ -21,6 +21,6 @@ public class WaterShotDriverTest {
drugs.addSoftHash(new WaterSoftHash("test2.txt", "ASDFYYF234234SDFSDFASDFS")); drugs.addSoftHash(new WaterSoftHash("test2.txt", "ASDFYYF234234SDFSDFASDFS"));
Assertions.assertNotNull(drugs); Assertions.assertNotNull(drugs);
WaterShotDriver.newInstance().createWriter().writeFile(drugs, new java.io.File("build/output.xml")); WaterShotDriver.newInstance().createWriter().writeFile(drugs, new java.io.File("build/out-hash.xml"));
} }
} }

View file

@ -0,0 +1,32 @@
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");
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("build/out-sea.xml"));
}
}