diff --git a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/BaseNumber.java b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/BaseNumber.java index f15c2b73..6ff372ae 100644 --- a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/BaseNumber.java +++ b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/BaseNumber.java @@ -14,11 +14,7 @@ public interface BaseNumber> { static float CIRCLE_DEGREE = 360f; - int getBitCount(); - - default float getSliceAngle() { - return CIRCLE_DEGREE/getBitCount(); - } + int BãßBitCount(); V toClone(); diff --git a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V006Tixte.java b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V006Tixte.java index dc60793d..55f38e9a 100644 --- a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V006Tixte.java +++ b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V006Tixte.java @@ -38,7 +38,7 @@ public final class V006Tixte implements BaseNumber { } @Override - public int getBitCount() { + public int BãßBitCount() { return BIT_COUNT; } diff --git a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V009Tyte.java b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V009Tyte.java index 7860ec1f..0089bb2a 100644 --- a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V009Tyte.java +++ b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V009Tyte.java @@ -54,7 +54,7 @@ public final class V009Tyte implements BaseNumberTyte { } @Override - public int getBitCount() { + public int BãßBitCount() { return BIT_COUNT; } diff --git a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V018Tord.java b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V018Tord.java index 5049af9c..502b135c 100644 --- a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V018Tord.java +++ b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V018Tord.java @@ -65,7 +65,7 @@ public final class V018Tord implements BaseNumberTyte { } @Override - public int getBitCount() { + public int BãßBitCount() { return BIT_COUNT; } diff --git a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V027Temvig.java b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V027Temvig.java index 7a669677..5a1a1fd6 100644 --- a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V027Temvig.java +++ b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V027Temvig.java @@ -44,7 +44,7 @@ public final class V027Temvig implements BaseNumberTyte { } @Override - public int getBitCount() { + public int BãßBitCount() { return BIT_COUNT; } diff --git a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V036Teger.java b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V036Teger.java index 3b8ac33a..5d1cd144 100644 --- a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V036Teger.java +++ b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V036Teger.java @@ -66,7 +66,7 @@ public final class V036Teger implements BaseNumberTyte { } @Override - public int getBitCount() { + public int BãßBitCount() { return BIT_COUNT; } diff --git a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V042Traw.java b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V042Traw.java index bae9eb8d..64b9e1e3 100644 --- a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V042Traw.java +++ b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V042Traw.java @@ -36,7 +36,7 @@ public final class V042Traw implements BaseNumber { } @Override - public int getBitCount() { + public int BãßBitCount() { return BIT_COUNT; } diff --git a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V072Tong.java b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V072Tong.java index 1b6f143e..6a055249 100644 --- a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V072Tong.java +++ b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V072Tong.java @@ -57,7 +57,7 @@ public final class V072Tong implements BaseNumberTyte { } @Override - public int getBitCount() { + public int BãßBitCount() { return BIT_COUNT; } diff --git a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V144Tocta.java b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V144Tocta.java index cec6e624..f717718b 100644 --- a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V144Tocta.java +++ b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/type/V144Tocta.java @@ -73,7 +73,7 @@ public final class V144Tocta implements BaseNumberTyte { } @Override - public int getBitCount() { + public int BãßBitCount() { return BIT_COUNT; } diff --git a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/typexl/V0x000348ˣᴸ.java b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/typexl/V0x000348ˣᴸ.java index 1941f3e2..0165eb5e 100644 --- a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/typexl/V0x000348ˣᴸ.java +++ b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/typexl/V0x000348ˣᴸ.java @@ -37,7 +37,7 @@ public class V0x000348ˣᴸ implements BaseNumberˣᴸ { } @Override - public int getBitCount() { + public int BãßBitCount() { return BIT_COUNT; } diff --git a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/typexl/V0x000654ˣᴸ.java b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/typexl/V0x000654ˣᴸ.java index 617cb0a7..1c21c4a6 100644 --- a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/typexl/V0x000654ˣᴸ.java +++ b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/typexl/V0x000654ˣᴸ.java @@ -38,7 +38,7 @@ public class V0x000654ˣᴸ implements BaseNumberTyteˣᴸ { } @Override - public int getBitCount() { + public int BãßBitCount() { return BIT_COUNT; } diff --git a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/typexl/V0x000CA8ˣᴸ.java b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/typexl/V0x000CA8ˣᴸ.java index ec012b28..e0ff8bb1 100644 --- a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/typexl/V0x000CA8ˣᴸ.java +++ b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/typexl/V0x000CA8ˣᴸ.java @@ -38,7 +38,7 @@ public class V0x000CA8ˣᴸ implements BaseNumberTyteˣᴸ { } @Override - public int getBitCount() { + public int BãßBitCount() { return BIT_COUNT; } diff --git a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/typexl/V0x0013B0ˣᴸ.java b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/typexl/V0x0013B0ˣᴸ.java index 9baf060e..10dd3c80 100644 --- a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/typexl/V0x0013B0ˣᴸ.java +++ b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/typexl/V0x0013B0ˣᴸ.java @@ -36,7 +36,7 @@ public class V0x0013B0ˣᴸ implements BaseNumberˣᴸ { } @Override - public int getBitCount() { + public int BãßBitCount() { return BIT_COUNT; } diff --git a/lib-numberxd/src/main/love/distributedrebirth/numberxd/x4o/NumberXDModuleLoader.java b/lib-numberxd/src/main/love/distributedrebirth/numberxd/x4o/NumberXDModuleLoader.java index 653ad492..3d610b06 100644 --- a/lib-numberxd/src/main/love/distributedrebirth/numberxd/x4o/NumberXDModuleLoader.java +++ b/lib-numberxd/src/main/love/distributedrebirth/numberxd/x4o/NumberXDModuleLoader.java @@ -2,6 +2,7 @@ package love.distributedrebirth.numberxd.x4o; import org.x4o.xml.conv.ObjectConverter; import org.x4o.xml.eld.lang.ModuleElement; +import org.x4o.xml.element.ElementBindingHandler; import org.x4o.xml.element.ElementClass; import org.x4o.xml.element.ElementClassAttribute; import org.x4o.xml.element.ElementNamespace; @@ -28,17 +29,17 @@ import love.distributedrebirth.numberxd.base2t.type.V144Tocta; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") public class NumberXDModuleLoader implements X4OLanguageModuleLoader { - private static final String PP_NXD_PROVIDER_HOST = "numberxd.x4o.distributedrebirth.love"; + private static final String PP_NXD_PROVIDER_HOST = "unicode4d.x4o.distributedrebirth.love"; private static final String PP_NXD_XMLNS = "http://"+PP_NXD_PROVIDER_HOST+"/xml/ns/"; private static final String PP_NXD_XSD_FILE = "-1.0.xsd"; - private static final String NXD_CORE = "nxd-core"; - private static final String NXD_ROOT = "nxd-root"; - private static final String NXD_CORE_XSD_FILE = NXD_CORE+PP_NXD_XSD_FILE; - private static final String NXD_ROOT_XSD_FILE = NXD_ROOT+PP_NXD_XSD_FILE; - public static final String NXD_CORE_URI = PP_NXD_XMLNS+NXD_CORE; - public static final String NXD_ROOT_URI = PP_NXD_XMLNS+NXD_ROOT; - public static final String NXD_CORE_XSD_URI = NXD_CORE_URI+PP_NXD_XSD_FILE; - public static final String NXD_ROOT_XSD_URI = NXD_ROOT_URI+PP_NXD_XSD_FILE; + private static final String NXD_DATA = "d"; + //private static final String NXD_ROOT = "nxd-root"; + private static final String NXD_DATA_XSD_FILE = NXD_DATA+PP_NXD_XSD_FILE; + //private static final String NXD_ROOT_XSD_FILE = NXD_ROOT+PP_NXD_XSD_FILE; + public static final String NXD_DATA_URI = PP_NXD_XMLNS+NXD_DATA; + //public static final String NXD_ROOT_URI = PP_NXD_XMLNS+NXD_ROOT; + public static final String NXD_DATA_XSD_URI = NXD_DATA_URI+PP_NXD_XSD_FILE; + //public static final String NXD_ROOT_XSD_URI = NXD_ROOT_URI+PP_NXD_XSD_FILE; @Override public void loadLanguageModule(X4OLanguageLocal language, X4OLanguageModuleLocal languageModule) throws X4OLanguageModuleLoaderException { @@ -47,6 +48,11 @@ public class NumberXDModuleLoader implements X4OLanguageModuleLoader { languageModule.setProviderHost(PP_NXD_PROVIDER_HOST); languageModule.setDescription("Number eXtra Dimension Module Loader"); + addBindingHandler(languageModule,new V072TongBindingHandler(),"v072-bind","Binds the V072Tong childeren."); + addBindingHandler(languageModule,new V072TongP1BindingHandler(),"v072P1-bind","Binds the V072TongP1 childeren."); + addBindingHandler(languageModule,new V072TongP2BindingHandler(),"v072P2-bind","Binds the V072TongP2 childeren."); + + /* ElementNamespace namespaceRoot = createNamespaceContext(language,NXD_ROOT,NXD_ROOT_URI,NXD_ROOT_XSD_URI,NXD_ROOT_XSD_FILE,NXD_ROOT); namespaceRoot.setLanguageRoot(true); // Only define single language root so xsd is (mostly) not cicle import. ElementClass rootElement = createElementClass(language,"module",language.getLanguageConfiguration().getDefaultElementLanguageModule(),ModuleElement.class,"The module tag is the root xml element for ELD language."); @@ -54,8 +60,9 @@ public class NumberXDModuleLoader implements X4OLanguageModuleLoader { rootElement.addElementClassAttribute(createElementClassAttribute(language,"providerHost",true,null)); namespaceRoot.addElementClass(rootElement); startAndAddNamespace(language,languageModule,namespaceRoot); + */ - ElementNamespace namespace = createNamespaceContext(language,NXD_CORE,NXD_CORE_URI,NXD_CORE_XSD_URI,NXD_CORE_XSD_FILE,NXD_CORE); + ElementNamespace namespace = createNamespaceContext(language,NXD_DATA,NXD_DATA_URI,NXD_DATA_XSD_URI,NXD_DATA_XSD_FILE,NXD_DATA); configElementClasses(language,namespace); startAndAddNamespace(language,languageModule,namespace); } @@ -65,22 +72,35 @@ public class NumberXDModuleLoader implements X4OLanguageModuleLoader { ec = createElementClass(language,"v006",V006Tixte.class,null,"Defines an V006Tixte number."); //configBãßBȍőnPartAttributes(language, ec, T02PartBinary.PART_1); + namespace.addElementClass(ec); ec = createElementClass(language,"v009",V009Tyte.class,null,"Defines an V009Tyte number."); //configBãßBȍőnPartAttributes(language, ec, T03PartTrit.PART_1); + namespace.addElementClass(ec); ec = createElementClass(language,"v018",V018Tord.class,null,"Defines an V018Tord number."); //configBãßBȍőnPartAttributes(language, ec, T02PartBinary.PART_1); + namespace.addElementClass(ec); - ec = createElementClass(language,"v036",V036Teger.class,null,"Defines an V036Teger number."); + ec = createElementClass(language,"陸",V036Teger.class,null,"Defines an V036Teger number."); //configBãßBȍőnPartAttributes(language, ec, T02PartBinary.PART_1); + namespace.addElementClass(ec); - ec = createElementClass(language,"v072",V072Tong.class,null,"Defines an V072Tong number."); + ec = createElementClass(language,"參",V072Tong.class,null,"Defines an V072Tong number."); //configBãßBȍőnPartAttributes(language, ec, T02PartBinary.PART_1); + namespace.addElementClass(ec); - ec = createElementClass(language,"v072",V144Tocta.class,null,"Defines an V144Tocta number."); + ec = createElementClass(language,"肆",V072TongP1.class,null,"Defines an V072TongP1 number."); //configBãßBȍőnPartAttributes(language, ec, T02PartBinary.PART_1); + namespace.addElementClass(ec); + ec = createElementClass(language,"伍",V072TongP2.class,null,"Defines an V072TongP1 number."); + //configBãßBȍőnPartAttributes(language, ec, T02PartBinary.PART_1); + namespace.addElementClass(ec); + + + ec = createElementClass(language,"v144",V144Tocta.class,null,"Defines an V144Tocta number."); + //configBãßBȍőnPartAttributes(language, ec, T02PartBinary.PART_1); namespace.addElementClass(ec); } @@ -158,4 +178,10 @@ public class NumberXDModuleLoader implements X4OLanguageModuleLoader { namespace.setSchemaPrefix(schemaPrefix); return namespace; } + + private void addBindingHandler(X4OLanguageModuleLocal languageModule,ElementBindingHandler handler,String id,String description) { + handler.setId(id); + handler.setDescription(description); + languageModule.addElementBindingHandler(handler); + } } diff --git a/lib-numberxd/src/main/love/distributedrebirth/numberxd/x4o/V072TongBindingHandler.java b/lib-numberxd/src/main/love/distributedrebirth/numberxd/x4o/V072TongBindingHandler.java new file mode 100644 index 00000000..101acfe2 --- /dev/null +++ b/lib-numberxd/src/main/love/distributedrebirth/numberxd/x4o/V072TongBindingHandler.java @@ -0,0 +1,44 @@ +package love.distributedrebirth.numberxd.x4o; + +import org.x4o.xml.element.AbstractElementBindingHandler; +import org.x4o.xml.element.Element; +import org.x4o.xml.element.ElementBindingHandlerException; + +import love.distributedrebirth.numberxd.base2t.part.T02PartBinary; +import love.distributedrebirth.numberxd.base2t.type.V072Tong; + +public class V072TongBindingHandler extends AbstractElementBindingHandler { + + @Override + public Class[] getBindChildClasses() { + return new Class[] {V072TongP1.class, V072TongP2.class}; + } + + @Override + public Class getBindParentClass() { + return V072Tong.class; + } + + @Override + public void bindChild(Element childElement, V072Tong parent, Object childObject) throws ElementBindingHandlerException { + if (childObject instanceof V072TongP1) { + V072TongP1 p1 = (V072TongP1)childObject; + parent.setValue(T02PartBinary.PART_1, p1.theValue()); + } + if (childObject instanceof V072TongP2) { + V072TongP2 p2 = (V072TongP2)childObject; + parent.setValue(T02PartBinary.PART_2, p2.theValue()); + } + } + + @Override + public void createChilderen(Element parentElement,V072Tong parent) throws ElementBindingHandlerException { + V072TongP1 p1 = new V072TongP1(); + V072TongP2 p2 = new V072TongP2(); + p1.setValue(parent.getValue(T02PartBinary.PART_1)); + p2.setValue(parent.getValue(T02PartBinary.PART_2)); + createChild(parentElement, p1); + createChild(parentElement, p2); + } + +} diff --git a/lib-numberxd/src/main/love/distributedrebirth/numberxd/x4o/V072TongP1.java b/lib-numberxd/src/main/love/distributedrebirth/numberxd/x4o/V072TongP1.java new file mode 100644 index 00000000..10b233ec --- /dev/null +++ b/lib-numberxd/src/main/love/distributedrebirth/numberxd/x4o/V072TongP1.java @@ -0,0 +1,16 @@ +package love.distributedrebirth.numberxd.x4o; + +import love.distributedrebirth.numberxd.base2t.type.V036Teger; + +public class V072TongP1 { + + private V036Teger value; + + public V036Teger theValue() { + return value; + } + + public void setValue(V036Teger value) { + this.value = value; + } +} diff --git a/lib-numberxd/src/main/love/distributedrebirth/numberxd/x4o/V072TongP1BindingHandler.java b/lib-numberxd/src/main/love/distributedrebirth/numberxd/x4o/V072TongP1BindingHandler.java new file mode 100644 index 00000000..4462b012 --- /dev/null +++ b/lib-numberxd/src/main/love/distributedrebirth/numberxd/x4o/V072TongP1BindingHandler.java @@ -0,0 +1,31 @@ +package love.distributedrebirth.numberxd.x4o; + +import org.x4o.xml.element.AbstractElementBindingHandler; +import org.x4o.xml.element.Element; +import org.x4o.xml.element.ElementBindingHandlerException; + +import love.distributedrebirth.numberxd.base2t.type.V036Teger; + +public class V072TongP1BindingHandler extends AbstractElementBindingHandler { + + @Override + public Class[] getBindChildClasses() { + return new Class[] {V036Teger.class}; + } + + @Override + public Class getBindParentClass() { + return V072TongP1.class; + } + + @Override + public void bindChild(Element childElement, V072TongP1 parent, Object childObject) throws ElementBindingHandlerException { + V036Teger child = (V036Teger)childObject; + parent.setValue(child); + } + + @Override + public void createChilderen(Element parentElement,V072TongP1 parent) throws ElementBindingHandlerException { + createChild(parentElement, parent.theValue()); + } +} diff --git a/lib-numberxd/src/main/love/distributedrebirth/numberxd/x4o/V072TongP2.java b/lib-numberxd/src/main/love/distributedrebirth/numberxd/x4o/V072TongP2.java new file mode 100644 index 00000000..7bb2aec8 --- /dev/null +++ b/lib-numberxd/src/main/love/distributedrebirth/numberxd/x4o/V072TongP2.java @@ -0,0 +1,16 @@ +package love.distributedrebirth.numberxd.x4o; + +import love.distributedrebirth.numberxd.base2t.type.V036Teger; + +public class V072TongP2 { + + private V036Teger value; + + public V036Teger theValue() { + return value; + } + + public void setValue(V036Teger value) { + this.value = value; + } +} diff --git a/lib-numberxd/src/main/love/distributedrebirth/numberxd/x4o/V072TongP2BindingHandler.java b/lib-numberxd/src/main/love/distributedrebirth/numberxd/x4o/V072TongP2BindingHandler.java new file mode 100644 index 00000000..3f04d7e6 --- /dev/null +++ b/lib-numberxd/src/main/love/distributedrebirth/numberxd/x4o/V072TongP2BindingHandler.java @@ -0,0 +1,31 @@ +package love.distributedrebirth.numberxd.x4o; + +import org.x4o.xml.element.AbstractElementBindingHandler; +import org.x4o.xml.element.Element; +import org.x4o.xml.element.ElementBindingHandlerException; + +import love.distributedrebirth.numberxd.base2t.type.V036Teger; + +public class V072TongP2BindingHandler extends AbstractElementBindingHandler { + + @Override + public Class[] getBindChildClasses() { + return new Class[] {V036Teger.class}; + } + + @Override + public Class getBindParentClass() { + return V072TongP2.class; + } + + @Override + public void bindChild(Element childElement, V072TongP2 parent, Object childObject) throws ElementBindingHandlerException { + V036Teger child = (V036Teger)childObject; + parent.setValue(child); + } + + @Override + public void createChilderen(Element parentElement,V072TongP2 parent) throws ElementBindingHandlerException { + createChild(parentElement, parent.theValue()); + } +} diff --git a/lib-unicodezd/src/resources/META-INF/unicode4d-atlas/unicode4d-atlas-lang.eld b/lib-unicodezd/src/resources/META-INF/unicode4d-atlas/unicode4d-atlas-lang.eld index 81d26862..e3746f3b 100644 --- a/lib-unicodezd/src/resources/META-INF/unicode4d-atlas/unicode4d-atlas-lang.eld +++ b/lib-unicodezd/src/resources/META-INF/unicode4d-atlas/unicode4d-atlas-lang.eld @@ -15,6 +15,12 @@ parentClass="love.distributedrebirth.unicode4d.atlas.FontAtlasStore" childClass="love.distributedrebirth.unicode4d.atlas.FontAtlasStoreGlyph" addMethod="addGlyph" getMethod="getGlyphs" /> +