org.xowl.infra.lang.owl2.DataIntersectionOf Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xowl-lang Show documentation
Show all versions of xowl-lang Show documentation
Java implementation of the xOWL language concepts
/* This file has been generated by:
xOWL Code Generator
*/
package org.xowl.infra.lang.owl2;
public class DataIntersectionOf implements org.xowl.infra.lang.owl2.Datarange, org.xowl.infra.lang.owl2.DataIntersectionOf_OR_DataUnionOf {
//
private static class datarangeSeq_impl implements org.xowl.infra.lang.owl2.DataIntersectionOf_OR_DataUnionOf.datarangeSeq {
private org.xowl.infra.lang.owl2.DataIntersectionOf domain;
private org.xowl.infra.lang.owl2.DatarangeSequenceExpression data;
public org.xowl.infra.lang.owl2.DatarangeSequenceExpression get_raw() { return data; }
public org.xowl.infra.lang.owl2.DatarangeSequenceExpression 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.DatarangeSequenceExpression elem) { return (data == elem); }
public boolean simple_check_add(org.xowl.infra.lang.owl2.DatarangeSequenceExpression 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.DatarangeSequenceExpression 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.DatarangeSequenceExpression oldElem, org.xowl.infra.lang.owl2.DatarangeSequenceExpression newElem) {
if (check_contains(newElem)) return false;
if (!check_contains(oldElem)) return false;
return true;
}
public void simple_add(org.xowl.infra.lang.owl2.DatarangeSequenceExpression elem) {
data = elem;
}
public void simple_remove(org.xowl.infra.lang.owl2.DatarangeSequenceExpression elem) {
data = null;
}
private boolean tree_check_add(org.xowl.infra.lang.owl2.DatarangeSequenceExpression elem) {
if (!simple_check_add(elem)) return false;
return true;
}
private boolean tree_check_remove(org.xowl.infra.lang.owl2.DatarangeSequenceExpression elem) {
if (!simple_check_remove(elem)) return false;
return true;
}
private boolean tree_check_replace(org.xowl.infra.lang.owl2.DatarangeSequenceExpression oldElem, org.xowl.infra.lang.owl2.DatarangeSequenceExpression newElem) {
if (!simple_check_replace(oldElem, newElem)) return false;
return true;
}
private void tree_add(org.xowl.infra.lang.owl2.DatarangeSequenceExpression elem) {
simple_add(elem);
}
private void tree_remove(org.xowl.infra.lang.owl2.DatarangeSequenceExpression elem) {
simple_remove(elem);
}
@Override public boolean user_check_add(org.xowl.infra.lang.owl2.DatarangeSequenceExpression elem) {
return tree_check_add(elem);
}
@Override public boolean user_check_remove(org.xowl.infra.lang.owl2.DatarangeSequenceExpression elem) {
return tree_check_remove(elem);
}
@Override public boolean user_check_replace(org.xowl.infra.lang.owl2.DatarangeSequenceExpression oldElem, org.xowl.infra.lang.owl2.DatarangeSequenceExpression newElem) {
return tree_check_replace(oldElem, newElem);
}
@Override public void user_add(org.xowl.infra.lang.owl2.DatarangeSequenceExpression elem) {
tree_add(elem);
}
@Override public void user_remove(org.xowl.infra.lang.owl2.DatarangeSequenceExpression elem) {
tree_remove(elem);
}
@Override public boolean inverse_check_add(org.xowl.infra.lang.owl2.DatarangeSequenceExpression elem) {
return tree_check_add(elem);
}
@Override public boolean inverse_check_remove(org.xowl.infra.lang.owl2.DatarangeSequenceExpression elem) {
return tree_check_remove(elem);
}
@Override public boolean inverse_check_replace(org.xowl.infra.lang.owl2.DatarangeSequenceExpression oldElem, org.xowl.infra.lang.owl2.DatarangeSequenceExpression newElem) {
return tree_check_replace(oldElem, newElem);
}
@Override public void inverse_add(org.xowl.infra.lang.owl2.DatarangeSequenceExpression elem) {
tree_add(elem);
}
@Override public void inverse_remove(org.xowl.infra.lang.owl2.DatarangeSequenceExpression elem) {
tree_remove(elem);
}
public datarangeSeq_impl(org.xowl.infra.lang.owl2.DataIntersectionOf domain) {
this.domain = domain;
}
}
private datarangeSeq_impl dataDatarangeSeq;
public org.xowl.infra.lang.owl2.DataIntersectionOf_OR_DataUnionOf.datarangeSeq __getImplOfdatarangeSeq() { return dataDatarangeSeq; }
public boolean setDatarangeSeq(org.xowl.infra.lang.owl2.DatarangeSequenceExpression elem) {
if (dataDatarangeSeq.get() != null) {
if (elem == null) {
if (!dataDatarangeSeq.user_check_remove(dataDatarangeSeq.get())) return false;
dataDatarangeSeq.user_remove(dataDatarangeSeq.get());
} else {
if (!dataDatarangeSeq.user_check_replace(dataDatarangeSeq.get(), elem)) return false;
dataDatarangeSeq.user_remove(dataDatarangeSeq.get());
dataDatarangeSeq.user_add(elem);
}
} else {
if (elem == null) return true;
if (!dataDatarangeSeq.user_check_add(elem)) return false;
dataDatarangeSeq.user_add(elem);
}
return true;
}
public org.xowl.infra.lang.owl2.DatarangeSequenceExpression getDatarangeSeq() { return dataDatarangeSeq.get(); }
//
public DataIntersectionOf() {
dataDatarangeSeq = new datarangeSeq_impl(this);
}
}