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

org.xowl.infra.lang.owl2.ClassSequence 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.owl2;

public class ClassSequence implements org.xowl.infra.lang.owl2.ClassSequenceExpression {
    // 
    public static interface classElements {
        boolean check_contains(org.xowl.infra.lang.owl2.ClassElement elem);
        boolean user_check_add(org.xowl.infra.lang.owl2.ClassElement elem);
        boolean user_check_remove(org.xowl.infra.lang.owl2.ClassElement elem);
        boolean user_check_replace(org.xowl.infra.lang.owl2.ClassElement oldElem, org.xowl.infra.lang.owl2.ClassElement  newElem);
        void user_add(org.xowl.infra.lang.owl2.ClassElement elem);
        void user_remove(org.xowl.infra.lang.owl2.ClassElement elem);
        boolean inverse_check_add(org.xowl.infra.lang.owl2.ClassElement elem);
        boolean inverse_check_remove(org.xowl.infra.lang.owl2.ClassElement elem);
        boolean inverse_check_replace(org.xowl.infra.lang.owl2.ClassElement oldElem, org.xowl.infra.lang.owl2.ClassElement  newElem);
        void inverse_add(org.xowl.infra.lang.owl2.ClassElement elem);
        void inverse_remove(org.xowl.infra.lang.owl2.ClassElement elem);
    }
    private static class classElements_impl implements org.xowl.infra.lang.owl2.ClassSequence.classElements {
        private org.xowl.infra.lang.owl2.ClassSequence 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.ClassElement elem) { return (data.contains(elem)); }
        public boolean simple_check_add(org.xowl.infra.lang.owl2.ClassElement 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.ClassElement 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.ClassElement oldElem, org.xowl.infra.lang.owl2.ClassElement  newElem) {
            if (check_contains(newElem)) return false;
            if (!check_contains(oldElem)) return false;
            return true;
        }
        public void simple_add(org.xowl.infra.lang.owl2.ClassElement elem) {
            data.add(elem);
        }
        public void simple_remove(org.xowl.infra.lang.owl2.ClassElement elem) {
            data.remove(elem);
        }
        private boolean tree_check_add(org.xowl.infra.lang.owl2.ClassElement elem) {
            if (!simple_check_add(elem)) return false;
            return true;
        }
        private boolean tree_check_remove(org.xowl.infra.lang.owl2.ClassElement elem) {
            if (!simple_check_remove(elem)) return false;
            return true;
        }
        private boolean tree_check_replace(org.xowl.infra.lang.owl2.ClassElement oldElem, org.xowl.infra.lang.owl2.ClassElement  newElem) {
            if (!simple_check_replace(oldElem, newElem)) return false;
            return true;
        }
        private void tree_add(org.xowl.infra.lang.owl2.ClassElement elem) {
            simple_add(elem);
        }
        private void tree_remove(org.xowl.infra.lang.owl2.ClassElement elem) {
            simple_remove(elem);
        }
        @Override public boolean user_check_add(org.xowl.infra.lang.owl2.ClassElement elem) {
            return tree_check_add(elem);
        }
        @Override public boolean user_check_remove(org.xowl.infra.lang.owl2.ClassElement elem) {
            return tree_check_remove(elem);
        }
        @Override public boolean user_check_replace(org.xowl.infra.lang.owl2.ClassElement oldElem, org.xowl.infra.lang.owl2.ClassElement  newElem) {
            return tree_check_replace(oldElem, newElem);
        }
        @Override public void user_add(org.xowl.infra.lang.owl2.ClassElement elem) {
            tree_add(elem);
        }
        @Override public void user_remove(org.xowl.infra.lang.owl2.ClassElement elem) {
            tree_remove(elem);
        }
        @Override public boolean inverse_check_add(org.xowl.infra.lang.owl2.ClassElement elem) {
            return tree_check_add(elem);
        }
        @Override public boolean inverse_check_remove(org.xowl.infra.lang.owl2.ClassElement elem) {
            return tree_check_remove(elem);
        }
        @Override public boolean inverse_check_replace(org.xowl.infra.lang.owl2.ClassElement oldElem, org.xowl.infra.lang.owl2.ClassElement  newElem) {
            return tree_check_replace(oldElem, newElem);
        }
        @Override public void inverse_add(org.xowl.infra.lang.owl2.ClassElement elem) {
            tree_add(elem);
        }
        @Override public void inverse_remove(org.xowl.infra.lang.owl2.ClassElement elem) {
            tree_remove(elem);
        }
        public classElements_impl(org.xowl.infra.lang.owl2.ClassSequence domain) {
            this.domain = domain;
            this.data = new java.util.ArrayList();
        }
    }
    private classElements_impl dataClassElements;
    public org.xowl.infra.lang.owl2.ClassSequence.classElements __getImplOfclassElements() { return dataClassElements; }
    public boolean addClassElements(org.xowl.infra.lang.owl2.ClassElement elem) {
        if (!dataClassElements.user_check_add(elem)) return false;
        dataClassElements.user_add(elem);
        return true;
    }
    public boolean removeClassElements(org.xowl.infra.lang.owl2.ClassElement elem) {
        if (!dataClassElements.user_check_remove(elem)) return false;
        dataClassElements.user_remove(elem);
        return true;
    }
    public java.util.Collection getAllClassElements() { return dataClassElements.get(); }
    // 

    public ClassSequence() {
        dataClassElements = new classElements_impl(this);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy