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

org.xowl.infra.lang.runtime.Literal 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 Literal implements org.xowl.infra.lang.runtime.Value {
    // 
    public static interface lexicalValue {
        boolean check_contains(java.lang.String elem);
        boolean user_check_add(java.lang.String elem);
        boolean user_check_remove(java.lang.String elem);
        boolean user_check_replace(java.lang.String oldElem, java.lang.String  newElem);
        void user_add(java.lang.String elem);
        void user_remove(java.lang.String elem);
        boolean inverse_check_add(java.lang.String elem);
        boolean inverse_check_remove(java.lang.String elem);
        boolean inverse_check_replace(java.lang.String oldElem, java.lang.String  newElem);
        void inverse_add(java.lang.String elem);
        void inverse_remove(java.lang.String elem);
    }
    private static class lexicalValue_impl implements org.xowl.infra.lang.runtime.Literal.lexicalValue {
        private org.xowl.infra.lang.runtime.Literal domain;
        private java.lang.String data;
        public java.lang.String get_raw() { return data; }
        public java.lang.String 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.String elem) { return data.equals(elem); }
        public boolean simple_check_add(java.lang.String elem) {
            if (check_contains(elem)) return false;
            if (!check_card(1)) return false;
            return true;
        }
        public boolean simple_check_remove(java.lang.String elem) {
            if (!check_contains(elem)) return false;
            if (!check_card(-1)) return false;
            return true;
        }
        public boolean simple_check_replace(java.lang.String oldElem, java.lang.String  newElem) {
            if (check_contains(newElem)) return false;
            if (!check_contains(oldElem)) return false;
            return true;
        }
        public void simple_add(java.lang.String elem) {
            data = elem;
        }
        public void simple_remove(java.lang.String elem) {
            data = null;
        }
        private boolean tree_check_add(java.lang.String elem) {
            if (!simple_check_add(elem)) return false;
            return true;
        }
        private boolean tree_check_remove(java.lang.String elem) {
            if (!simple_check_remove(elem)) return false;
            return true;
        }
        private boolean tree_check_replace(java.lang.String oldElem, java.lang.String  newElem) {
            if (!simple_check_replace(oldElem, newElem)) return false;
            return true;
        }
        private void tree_add(java.lang.String elem) {
            simple_add(elem);
        }
        private void tree_remove(java.lang.String elem) {
            simple_remove(elem);
        }
        @Override public boolean user_check_add(java.lang.String elem) {
            return tree_check_add(elem);
        }
        @Override public boolean user_check_remove(java.lang.String elem) {
            return tree_check_remove(elem);
        }
        @Override public boolean user_check_replace(java.lang.String oldElem, java.lang.String  newElem) {
            return tree_check_replace(oldElem, newElem);
        }
        @Override public void user_add(java.lang.String elem) {
            tree_add(elem);
        }
        @Override public void user_remove(java.lang.String elem) {
            tree_remove(elem);
        }
        @Override public boolean inverse_check_add(java.lang.String elem) {
            return tree_check_add(elem);
        }
        @Override public boolean inverse_check_remove(java.lang.String elem) {
            return tree_check_remove(elem);
        }
        @Override public boolean inverse_check_replace(java.lang.String oldElem, java.lang.String  newElem) {
            return tree_check_replace(oldElem, newElem);
        }
        @Override public void inverse_add(java.lang.String elem) {
            tree_add(elem);
        }
        @Override public void inverse_remove(java.lang.String elem) {
            tree_remove(elem);
        }
        public lexicalValue_impl(org.xowl.infra.lang.runtime.Literal domain) {
            this.domain = domain;
        }
    }
    private lexicalValue_impl dataLexicalValue;
    public org.xowl.infra.lang.runtime.Literal.lexicalValue __getImplOflexicalValue() { return dataLexicalValue; }
    public boolean setLexicalValue(java.lang.String elem) {
        dataLexicalValue.simple_add(elem);
        return true;
    }
    public java.lang.String getLexicalValue() { return dataLexicalValue.get(); }
    // 

    // 
    public static interface langTag {
        boolean check_contains(java.lang.String elem);
        boolean user_check_add(java.lang.String elem);
        boolean user_check_remove(java.lang.String elem);
        boolean user_check_replace(java.lang.String oldElem, java.lang.String  newElem);
        void user_add(java.lang.String elem);
        void user_remove(java.lang.String elem);
        boolean inverse_check_add(java.lang.String elem);
        boolean inverse_check_remove(java.lang.String elem);
        boolean inverse_check_replace(java.lang.String oldElem, java.lang.String  newElem);
        void inverse_add(java.lang.String elem);
        void inverse_remove(java.lang.String elem);
    }
    private static class langTag_impl implements org.xowl.infra.lang.runtime.Literal.langTag {
        private org.xowl.infra.lang.runtime.Literal domain;
        private java.lang.String data;
        public java.lang.String get_raw() { return data; }
        public java.lang.String 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.String elem) { return data.equals(elem); }
        public boolean simple_check_add(java.lang.String elem) {
            if (check_contains(elem)) return false;
            if (!check_card(1)) return false;
            return true;
        }
        public boolean simple_check_remove(java.lang.String elem) {
            if (!check_contains(elem)) return false;
            if (!check_card(-1)) return false;
            return true;
        }
        public boolean simple_check_replace(java.lang.String oldElem, java.lang.String  newElem) {
            if (check_contains(newElem)) return false;
            if (!check_contains(oldElem)) return false;
            return true;
        }
        public void simple_add(java.lang.String elem) {
            data = elem;
        }
        public void simple_remove(java.lang.String elem) {
            data = null;
        }
        private boolean tree_check_add(java.lang.String elem) {
            if (!simple_check_add(elem)) return false;
            return true;
        }
        private boolean tree_check_remove(java.lang.String elem) {
            if (!simple_check_remove(elem)) return false;
            return true;
        }
        private boolean tree_check_replace(java.lang.String oldElem, java.lang.String  newElem) {
            if (!simple_check_replace(oldElem, newElem)) return false;
            return true;
        }
        private void tree_add(java.lang.String elem) {
            simple_add(elem);
        }
        private void tree_remove(java.lang.String elem) {
            simple_remove(elem);
        }
        @Override public boolean user_check_add(java.lang.String elem) {
            return tree_check_add(elem);
        }
        @Override public boolean user_check_remove(java.lang.String elem) {
            return tree_check_remove(elem);
        }
        @Override public boolean user_check_replace(java.lang.String oldElem, java.lang.String  newElem) {
            return tree_check_replace(oldElem, newElem);
        }
        @Override public void user_add(java.lang.String elem) {
            tree_add(elem);
        }
        @Override public void user_remove(java.lang.String elem) {
            tree_remove(elem);
        }
        @Override public boolean inverse_check_add(java.lang.String elem) {
            return tree_check_add(elem);
        }
        @Override public boolean inverse_check_remove(java.lang.String elem) {
            return tree_check_remove(elem);
        }
        @Override public boolean inverse_check_replace(java.lang.String oldElem, java.lang.String  newElem) {
            return tree_check_replace(oldElem, newElem);
        }
        @Override public void inverse_add(java.lang.String elem) {
            tree_add(elem);
        }
        @Override public void inverse_remove(java.lang.String elem) {
            tree_remove(elem);
        }
        public langTag_impl(org.xowl.infra.lang.runtime.Literal domain) {
            this.domain = domain;
        }
    }
    private langTag_impl dataLangTag;
    public org.xowl.infra.lang.runtime.Literal.langTag __getImplOflangTag() { return dataLangTag; }
    public boolean setLangTag(java.lang.String elem) {
        dataLangTag.simple_add(elem);
        return true;
    }
    public java.lang.String getLangTag() { return dataLangTag.get(); }
    // 

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

    public Literal() {
        dataLexicalValue = new lexicalValue_impl(this);
        dataLangTag = new langTag_impl(this);
        dataMemberOf = new memberOf_impl(this);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy