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

org.xowl.infra.lang.runtime.Entity 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.runtime;

public class Entity implements org.xowl.infra.lang.runtime.Value {
    // 
    public static interface interpretedAs {
        boolean check_contains(org.xowl.infra.lang.runtime.Interpretation elem);
        boolean user_check_add(org.xowl.infra.lang.runtime.Interpretation elem);
        boolean user_check_remove(org.xowl.infra.lang.runtime.Interpretation elem);
        boolean user_check_replace(org.xowl.infra.lang.runtime.Interpretation oldElem, org.xowl.infra.lang.runtime.Interpretation  newElem);
        void user_add(org.xowl.infra.lang.runtime.Interpretation elem);
        void user_remove(org.xowl.infra.lang.runtime.Interpretation elem);
        boolean inverse_check_add(org.xowl.infra.lang.runtime.Interpretation elem);
        boolean inverse_check_remove(org.xowl.infra.lang.runtime.Interpretation elem);
        boolean inverse_check_replace(org.xowl.infra.lang.runtime.Interpretation oldElem, org.xowl.infra.lang.runtime.Interpretation  newElem);
        void inverse_add(org.xowl.infra.lang.runtime.Interpretation elem);
        void inverse_remove(org.xowl.infra.lang.runtime.Interpretation elem);
    }
    private static class interpretedAs_impl implements org.xowl.infra.lang.runtime.Entity.interpretedAs {
        private org.xowl.infra.lang.runtime.Entity 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.runtime.Interpretation elem) { return (data.contains(elem)); }
        public boolean simple_check_add(org.xowl.infra.lang.runtime.Interpretation elem) {
            if (check_contains(elem)) return false;
            if (!check_card(1)) return false;
            return true;
        }
        public boolean simple_check_remove(org.xowl.infra.lang.runtime.Interpretation elem) {
            if (!check_contains(elem)) return false;
            if (!check_card(-1)) return false;
            return true;
        }
        public boolean simple_check_replace(org.xowl.infra.lang.runtime.Interpretation oldElem, org.xowl.infra.lang.runtime.Interpretation  newElem) {
            if (check_contains(newElem)) return false;
            if (!check_contains(oldElem)) return false;
            return true;
        }
        public void simple_add(org.xowl.infra.lang.runtime.Interpretation elem) {
            data.add(elem);
        }
        public void simple_remove(org.xowl.infra.lang.runtime.Interpretation elem) {
            data.remove(elem);
        }
        private boolean tree_check_add(org.xowl.infra.lang.runtime.Interpretation elem) {
            if (!simple_check_add(elem)) return false;
            return true;
        }
        private boolean tree_check_remove(org.xowl.infra.lang.runtime.Interpretation elem) {
            if (!simple_check_remove(elem)) return false;
            return true;
        }
        private boolean tree_check_replace(org.xowl.infra.lang.runtime.Interpretation oldElem, org.xowl.infra.lang.runtime.Interpretation  newElem) {
            if (!simple_check_replace(oldElem, newElem)) return false;
            return true;
        }
        private void tree_add(org.xowl.infra.lang.runtime.Interpretation elem) {
            simple_add(elem);
        }
        private void tree_remove(org.xowl.infra.lang.runtime.Interpretation elem) {
            simple_remove(elem);
        }
        @Override public boolean user_check_add(org.xowl.infra.lang.runtime.Interpretation elem) {
            if (!elem.__getImplOfinterpretationOf().inverse_check_add(domain)) return false;
            return tree_check_add(elem);
        }
        @Override public boolean user_check_remove(org.xowl.infra.lang.runtime.Interpretation elem) {
            if (!elem.__getImplOfinterpretationOf().inverse_check_remove(domain)) return false;
            return tree_check_remove(elem);
        }
        @Override public boolean user_check_replace(org.xowl.infra.lang.runtime.Interpretation oldElem, org.xowl.infra.lang.runtime.Interpretation  newElem) {
            if (!oldElem.__getImplOfinterpretationOf().inverse_check_remove(domain)) return false;
            if (!newElem.__getImplOfinterpretationOf().inverse_check_add(domain)) return false;
            return tree_check_replace(oldElem, newElem);
        }
        @Override public void user_add(org.xowl.infra.lang.runtime.Interpretation elem) {
            elem.__getImplOfinterpretationOf().inverse_add(domain);
            tree_add(elem);
        }
        @Override public void user_remove(org.xowl.infra.lang.runtime.Interpretation elem) {
            elem.__getImplOfinterpretationOf().inverse_remove(domain);
            tree_remove(elem);
        }
        @Override public boolean inverse_check_add(org.xowl.infra.lang.runtime.Interpretation elem) {
            return tree_check_add(elem);
        }
        @Override public boolean inverse_check_remove(org.xowl.infra.lang.runtime.Interpretation elem) {
            return tree_check_remove(elem);
        }
        @Override public boolean inverse_check_replace(org.xowl.infra.lang.runtime.Interpretation oldElem, org.xowl.infra.lang.runtime.Interpretation  newElem) {
            return tree_check_replace(oldElem, newElem);
        }
        @Override public void inverse_add(org.xowl.infra.lang.runtime.Interpretation elem) {
            tree_add(elem);
        }
        @Override public void inverse_remove(org.xowl.infra.lang.runtime.Interpretation elem) {
            tree_remove(elem);
        }
        public interpretedAs_impl(org.xowl.infra.lang.runtime.Entity domain) {
            this.domain = domain;
            this.data = new java.util.ArrayList();
        }
    }
    private interpretedAs_impl dataInterpretedAs;
    public org.xowl.infra.lang.runtime.Entity.interpretedAs __getImplOfinterpretedAs() { return dataInterpretedAs; }
    public boolean addInterpretedAs(org.xowl.infra.lang.runtime.Interpretation elem) {
        if (!dataInterpretedAs.user_check_add(elem)) return false;
        dataInterpretedAs.user_add(elem);
        return true;
    }
    public boolean removeInterpretedAs(org.xowl.infra.lang.runtime.Interpretation elem) {
        if (!dataInterpretedAs.user_check_remove(elem)) return false;
        dataInterpretedAs.user_remove(elem);
        return true;
    }
    public java.util.Collection getAllInterpretedAs() { return dataInterpretedAs.get(); }
    // 

    // 
    public static interface containedBy {
        boolean check_contains(org.xowl.infra.lang.owl2.Ontology elem);
        boolean user_check_add(org.xowl.infra.lang.owl2.Ontology elem);
        boolean user_check_remove(org.xowl.infra.lang.owl2.Ontology elem);
        boolean user_check_replace(org.xowl.infra.lang.owl2.Ontology oldElem, org.xowl.infra.lang.owl2.Ontology  newElem);
        void user_add(org.xowl.infra.lang.owl2.Ontology elem);
        void user_remove(org.xowl.infra.lang.owl2.Ontology elem);
        boolean inverse_check_add(org.xowl.infra.lang.owl2.Ontology elem);
        boolean inverse_check_remove(org.xowl.infra.lang.owl2.Ontology elem);
        boolean inverse_check_replace(org.xowl.infra.lang.owl2.Ontology oldElem, org.xowl.infra.lang.owl2.Ontology  newElem);
        void inverse_add(org.xowl.infra.lang.owl2.Ontology elem);
        void inverse_remove(org.xowl.infra.lang.owl2.Ontology elem);
    }
    private static class containedBy_impl implements org.xowl.infra.lang.runtime.Entity.containedBy {
        private org.xowl.infra.lang.runtime.Entity domain;
        private org.xowl.infra.lang.owl2.Ontology data;
        public org.xowl.infra.lang.owl2.Ontology get_raw() { return data; }
        public org.xowl.infra.lang.owl2.Ontology 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.Ontology elem) { return (data == elem); }
        public boolean simple_check_add(org.xowl.infra.lang.owl2.Ontology 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.Ontology 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.Ontology oldElem, org.xowl.infra.lang.owl2.Ontology  newElem) {
            if (check_contains(newElem)) return false;
            if (!check_contains(oldElem)) return false;
            return true;
        }
        public void simple_add(org.xowl.infra.lang.owl2.Ontology elem) {
            data = elem;
        }
        public void simple_remove(org.xowl.infra.lang.owl2.Ontology elem) {
            data = null;
        }
        private boolean tree_check_add(org.xowl.infra.lang.owl2.Ontology elem) {
            if (!simple_check_add(elem)) return false;
            return true;
        }
        private boolean tree_check_remove(org.xowl.infra.lang.owl2.Ontology elem) {
            if (!simple_check_remove(elem)) return false;
            return true;
        }
        private boolean tree_check_replace(org.xowl.infra.lang.owl2.Ontology oldElem, org.xowl.infra.lang.owl2.Ontology  newElem) {
            if (!simple_check_replace(oldElem, newElem)) return false;
            return true;
        }
        private void tree_add(org.xowl.infra.lang.owl2.Ontology elem) {
            simple_add(elem);
        }
        private void tree_remove(org.xowl.infra.lang.owl2.Ontology elem) {
            simple_remove(elem);
        }
        @Override public boolean user_check_add(org.xowl.infra.lang.owl2.Ontology elem) {
            if (!elem.__getImplOfcontains().inverse_check_add(domain)) return false;
            return tree_check_add(elem);
        }
        @Override public boolean user_check_remove(org.xowl.infra.lang.owl2.Ontology elem) {
            if (!elem.__getImplOfcontains().inverse_check_remove(domain)) return false;
            return tree_check_remove(elem);
        }
        @Override public boolean user_check_replace(org.xowl.infra.lang.owl2.Ontology oldElem, org.xowl.infra.lang.owl2.Ontology  newElem) {
            if (!oldElem.__getImplOfcontains().inverse_check_remove(domain)) return false;
            if (!newElem.__getImplOfcontains().inverse_check_add(domain)) return false;
            return tree_check_replace(oldElem, newElem);
        }
        @Override public void user_add(org.xowl.infra.lang.owl2.Ontology elem) {
            elem.__getImplOfcontains().inverse_add(domain);
            tree_add(elem);
        }
        @Override public void user_remove(org.xowl.infra.lang.owl2.Ontology elem) {
            elem.__getImplOfcontains().inverse_remove(domain);
            tree_remove(elem);
        }
        @Override public boolean inverse_check_add(org.xowl.infra.lang.owl2.Ontology elem) {
            return tree_check_add(elem);
        }
        @Override public boolean inverse_check_remove(org.xowl.infra.lang.owl2.Ontology elem) {
            return tree_check_remove(elem);
        }
        @Override public boolean inverse_check_replace(org.xowl.infra.lang.owl2.Ontology oldElem, org.xowl.infra.lang.owl2.Ontology  newElem) {
            return tree_check_replace(oldElem, newElem);
        }
        @Override public void inverse_add(org.xowl.infra.lang.owl2.Ontology elem) {
            tree_add(elem);
        }
        @Override public void inverse_remove(org.xowl.infra.lang.owl2.Ontology elem) {
            tree_remove(elem);
        }
        public containedBy_impl(org.xowl.infra.lang.runtime.Entity domain) {
            this.domain = domain;
        }
    }
    private containedBy_impl dataContainedBy;
    public org.xowl.infra.lang.runtime.Entity.containedBy __getImplOfcontainedBy() { return dataContainedBy; }
    public boolean setContainedBy(org.xowl.infra.lang.owl2.Ontology elem) {
        if (dataContainedBy.get() != null) {
            if (elem == null) {
                if (!dataContainedBy.user_check_remove(dataContainedBy.get())) return false;
                dataContainedBy.user_remove(dataContainedBy.get());
            } else {
                if (!dataContainedBy.user_check_replace(dataContainedBy.get(), elem)) return false;
                dataContainedBy.user_remove(dataContainedBy.get());
                dataContainedBy.user_add(elem);
            }
        } else {
            if (elem == null) return true;
            if (!dataContainedBy.user_check_add(elem)) return false;
            dataContainedBy.user_add(elem);
        }
        return true;
    }
    public org.xowl.infra.lang.owl2.Ontology getContainedBy() { return dataContainedBy.get(); }
    // 

    // 
    public static interface hasIRI {
        boolean check_contains(org.xowl.infra.lang.owl2.IRI elem);
        boolean user_check_add(org.xowl.infra.lang.owl2.IRI elem);
        boolean user_check_remove(org.xowl.infra.lang.owl2.IRI elem);
        boolean user_check_replace(org.xowl.infra.lang.owl2.IRI oldElem, org.xowl.infra.lang.owl2.IRI  newElem);
        void user_add(org.xowl.infra.lang.owl2.IRI elem);
        void user_remove(org.xowl.infra.lang.owl2.IRI elem);
        boolean inverse_check_add(org.xowl.infra.lang.owl2.IRI elem);
        boolean inverse_check_remove(org.xowl.infra.lang.owl2.IRI elem);
        boolean inverse_check_replace(org.xowl.infra.lang.owl2.IRI oldElem, org.xowl.infra.lang.owl2.IRI  newElem);
        void inverse_add(org.xowl.infra.lang.owl2.IRI elem);
        void inverse_remove(org.xowl.infra.lang.owl2.IRI elem);
    }
    private static class hasIRI_impl implements org.xowl.infra.lang.runtime.Entity.hasIRI {
        private org.xowl.infra.lang.runtime.Entity domain;
        private org.xowl.infra.lang.owl2.IRI data;
        public org.xowl.infra.lang.owl2.IRI get_raw() { return data; }
        public org.xowl.infra.lang.owl2.IRI 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.IRI elem) { return (data == elem); }
        public boolean simple_check_add(org.xowl.infra.lang.owl2.IRI 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.IRI 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.IRI oldElem, org.xowl.infra.lang.owl2.IRI  newElem) {
            if (check_contains(newElem)) return false;
            if (!check_contains(oldElem)) return false;
            return true;
        }
        public void simple_add(org.xowl.infra.lang.owl2.IRI elem) {
            data = elem;
        }
        public void simple_remove(org.xowl.infra.lang.owl2.IRI elem) {
            data = null;
        }
        private boolean tree_check_add(org.xowl.infra.lang.owl2.IRI elem) {
            if (!simple_check_add(elem)) return false;
            return true;
        }
        private boolean tree_check_remove(org.xowl.infra.lang.owl2.IRI elem) {
            if (!simple_check_remove(elem)) return false;
            return true;
        }
        private boolean tree_check_replace(org.xowl.infra.lang.owl2.IRI oldElem, org.xowl.infra.lang.owl2.IRI  newElem) {
            if (!simple_check_replace(oldElem, newElem)) return false;
            return true;
        }
        private void tree_add(org.xowl.infra.lang.owl2.IRI elem) {
            simple_add(elem);
        }
        private void tree_remove(org.xowl.infra.lang.owl2.IRI elem) {
            simple_remove(elem);
        }
        @Override public boolean user_check_add(org.xowl.infra.lang.owl2.IRI elem) {
            return tree_check_add(elem);
        }
        @Override public boolean user_check_remove(org.xowl.infra.lang.owl2.IRI elem) {
            return tree_check_remove(elem);
        }
        @Override public boolean user_check_replace(org.xowl.infra.lang.owl2.IRI oldElem, org.xowl.infra.lang.owl2.IRI  newElem) {
            return tree_check_replace(oldElem, newElem);
        }
        @Override public void user_add(org.xowl.infra.lang.owl2.IRI elem) {
            tree_add(elem);
        }
        @Override public void user_remove(org.xowl.infra.lang.owl2.IRI elem) {
            tree_remove(elem);
        }
        @Override public boolean inverse_check_add(org.xowl.infra.lang.owl2.IRI elem) {
            return tree_check_add(elem);
        }
        @Override public boolean inverse_check_remove(org.xowl.infra.lang.owl2.IRI elem) {
            return tree_check_remove(elem);
        }
        @Override public boolean inverse_check_replace(org.xowl.infra.lang.owl2.IRI oldElem, org.xowl.infra.lang.owl2.IRI  newElem) {
            return tree_check_replace(oldElem, newElem);
        }
        @Override public void inverse_add(org.xowl.infra.lang.owl2.IRI elem) {
            tree_add(elem);
        }
        @Override public void inverse_remove(org.xowl.infra.lang.owl2.IRI elem) {
            tree_remove(elem);
        }
        public hasIRI_impl(org.xowl.infra.lang.runtime.Entity domain) {
            this.domain = domain;
        }
    }
    private hasIRI_impl dataHasIRI;
    public org.xowl.infra.lang.runtime.Entity.hasIRI __getImplOfhasIRI() { return dataHasIRI; }
    public boolean setHasIRI(org.xowl.infra.lang.owl2.IRI elem) {
        if (dataHasIRI.get() != null) {
            if (elem == null) {
                if (!dataHasIRI.user_check_remove(dataHasIRI.get())) return false;
                dataHasIRI.user_remove(dataHasIRI.get());
            } else {
                if (!dataHasIRI.user_check_replace(dataHasIRI.get(), elem)) return false;
                dataHasIRI.user_remove(dataHasIRI.get());
                dataHasIRI.user_add(elem);
            }
        } else {
            if (elem == null) return true;
            if (!dataHasIRI.user_check_add(elem)) return false;
            dataHasIRI.user_add(elem);
        }
        return true;
    }
    public org.xowl.infra.lang.owl2.IRI getHasIRI() { return dataHasIRI.get(); }
    // 

    public Entity() {
        dataInterpretedAs = new interpretedAs_impl(this);
        dataContainedBy = new containedBy_impl(this);
        dataHasIRI = new hasIRI_impl(this);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy