All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.xowl.infra.lang.rules.Assertion Maven / Gradle / Ivy

There is a newer version: 2.3.4
Show newest version
/* This file has been generated by:
   xOWL Code Generator
*/
package org.xowl.infra.lang.rules;

public class Assertion {
    // 
    public static interface isPositive {
        boolean check_contains(java.lang.Boolean elem);
        boolean user_check_add(java.lang.Boolean elem);
        boolean user_check_remove(java.lang.Boolean elem);
        boolean user_check_replace(java.lang.Boolean oldElem, java.lang.Boolean  newElem);
        void user_add(java.lang.Boolean elem);
        void user_remove(java.lang.Boolean elem);
        boolean inverse_check_add(java.lang.Boolean elem);
        boolean inverse_check_remove(java.lang.Boolean elem);
        boolean inverse_check_replace(java.lang.Boolean oldElem, java.lang.Boolean  newElem);
        void inverse_add(java.lang.Boolean elem);
        void inverse_remove(java.lang.Boolean elem);
    }
    private static class isPositive_impl implements org.xowl.infra.lang.rules.Assertion.isPositive {
        private org.xowl.infra.lang.rules.Assertion domain;
        private java.lang.Boolean data;
        public java.lang.Boolean get_raw() { return data; }
        public java.lang.Boolean get() { return data; }
        private boolean check_card(int modifier) {
            int card = modifier + 0;
            if (data != null) card++;
            return (card >= 0 && card <= 1);
        }
        @Override public boolean check_contains(java.lang.Boolean elem) { return data.equals(elem); }
        public boolean simple_check_add(java.lang.Boolean elem) {
            if (check_contains(elem)) return false;
            if (!check_card(1)) return false;
            return true;
        }
        public boolean simple_check_remove(java.lang.Boolean elem) {
            if (!check_contains(elem)) return false;
            if (!check_card(-1)) return false;
            return true;
        }
        public boolean simple_check_replace(java.lang.Boolean oldElem, java.lang.Boolean  newElem) {
            if (check_contains(newElem)) return false;
            if (!check_contains(oldElem)) return false;
            return true;
        }
        public void simple_add(java.lang.Boolean elem) {
            data = elem;
        }
        public void simple_remove(java.lang.Boolean elem) {
            data = null;
        }
        private boolean tree_check_add(java.lang.Boolean elem) {
            if (!simple_check_add(elem)) return false;
            return true;
        }
        private boolean tree_check_remove(java.lang.Boolean elem) {
            if (!simple_check_remove(elem)) return false;
            return true;
        }
        private boolean tree_check_replace(java.lang.Boolean oldElem, java.lang.Boolean  newElem) {
            if (!simple_check_replace(oldElem, newElem)) return false;
            return true;
        }
        private void tree_add(java.lang.Boolean elem) {
            simple_add(elem);
        }
        private void tree_remove(java.lang.Boolean elem) {
            simple_remove(elem);
        }
        @Override public boolean user_check_add(java.lang.Boolean elem) {
            return tree_check_add(elem);
        }
        @Override public boolean user_check_remove(java.lang.Boolean elem) {
            return tree_check_remove(elem);
        }
        @Override public boolean user_check_replace(java.lang.Boolean oldElem, java.lang.Boolean  newElem) {
            return tree_check_replace(oldElem, newElem);
        }
        @Override public void user_add(java.lang.Boolean elem) {
            tree_add(elem);
        }
        @Override public void user_remove(java.lang.Boolean elem) {
            tree_remove(elem);
        }
        @Override public boolean inverse_check_add(java.lang.Boolean elem) {
            return tree_check_add(elem);
        }
        @Override public boolean inverse_check_remove(java.lang.Boolean elem) {
            return tree_check_remove(elem);
        }
        @Override public boolean inverse_check_replace(java.lang.Boolean oldElem, java.lang.Boolean  newElem) {
            return tree_check_replace(oldElem, newElem);
        }
        @Override public void inverse_add(java.lang.Boolean elem) {
            tree_add(elem);
        }
        @Override public void inverse_remove(java.lang.Boolean elem) {
            tree_remove(elem);
        }
        public isPositive_impl(org.xowl.infra.lang.rules.Assertion domain) {
            this.domain = domain;
        }
    }
    private isPositive_impl dataIsPositive;
    public org.xowl.infra.lang.rules.Assertion.isPositive __getImplOfisPositive() { return dataIsPositive; }
    public boolean setIsPositive(java.lang.Boolean elem) {
        dataIsPositive.simple_add(elem);
        return true;
    }
    public java.lang.Boolean getIsPositive() { return dataIsPositive.get(); }
    // 

    // 
    public static interface axioms {
        boolean check_contains(org.xowl.infra.lang.owl2.Axiom elem);
        boolean user_check_add(org.xowl.infra.lang.owl2.Axiom elem);
        boolean user_check_remove(org.xowl.infra.lang.owl2.Axiom elem);
        boolean user_check_replace(org.xowl.infra.lang.owl2.Axiom oldElem, org.xowl.infra.lang.owl2.Axiom  newElem);
        void user_add(org.xowl.infra.lang.owl2.Axiom elem);
        void user_remove(org.xowl.infra.lang.owl2.Axiom elem);
        boolean inverse_check_add(org.xowl.infra.lang.owl2.Axiom elem);
        boolean inverse_check_remove(org.xowl.infra.lang.owl2.Axiom elem);
        boolean inverse_check_replace(org.xowl.infra.lang.owl2.Axiom oldElem, org.xowl.infra.lang.owl2.Axiom  newElem);
        void inverse_add(org.xowl.infra.lang.owl2.Axiom elem);
        void inverse_remove(org.xowl.infra.lang.owl2.Axiom elem);
    }
    private static class axioms_impl implements org.xowl.infra.lang.rules.Assertion.axioms {
        private org.xowl.infra.lang.rules.Assertion domain;
        private java.util.List data;
        public java.util.Collection get_raw() { return new java.util.ArrayList(data); }
        public java.util.Collection get() { return new java.util.ArrayList(data); }
        private boolean check_card(int modifier) {
            int card = data.size() + 0 + modifier;
            return (card >= 0 && card <= 2147483647);
        }
        @Override public boolean check_contains(org.xowl.infra.lang.owl2.Axiom elem) { return (data.contains(elem)); }
        public boolean simple_check_add(org.xowl.infra.lang.owl2.Axiom elem) {
            if (check_contains(elem)) return false;
            if (!check_card(1)) return false;
            return true;
        }
        public boolean simple_check_remove(org.xowl.infra.lang.owl2.Axiom elem) {
            if (!check_contains(elem)) return false;
            if (!check_card(-1)) return false;
            return true;
        }
        public boolean simple_check_replace(org.xowl.infra.lang.owl2.Axiom oldElem, org.xowl.infra.lang.owl2.Axiom  newElem) {
            if (check_contains(newElem)) return false;
            if (!check_contains(oldElem)) return false;
            return true;
        }
        public void simple_add(org.xowl.infra.lang.owl2.Axiom elem) {
            data.add(elem);
        }
        public void simple_remove(org.xowl.infra.lang.owl2.Axiom elem) {
            data.remove(elem);
        }
        private boolean tree_check_add(org.xowl.infra.lang.owl2.Axiom elem) {
            if (!simple_check_add(elem)) return false;
            return true;
        }
        private boolean tree_check_remove(org.xowl.infra.lang.owl2.Axiom elem) {
            if (!simple_check_remove(elem)) return false;
            return true;
        }
        private boolean tree_check_replace(org.xowl.infra.lang.owl2.Axiom oldElem, org.xowl.infra.lang.owl2.Axiom  newElem) {
            if (!simple_check_replace(oldElem, newElem)) return false;
            return true;
        }
        private void tree_add(org.xowl.infra.lang.owl2.Axiom elem) {
            simple_add(elem);
        }
        private void tree_remove(org.xowl.infra.lang.owl2.Axiom elem) {
            simple_remove(elem);
        }
        @Override public boolean user_check_add(org.xowl.infra.lang.owl2.Axiom elem) {
            return tree_check_add(elem);
        }
        @Override public boolean user_check_remove(org.xowl.infra.lang.owl2.Axiom elem) {
            return tree_check_remove(elem);
        }
        @Override public boolean user_check_replace(org.xowl.infra.lang.owl2.Axiom oldElem, org.xowl.infra.lang.owl2.Axiom  newElem) {
            return tree_check_replace(oldElem, newElem);
        }
        @Override public void user_add(org.xowl.infra.lang.owl2.Axiom elem) {
            tree_add(elem);
        }
        @Override public void user_remove(org.xowl.infra.lang.owl2.Axiom elem) {
            tree_remove(elem);
        }
        @Override public boolean inverse_check_add(org.xowl.infra.lang.owl2.Axiom elem) {
            return tree_check_add(elem);
        }
        @Override public boolean inverse_check_remove(org.xowl.infra.lang.owl2.Axiom elem) {
            return tree_check_remove(elem);
        }
        @Override public boolean inverse_check_replace(org.xowl.infra.lang.owl2.Axiom oldElem, org.xowl.infra.lang.owl2.Axiom  newElem) {
            return tree_check_replace(oldElem, newElem);
        }
        @Override public void inverse_add(org.xowl.infra.lang.owl2.Axiom elem) {
            tree_add(elem);
        }
        @Override public void inverse_remove(org.xowl.infra.lang.owl2.Axiom elem) {
            tree_remove(elem);
        }
        public axioms_impl(org.xowl.infra.lang.rules.Assertion domain) {
            this.domain = domain;
            this.data = new java.util.ArrayList();
        }
    }
    private axioms_impl dataAxioms;
    public org.xowl.infra.lang.rules.Assertion.axioms __getImplOfaxioms() { return dataAxioms; }
    public boolean addAxioms(org.xowl.infra.lang.owl2.Axiom elem) {
        if (!dataAxioms.user_check_add(elem)) return false;
        dataAxioms.user_add(elem);
        return true;
    }
    public boolean removeAxioms(org.xowl.infra.lang.owl2.Axiom elem) {
        if (!dataAxioms.user_check_remove(elem)) return false;
        dataAxioms.user_remove(elem);
        return true;
    }
    public java.util.Collection getAllAxioms() { return dataAxioms.get(); }
    // 

