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

org.xowl.infra.lang.owl2.DataAllValuesFrom 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 DataAllValuesFrom implements org.xowl.infra.lang.owl2.NAryDataPropertyRestriction {
    // 
    private static class datarange_impl implements org.xowl.infra.lang.owl2.DataCardinalityRestriction_OR_DataComplementOf_OR_DataPropertyRange_OR_DatarangeElement_OR_Datatype3.datarange {
        private org.xowl.infra.lang.owl2.DataAllValuesFrom domain;
        private org.xowl.infra.lang.owl2.Datarange data;
        public org.xowl.infra.lang.owl2.Datarange get_raw() { return data; }
        public org.xowl.infra.lang.owl2.Datarange 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(org.xowl.infra.lang.owl2.Datarange elem) { return (data == elem); }
        public boolean simple_check_add(org.xowl.infra.lang.owl2.Datarange 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.Datarange 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.Datarange oldElem, org.xowl.infra.lang.owl2.Datarange  newElem) {
            if (check_contains(newElem)) return false;
            if (!check_contains(oldElem)) return false;
            return true;
        }
        public void simple_add(org.xowl.infra.lang.owl2.Datarange elem) {
            data = elem;
        }
        public void simple_remove(org.xowl.infra.lang.owl2.Datarange elem) {
            data = null;
        }
        private boolean tree_check_add(org.xowl.infra.lang.owl2.Datarange elem) {
            if (!simple_check_add(elem)) return false;
            return true;
        }
        private boolean tree_check_remove(org.xowl.infra.lang.owl2.Datarange elem) {
            if (!simple_check_remove(elem)) return false;
            return true;
        }
        private boolean tree_check_replace(org.xowl.infra.lang.owl2.Datarange oldElem, org.xowl.infra.lang.owl2.Datarange  newElem) {
            if (!simple_check_replace(oldElem, newElem)) return false;
            return true;
        }
        private void tree_add(org.xowl.infra.lang.owl2.Datarange elem) {
            simple_add(elem);
        }
        private void tree_remove(org.xowl.infra.lang.owl2.Datarange elem) {
            simple_remove(elem);
        }
        @Override public boolean user_check_add(org.xowl.infra.lang.owl2.Datarange elem) {
            return tree_check_add(elem);
        }
        @Override public boolean user_check_remove(org.xowl.infra.lang.owl2.Datarange elem) {
            return tree_check_remove(elem);
        }
        @Override public boolean user_check_replace(org.xowl.infra.lang.owl2.Datarange oldElem, org.xowl.infra.lang.owl2.Datarange  newElem) {
            return tree_check_replace(oldElem, newElem);
        }
        @Override public void user_add(org.xowl.infra.lang.owl2.Datarange elem) {
            tree_add(elem);
        }
        @Override public void user_remove(org.xowl.infra.lang.owl2.Datarange elem) {
            tree_remove(elem);
        }
        @Override public boolean inverse_check_add(org.xowl.infra.lang.owl2.Datarange elem) {
            return tree_check_add(elem);
        }
        @Override public boolean inverse_check_remove(org.xowl.infra.lang.owl2.Datarange elem) {
            return tree_check_remove(elem);
        }
        @Override public boolean inverse_check_replace(org.xowl.infra.lang.owl2.Datarange oldElem, org.xowl.infra.lang.owl2.Datarange  newElem) {
            return tree_check_replace(oldElem, newElem);
        }
        @Override public void inverse_add(org.xowl.infra.lang.owl2.Datarange elem) {
            tree_add(elem);
        }
        @Override public void inverse_remove(org.xowl.infra.lang.owl2.Datarange elem) {
            tree_remove(elem);
        }
        public datarange_impl(org.xowl.infra.lang.owl2.DataAllValuesFrom domain) {
            this.domain = domain;
        }
    }
    private datarange_impl dataDatarange;
    public org.xowl.infra.lang.owl2.DataCardinalityRestriction_OR_DataComplementOf_OR_DataPropertyRange_OR_DatarangeElement_OR_Datatype3.datarange __getImplOfdatarange() { return dataDatarange; }
    public boolean setDatarange(org.xowl.infra.lang.owl2.Datarange elem) {
        if (dataDatarange.get() != null) {
            if (elem == null) {
                if (!dataDatarange.user_check_remove(dataDatarange.get())) return false;
                dataDatarange.user_remove(dataDatarange.get());
            } else {
                if (!dataDatarange.user_check_replace(dataDatarange.get(), elem)) return false;
                dataDatarange.user_remove(dataDatarange.get());
                dataDatarange.user_add(elem);
            }
        } else {
            if (elem == null) return true;
            if (!dataDatarange.user_check_add(elem)) return false;
            dataDatarange.user_add(elem);
        }
        return true;
    }
    public org.xowl.infra.lang.owl2.Datarange getDatarange() { return dataDatarange.get(); }
    // 

    // 
    private static class dataPropertySeq_impl implements org.xowl.infra.lang.owl2.DisjointDataProperties_OR_EquivalentDataProperties_OR_HasKey_OR_NAryDataPropertyRestriction.dataPropertySeq {
        private org.xowl.infra.lang.owl2.DataAllValuesFrom domain;
        private org.xowl.infra.lang.owl2.DataPropertySequenceExpression data;
        public org.xowl.infra.lang.owl2.DataPropertySequenceExpression get_raw() { return data; }
        public org.xowl.infra.lang.owl2.DataPropertySequenceExpression 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(org.xowl.infra.lang.owl2.DataPropertySequenceExpression elem) { return (data == elem); }
        public boolean simple_check_add(org.xowl.infra.lang.owl2.DataPropertySequenceExpression 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.DataPropertySequenceExpression 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.DataPropertySequenceExpression oldElem, org.xowl.infra.lang.owl2.DataPropertySequenceExpression  newElem) {
            if (check_contains(newElem)) return false;
            if (!check_contains(oldElem)) return false;
            return true;
        }
        public void simple_add(org.xowl.infra.lang.owl2.DataPropertySequenceExpression elem) {
            data = elem;
        }
        public void simple_remove(org.xowl.infra.lang.owl2.DataPropertySequenceExpression elem) {
            data = null;
        }
        private boolean tree_check_add(org.xowl.infra.lang.owl2.DataPropertySequenceExpression elem) {
            if (!simple_check_add(elem)) return false;
            return true;
        }
        private boolean tree_check_remove(org.xowl.infra.lang.owl2.DataPropertySequenceExpression elem) {
            if (!simple_check_remove(elem)) return false;
            return true;
        }
        private boolean tree_check_replace(org.xowl.infra.lang.owl2.DataPropertySequenceExpression oldElem, org.xowl.infra.lang.owl2.DataPropertySequenceExpression  newElem) {
            if (!simple_check_replace(oldElem, newElem)) return false;
            return true;
        }
        private void tree_add(org.xowl.infra.lang.owl2.DataPropertySequenceExpression elem) {
            simple_add(elem);
        }
        private void tree_remove(org.xowl.infra.lang.owl2.DataPropertySequenceExpression elem) {
            simple_remove(elem);
        }
        @Override public boolean user_check_add(org.xowl.infra.lang.owl2.DataPropertySequenceExpression elem) {
            return tree_check_add(elem);
        }
        @Override public boolean user_check_remove(org.xowl.infra.lang.owl2.DataPropertySequenceExpression elem) {
            return tree_check_remove(elem);
        }
        @Override public boolean user_check_replace(org.xowl.infra.lang.owl2.DataPropertySequenceExpression oldElem, org.xowl.infra.lang.owl2.DataPropertySequenceExpression  newElem) {
            return tree_check_replace(oldElem, newElem);
        }
        @Override public void user_add(org.xowl.infra.lang.owl2.DataPropertySequenceExpression elem) {
            tree_add(elem);
        }
        @Override public void user_remove(org.xowl.infra.lang.owl2.DataPropertySequenceExpression elem) {
            tree_remove(elem);
        }
        @Override public boolean inverse_check_add(org.xowl.infra.lang.owl2.DataPropertySequenceExpression elem) {
            return tree_check_add(elem);
        }
        @Override public boolean inverse_check_remove(org.xowl.infra.lang.owl2.DataPropertySequenceExpression elem) {
            return tree_check_remove(elem);
        }
        @Override public boolean inverse_check_replace(org.xowl.infra.lang.owl2.DataPropertySequenceExpression oldElem, org.xowl.infra.lang.owl2.DataPropertySequenceExpression  newElem) {
            return tree_check_replace(oldElem, newElem);
        }
        @Override public void inverse_add(org.xowl.infra.lang.owl2.DataPropertySequenceExpression elem) {
            tree_add(elem);
        }
        @Override public void inverse_remove(org.xowl.infra.lang.owl2.DataPropertySequenceExpression elem) {
            tree_remove(elem);
        }
        public dataPropertySeq_impl(org.xowl.infra.lang.owl2.DataAllValuesFrom domain) {
            this.domain = domain;
        }
    }
    private dataPropertySeq_impl dataDataPropertySeq;
    public org.xowl.infra.lang.owl2.DisjointDataProperties_OR_EquivalentDataProperties_OR_HasKey_OR_NAryDataPropertyRestriction.dataPropertySeq __getImplOfdataPropertySeq() { return dataDataPropertySeq; }
    public boolean setDataPropertySeq(org.xowl.infra.lang.owl2.DataPropertySequenceExpression elem) {
        if (dataDataPropertySeq.get() != null) {
            if (elem == null) {
                if (!dataDataPropertySeq.user_check_remove(dataDataPropertySeq.get())) return false;
                dataDataPropertySeq.user_remove(dataDataPropertySeq.get());
            } else {
                if (!dataDataPropertySeq.user_check_replace(dataDataPropertySeq.get(), elem)) return false;
                dataDataPropertySeq.user_remove(dataDataPropertySeq.get());
                dataDataPropertySeq.user_add(elem);
            }
        } else {
            if (elem == null) return true;
            if (!dataDataPropertySeq.user_check_add(elem)) return false;
            dataDataPropertySeq.user_add(elem);
        }
        return true;
    }
    public org.xowl.infra.lang.owl2.DataPropertySequenceExpression getDataPropertySeq() { return dataDataPropertySeq.get(); }
    // 

    public DataAllValuesFrom() {
        dataDatarange = new datarange_impl(this);
        dataDataPropertySeq = new dataPropertySeq_impl(this);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy