org.xowl.infra.lang.owl2.IRI 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 IRI implements org.xowl.infra.lang.owl2.AnnotationSubject, org.xowl.infra.lang.owl2.AnnotationValue, org.xowl.infra.lang.owl2.EntityExpression {
//
public static interface hasValue {
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 hasValue_impl implements org.xowl.infra.lang.owl2.IRI.hasValue {
private org.xowl.infra.lang.owl2.IRI 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 hasValue_impl(org.xowl.infra.lang.owl2.IRI domain) {
this.domain = domain;
}
}
private hasValue_impl dataHasValue;
public org.xowl.infra.lang.owl2.IRI.hasValue __getImplOfhasValue() { return dataHasValue; }
public boolean setHasValue(java.lang.String elem) {
dataHasValue.simple_add(elem);
return true;
}
public java.lang.String getHasValue() { return dataHasValue.get(); }
//
public IRI() {
dataHasValue = new hasValue_impl(this);
}
}