    // 
    public static interface isMeta {
        boolean check_contains(java.lang.Boolean elem);
        boolean user_check_add(java.lang.Boolean elem);
        boolean user_check_remove(java.lang.Boolean elem);
        boolean user_check_replace(java.lang.Boolean oldElem, java.lang.Boolean  newElem);
        void user_add(java.lang.Boolean elem);
        void user_remove(java.lang.Boolean elem);
        boolean inverse_check_add(java.lang.Boolean elem);
        boolean inverse_check_remove(java.lang.Boolean elem);
        boolean inverse_check_replace(java.lang.Boolean oldElem, java.lang.Boolean  newElem);
        void inverse_add(java.lang.Boolean elem);
        void inverse_remove(java.lang.Boolean elem);
    }
    private static class isMeta_impl implements org.xowl.infra.lang.rules.Assertion.isMeta {
        private org.xowl.infra.lang.rules.Assertion domain;
        private java.lang.Boolean data;
        public java.lang.Boolean get_raw() { return data; }
        public java.lang.Boolean get() { return data; }
        private boolean check_card(int modifier) {
            int card = modifier + 0;
            if (data != null) card++;
            return (card >= 0 && card <= 1);
        }
        @Override public boolean check_contains(java.lang.Boolean elem) { return data.equals(elem); }
        public boolean simple_check_add(java.lang.Boolean elem) {
            if (check_contains(elem)) return false;
            if (!check_card(1)) return false;
            return true;
        }
        public boolean simple_check_remove(java.lang.Boolean elem) {
            if (!check_contains(elem)) return false;
            if (!check_card(-1)) return false;
            return true;
        }
        public boolean simple_check_replace(java.lang.Boolean oldElem, java.lang.Boolean  newElem) {
            if (check_contains(newElem)) return false;
            if (!check_contains(oldElem)) return false;
            return true;
        }
        public void simple_add(java.lang.Boolean elem) {
            data = elem;
        }
        public void simple_remove(java.lang.Boolean elem) {
            data = null;
        }
        private boolean tree_check_add(java.lang.Boolean elem) {
            if (!simple_check_add(elem)) return false;
            return true;
        }
        private boolean tree_check_remove(java.lang.Boolean elem) {
            if (!simple_check_remove(elem)) return false;
            return true;
        }
        private boolean tree_check_replace(java.lang.Boolean oldElem, java.lang.Boolean  newElem) {
            if (!simple_check_replace(oldElem, newElem)) return false;
            return true;
        }
        private void tree_add(java.lang.Boolean elem) {
            simple_add(elem);
        }
        private void tree_remove(java.lang.Boolean elem) {
            simple_remove(elem);
        }
        @Override public boolean user_check_add(java.lang.Boolean elem) {
            return tree_check_add(elem);
        }
        @Override public boolean user_check_remove(java.lang.Boolean elem) {
            return tree_check_remove(elem);
        }
        @Override public boolean user_check_replace(java.lang.Boolean oldElem, java.lang.Boolean  newElem) {
            return tree_check_replace(oldElem, newElem);
        }
        @Override public void user_add(java.lang.Boolean elem) {
            tree_add(elem);
        }
        @Override public void user_remove(java.lang.Boolean elem) {
            tree_remove(elem);
        }
        @Override public boolean inverse_check_add(java.lang.Boolean elem) {
            return tree_check_add(elem);
        }
        @Override public boolean inverse_check_remove(java.lang.Boolean elem) {
            return tree_check_remove(elem);
        }
        @Override public boolean inverse_check_replace(java.lang.Boolean oldElem, java.lang.Boolean  newElem) {
            return tree_check_replace(oldElem, newElem);
        }
        @Override public void inverse_add(java.lang.Boolean elem) {
            tree_add(elem);
        }
        @Override public void inverse_remove(java.lang.Boolean elem) {
            tree_remove(elem);
        }
        public isMeta_impl(org.xowl.infra.lang.rules.Assertion domain) {
            this.domain = domain;
        }
    }
    private isMeta_impl dataIsMeta;
    public org.xowl.infra.lang.rules.Assertion.isMeta __getImplOfisMeta() { return dataIsMeta; }
    public boolean setIsMeta(java.lang.Boolean elem) {
        dataIsMeta.simple_add(elem);
        return true;
    }
    public java.lang.Boolean getIsMeta() { return dataIsMeta.get(); }
    // 

    public Assertion() {
        dataIsPositive = new isPositive_impl(this);
        dataAxioms = new axioms_impl(this);
        dataIsMeta = new isMeta_impl(this);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy