package org.dmd.dmt.shared.generated.dmo;
// Generated from: org.dmd.dms.util.GenUtility.formatImports(GenUtility.java:391)
import java.io.Serializable; // Always required - (GenUtility.java:220)
import java.util.*; // Always required if we have any MV attributes - (GenUtility.java:215)
import org.dmd.dmc.DmcAttribute; // Any attributes - (GenUtility.java:236)
import org.dmd.dmc.DmcObject; // Structural class - (GenUtility.java:347)
import org.dmd.dmc.DmcOmni; // Lazy resolution - (GenUtility.java:316)
import org.dmd.dmc.DmcSliceInfo; // Required for object slicing - (GenUtility.java:225)
import org.dmd.dmc.DmcValueException; // Any attributes - (GenUtility.java:237)
import org.dmd.dms.generated.dmo.MetaDMSAG; // Required for MODREC constructor - (GenUtility.java:224)
import org.dmd.dms.generated.types.DmcTypeBooleanSV; // Required type - (GenUtility.java:324)
import org.dmd.dms.generated.types.DmcTypeModifierMV; // Required for MODREC constructor - (GenUtility.java:223)
import org.dmd.dmt.shared.generated.dmo.ObjWithRefsDMO; // Type specific set/add - (GenUtility.java:303)
import org.dmd.dmt.shared.generated.dmo.TestBasicObjectFixedDMO; // Type specific set/add - (GenUtility.java:303)
import org.dmd.dmt.shared.generated.types.DmcTypeObjWithRefsREFMV; // Reference type - (GenUtility.java:296)
import org.dmd.dmt.shared.generated.types.DmcTypeTestBasicObjectFixedREFMV; // Reference type - (GenUtility.java:296)
import org.dmd.dmt.shared.generated.types.DmcTypeTestBasicObjectFixedREFSV; // Reference type - (GenUtility.java:296)
import org.dmd.dmt.shared.generated.types.ObjWithRefsREF; // Helper class - (GenUtility.java:331)
/**
* Used to test the DmcUncheckedOIFParser in the creation of
* DmcUncheckedObjects within DmcUncheckedObjects.
* <P>
* Generated from the dmt schema at version 0.1
* <P>
* This code was auto-generated by the dmogenerator utility and shouldn't be alterred manually!
* Generated from: org.dmd.dms.util.DmoFormatter.dumpDMO(DmoFormatter.java:133)
*/
@SuppressWarnings("serial")
public class ParseTestDMO extends DmcObject implements Serializable {
public final static String constructionClassName = "ParseTest";
static {
}
public ParseTestDMO() {
super("ParseTest");
}
protected ParseTestDMO(String oc) {
super(oc);
}
@Override
public ParseTestDMO getNew(){
ParseTestDMO rc = new ParseTestDMO();
return(rc);
}
@Override
public ParseTestDMO getSlice(DmcSliceInfo info){
ParseTestDMO rc = new ParseTestDMO();
populateSlice(rc,info);
return(rc);
}
public ParseTestDMO(DmcTypeModifierMV mods) {
super("ParseTest");
modrec(true);
setModifier(mods);
}
public ParseTestDMO getModificationRecorder(){
ParseTestDMO rc = new ParseTestDMO();
rc.setModifier(new DmcTypeModifierMV(MetaDMSAG.__modify));
rc.modrec(true);
return(rc);
}
// org.dmd.dms.util.GenUtility.formatSV(GenUtility.java:645)
public TestBasicObjectFixedDMO getSvUnnamedObj(){
DmcTypeTestBasicObjectFixedREFSV attr = (DmcTypeTestBasicObjectFixedREFSV) get(DmtDMSAG.__svUnnamedObj);
if (attr == null)
return(null);
return(attr.getSV());
}
/**
* Sets svUnnamedObj to the specified value.
* @param value TestBasicObjectFixedDMO
*/
// org.dmd.dms.util.GenUtility.formatSV(GenUtility.java:699)
public void setSvUnnamedObj(TestBasicObjectFixedDMO value) {
DmcAttribute<?> attr = get(DmtDMSAG.__svUnnamedObj);
if (attr == null)
attr = new DmcTypeTestBasicObjectFixedREFSV(DmtDMSAG.__svUnnamedObj);
try{
attr.set(value);
set(DmtDMSAG.__svUnnamedObj,attr);
}
catch(DmcValueException ex){
throw(new IllegalStateException("The type specific set() method shouldn't throw exceptions!",ex));
}
}
/**
* Sets svUnnamedObj to the specified value.
* @param value A value compatible with DmcTypeTestBasicObjectFixedREFSV
*/
// org.dmd.dms.util.GenUtility.formatSV(GenUtility.java:867)
public void setSvUnnamedObj(Object value) throws DmcValueException {
DmcTypeTestBasicObjectFixedREFSV attr = (DmcTypeTestBasicObjectFixedREFSV) get(DmtDMSAG.__svUnnamedObj);
if (attr == null)
attr = new DmcTypeTestBasicObjectFixedREFSV(DmtDMSAG.__svUnnamedObj);
attr.set(value);
set(DmtDMSAG.__svUnnamedObj,attr);
}
/**
* Removes the svUnnamedObj attribute value.
*/
// org.dmd.dms.util.GenUtility.formatSV(GenUtility.java:887)
public void remSvUnnamedObj(){
rem(DmtDMSAG.__svUnnamedObj);
}
/**
* @return An Iterator of TestBasicObjectFixedDMO objects.
*/
@SuppressWarnings("unchecked")
// org.dmd.dms.util.GenUtility.formatMV(GenUtility.java:948)
public Iterator<TestBasicObjectFixedDMO> getMvUnnamedObj(){
DmcTypeTestBasicObjectFixedREFMV attr = (DmcTypeTestBasicObjectFixedREFMV) get(DmtDMSAG.__mvUnnamedObj);
if (attr == null)
return( ((List<TestBasicObjectFixedDMO>) Collections.EMPTY_LIST).iterator() );
return(attr.getMV());
}
/**
* Adds another mvUnnamedObj to the specified value.
* @param value TestBasicObjectFixed
*/
// org.dmd.dms.util.GenUtility.formatMV(GenUtility.java:994)
public DmcAttribute<?> addMvUnnamedObj(TestBasicObjectFixedDMO value) {
DmcAttribute<?> attr = get(DmtDMSAG.__mvUnnamedObj);
if (attr == null)
attr = new DmcTypeTestBasicObjectFixedREFMV(DmtDMSAG.__mvUnnamedObj);
try{
setLastValue(attr.add(value));
add(DmtDMSAG.__mvUnnamedObj,attr);
}
catch(DmcValueException ex){
throw(new IllegalStateException("The type specific add() method shouldn't throw exceptions!",ex));
}
return(attr);
}
/**
* Adds another mvUnnamedObj value.
* @param value A value compatible with TestBasicObjectFixed
*/
// org.dmd.dms.util.GenUtility.formatMV(GenUtility.java:1235)
public DmcAttribute<?> addMvUnnamedObj(Object value) throws DmcValueException {
DmcAttribute<?> attr = get(DmtDMSAG.__mvUnnamedObj);
if (attr == null)
attr = new DmcTypeTestBasicObjectFixedREFMV(DmtDMSAG.__mvUnnamedObj);
setLastValue(attr.add(value));
add(DmtDMSAG.__mvUnnamedObj,attr);
return(attr);
}
/**
* Returns the number of values in mvUnnamedObj
*/
// org.dmd.dms.util.GenUtility.formatMV(GenUtility.java:1252)
public int getMvUnnamedObjSize(){
DmcAttribute<?> attr = get(DmtDMSAG.__mvUnnamedObj);
if (attr == null){
if (DmtDMSAG.__mvUnnamedObj.indexSize == 0)
return(0);
else
return(DmtDMSAG.__mvUnnamedObj.indexSize);
}
return(attr.getMVSize());
}
/**
* Deletes a mvUnnamedObj value.
* @param value The TestBasicObjectFixed to be deleted from set of attribute values.
*/
// org.dmd.dms.util.GenUtility.formatMV(GenUtility.java:1274)
public DmcAttribute<?> delMvUnnamedObj(Object value){
DmcAttribute<?> attr = get(DmtDMSAG.__mvUnnamedObj);
if ( (attr == null) && (getModifier()!= null))
delFromEmptyAttribute(new DmcTypeTestBasicObjectFixedREFMV(DmtDMSAG.__mvUnnamedObj), value);
else
attr = del(DmtDMSAG.__mvUnnamedObj, value);
return(attr);
}
/**
* Removes the mvUnnamedObj attribute value.
*/
// org.dmd.dms.util.GenUtility.formatMV(GenUtility.java:1345)
public void remMvUnnamedObj(){
rem(DmtDMSAG.__mvUnnamedObj);
}
// org.dmd.dms.util.GenUtility.formatSV(GenUtility.java:774)
public Boolean isSvBoolean(){
DmcTypeBooleanSV attr = (DmcTypeBooleanSV) get(DmtDMSAG.__svBoolean);
if (attr == null)
return(false);
return(attr.getSV());
}
/**
* Sets svBoolean to the specified value.
* @param value Boolean
*/
// org.dmd.dms.util.GenUtility.formatSV(GenUtility.java:814)
public void setSvBoolean(Boolean value) {
DmcAttribute<?> attr = get(DmtDMSAG.__svBoolean);
if (attr == null)
attr = new DmcTypeBooleanSV(DmtDMSAG.__svBoolean);
try{
attr.set(value);
set(DmtDMSAG.__svBoolean,attr);
}
catch(DmcValueException ex){
throw(new IllegalStateException("The type specific set() method shouldn't throw exceptions!",ex));
}
}
/**
* Sets svBoolean to the specified value.
* @param value A value compatible with DmcTypeBooleanSV
*/
// org.dmd.dms.util.GenUtility.formatSV(GenUtility.java:867)
public void setSvBoolean(Object value) throws DmcValueException {
DmcTypeBooleanSV attr = (DmcTypeBooleanSV) get(DmtDMSAG.__svBoolean);
if (attr == null)
attr = new DmcTypeBooleanSV(DmtDMSAG.__svBoolean);
attr.set(value);
set(DmtDMSAG.__svBoolean,attr);
}
/**
* Removes the svBoolean attribute value.
*/
// org.dmd.dms.util.GenUtility.formatSV(GenUtility.java:887)
public void remSvBoolean(){
rem(DmtDMSAG.__svBoolean);
}
/**
* @return The nth ObjWithRefs value and attempt lazy resolution if it's on.
*/
// org.dmd.dms.util.GenUtility.formatMV(GenUtility.java:1028)
public ObjWithRefsREF getNthMvIdxNamedObj(int i){
DmcTypeObjWithRefsREFMV attr = (DmcTypeObjWithRefsREFMV) get(DmtDMSAG.__mvIdxNamedObj);
if (attr == null)
return(null);
if (DmcOmni.instance().lazyResolution()){
if (attr.doLazyResolution(this)){
rem(attr.getAttributeInfo());
return(null);
}
}
return(attr.getMVnth(i));
}
/**
* @return The nth ObjWithRefs value without attempting lazy resolution.
*/
// org.dmd.dms.util.GenUtility.formatMV(GenUtility.java:1047)
public ObjWithRefsREF getNthMvIdxNamedObjREF(int i){
DmcTypeObjWithRefsREFMV attr = (DmcTypeObjWithRefsREFMV) get(DmtDMSAG.__mvIdxNamedObj);
if (attr == null)
return(null);
return(attr.getMVnth(i));
}
/**
* Sets the mvIdxNamedObj value at the specified index.
* @param value ObjWithRefs
*/
// org.dmd.dms.util.GenUtility.formatMV(GenUtility.java:1061)
public DmcAttribute<?> setNthMvIdxNamedObj(int index, ObjWithRefsDMO value) {
DmcAttribute<?> attr = get(DmtDMSAG.__mvIdxNamedObj);
if (attr == null){
if (value == null){
if (getModifier() == null)
throw(new IllegalStateException("Calling setNth() on a non-existent attribute with a null value makes no sense!"));
else{
nthNullFromEmptyAttribute(DmtDMSAG.__mvIdxNamedObj, index);
return(null);
}
}
else
attr = new DmcTypeObjWithRefsREFMV(DmtDMSAG.__mvIdxNamedObj);
}
try{
ObjWithRefsREF previous = (ObjWithRefsREF) attr.getMVnth(index);
setLastValue(attr.setMVnth(index, value));
nth(DmtDMSAG.__mvIdxNamedObj,index ,attr,previous);
}
catch(DmcValueException ex){
throw(new IllegalStateException("The type specific setNth() method shouldn't throw exceptions!",ex));
}
return(attr);
}
/**
* Adds another mvIdxNamedObj value.
* @param value A value compatible with ObjWithRefs
*/
// org.dmd.dms.util.GenUtility.formatMV(GenUtility.java:1235)
public DmcAttribute<?> addMvIdxNamedObj(Object value) throws DmcValueException {
DmcAttribute<?> attr = get(DmtDMSAG.__mvIdxNamedObj);
if (attr == null)
attr = new DmcTypeObjWithRefsREFMV(DmtDMSAG.__mvIdxNamedObj);
setLastValue(attr.add(value));
add(DmtDMSAG.__mvIdxNamedObj,attr);
return(attr);
}
/**
* Returns the number of values in mvIdxNamedObj
*/
// org.dmd.dms.util.GenUtility.formatMV(GenUtility.java:1252)
public int getMvIdxNamedObjSize(){
DmcAttribute<?> attr = get(DmtDMSAG.__mvIdxNamedObj);
if (attr == null){
if (DmtDMSAG.__mvIdxNamedObj.indexSize == 0)
return(0);
else
return(DmtDMSAG.__mvIdxNamedObj.indexSize);
}
return(attr.getMVSize());
}
/**
* Deletes a mvIdxNamedObj value.
* @param value The ObjWithRefs to be deleted from set of attribute values.
*/
// org.dmd.dms.util.GenUtility.formatMV(GenUtility.java:1291)
public DmcAttribute<?> delMvIdxNamedObj(Object value){
DmcAttribute<?> attr = get(DmtDMSAG.__mvIdxNamedObj);
if ( (attr == null) && (getModifier()!= null))
delFromEmptyAttribute(new DmcTypeObjWithRefsREFMV(DmtDMSAG.__mvIdxNamedObj), value);
else
attr = del(DmtDMSAG.__mvIdxNamedObj, value);
return(attr);
}
/**
* Removes the mvIdxNamedObj attribute value.
*/
// org.dmd.dms.util.GenUtility.formatMV(GenUtility.java:1345)
public void remMvIdxNamedObj(){
rem(DmtDMSAG.__mvIdxNamedObj);
}
/**
* @return The nth TestBasicObjectFixed value without attempting lazy resolution.
*/
// org.dmd.dms.util.GenUtility.formatMV(GenUtility.java:1015)
public TestBasicObjectFixedDMO getNthMvIdxUnnamedObj(int i){
DmcTypeTestBasicObjectFixedREFMV attr = (DmcTypeTestBasicObjectFixedREFMV) get(DmtDMSAG.__mvIdxUnnamedObj);
if (attr == null)
return(null);
return(attr.getMVnth(i));
}
/**
* Sets the mvIdxUnnamedObj value at the specified index.
* @param value TestBasicObjectFixed
*/
// org.dmd.dms.util.GenUtility.formatMV(GenUtility.java:1061)
public DmcAttribute<?> setNthMvIdxUnnamedObj(int index, TestBasicObjectFixedDMO value) {
DmcAttribute<?> attr = get(DmtDMSAG.__mvIdxUnnamedObj);
if (attr == null){
if (value == null){
if (getModifier() == null)
throw(new IllegalStateException("Calling setNth() on a non-existent attribute with a null value makes no sense!"));
else{
nthNullFromEmptyAttribute(DmtDMSAG.__mvIdxUnnamedObj, index);
return(null);
}
}
else
attr = new DmcTypeTestBasicObjectFixedREFMV(DmtDMSAG.__mvIdxUnnamedObj);
}
try{
setLastValue(attr.setMVnth(index, value));
nth(DmtDMSAG.__mvIdxUnnamedObj, index ,attr, null);
}
catch(DmcValueException ex){
throw(new IllegalStateException("The type specific setNth() method shouldn't throw exceptions!",ex));
}
return(attr);
}
/**
* Adds another mvIdxUnnamedObj value.
* @param value A value compatible with TestBasicObjectFixed
*/
// org.dmd.dms.util.GenUtility.formatMV(GenUtility.java:1235)
public DmcAttribute<?> addMvIdxUnnamedObj(Object value) throws DmcValueException {
DmcAttribute<?> attr = get(DmtDMSAG.__mvIdxUnnamedObj);
if (attr == null)
attr = new DmcTypeTestBasicObjectFixedREFMV(DmtDMSAG.__mvIdxUnnamedObj);
setLastValue(attr.add(value));
add(DmtDMSAG.__mvIdxUnnamedObj,attr);
return(attr);
}
/**
* Returns the number of values in mvIdxUnnamedObj
*/
// org.dmd.dms.util.GenUtility.formatMV(GenUtility.java:1252)
public int getMvIdxUnnamedObjSize(){
DmcAttribute<?> attr = get(DmtDMSAG.__mvIdxUnnamedObj);
if (attr == null){
if (DmtDMSAG.__mvIdxUnnamedObj.indexSize == 0)
return(0);
else
return(DmtDMSAG.__mvIdxUnnamedObj.indexSize);
}
return(attr.getMVSize());
}
/**
* Deletes a mvIdxUnnamedObj value.
* @param value The TestBasicObjectFixed to be deleted from set of attribute values.
*/
// org.dmd.dms.util.GenUtility.formatMV(GenUtility.java:1274)
public DmcAttribute<?> delMvIdxUnnamedObj(Object value){
DmcAttribute<?> attr = get(DmtDMSAG.__mvIdxUnnamedObj);
if ( (attr == null) && (getModifier()!= null))
delFromEmptyAttribute(new DmcTypeTestBasicObjectFixedREFMV(DmtDMSAG.__mvIdxUnnamedObj), value);
else
attr = del(DmtDMSAG.__mvIdxUnnamedObj, value);
return(attr);
}
/**
* Removes the mvIdxUnnamedObj attribute value.
*/
// org.dmd.dms.util.GenUtility.formatMV(GenUtility.java:1345)
public void remMvIdxUnnamedObj(){
rem(DmtDMSAG.__mvIdxUnnamedObj);
}
}