Package org.dmd.dmc

Examples of org.dmd.dmc.DmcValueException


        else if (value instanceof String){
            rc = new DependencyREF();
            rc.setName(new StringName((String)value));
        }
        else
            throw(new DmcValueException("Object of class:" + value.getClass().getName() + " passed where a DependencyREF/DMO or DmcObjectName expected."));
        return(rc);
    }
View Full Code Here


        else if (value instanceof CamelCaseName)
            rc = new MenuREF((CamelCaseName)value);
        else if (value instanceof String)
            rc = new MenuREF((String)value);
        else
            throw(new DmcValueException("Object of class: " + value.getClass().getName() + " passed where object compatible with MenuREF, MenuDMO or String expected."));

        return(rc);
    }
View Full Code Here

        else if (value instanceof CamelCaseName)
            rc = new RunContextItemREF((CamelCaseName)value);
        else if (value instanceof String)
            rc = new RunContextItemREF((String)value);
        else
            throw(new DmcValueException("Object of class: " + value.getClass().getName() + " passed where object compatible with RunContextItemREF, RunContextItemDMO or String expected."));

        return(rc);
    }
View Full Code Here

        DmcNamedObjectIF  obj = null;

        if (!attribute.isResolved()){
            obj = resolver.findNamedObject(attribute.getObjectName());
            if (obj == null)
                throw(new DmcValueException("Could not resolve reference to: " + attribute.getObjectName() + " via attribute: " + attrName));
       
            if (obj instanceof DmcContainerIF)
                ((DmcNamedObjectREF)attribute).setObject((DmcNamedObjectIF) ((DmcContainerIF)obj).getDmcObject());
            else
                ((DmcNamedObjectREF)attribute).setObject(obj);
View Full Code Here

    String getNextField(String input, IntegerVar seppos, String fn, boolean last) throws DmcValueException {
         String rc = null;
         int start = seppos.intValue();

         if ( (start+1) >= input.length())
           throw (new DmcValueException("Missing value for field: " + fn + " in complex type: GPBField"));

         if (last){
             rc = input.substring(start+1);
         }
         else{
             int pos = -1;
             if (start > 0)
               pos = input.indexOf(" ", start+1);
             else
               pos = input.indexOf(" ");

             if (pos == -1)
               throw (new DmcValueException("Missing value for field: " + fn + " in complex type: GPBField"));

           while(pos < (input.length()-1)){
               if ( input.charAt(pos+1) == ' ')
                   pos++;
               else
View Full Code Here

        }
        else if (value instanceof String){
            rc = new MenuElementTypeAndComment((String)value);
        }
        else{
            throw(new DmcValueException("Object of class: " + value.getClass().getName() + " passed where object compatible with MenuElementTypeAndComment expected."));
        }
        return(rc);
    }
View Full Code Here

        }
        else if (value instanceof Integer){
            rc = DmtTestEnum.get((Integer)value);
        }
        else{
            throw(new DmcValueException("Object of class: " + value.getClass().getName() + " passed where object compatible with DmtTestEnum expected."));
        }

        if (rc == null){
            throw(new DmcValueException("Value: " + value.toString() + " is not a valid DmtTestEnum value."));
        }

        return(rc);
    }
View Full Code Here

    protected NamedObjTMDMO typeCheck(Object value) throws DmcValueException {
        if (value instanceof NamedObjTMDMO)
            return((NamedObjTMDMO)value);
       
        throw(new DmcValueException("Object of class: " + value.getClass().getName() + " passed where object compatible with NamedObjTMDMO expected."));
    }
View Full Code Here

        DmcNamedObjectIF  obj = null;

        if (!type.isResolved()){
            obj = resolver.findNamedObject(type.getObjectName());
            if (obj == null)
                throw(new DmcValueException("Could not resolve reference to: " + type.getObjectName() + " via attribute: " + attrName));
       
            if (obj instanceof DmcContainerIF)
                ((DmcNamedObjectREF)type).setObject((DmcNamedObjectIF) ((DmcContainerIF)obj).getDmcObject());
            else
                ((DmcNamedObjectREF)type).setObject(obj);
View Full Code Here

    String getNextField(String input, IntegerVar seppos, String fn, boolean last) throws DmcValueException {
         String rc = null;
         int start = seppos.intValue();

         if ( (start+1) >= input.length())
           throw (new DmcValueException("Missing value for field: " + fn + " in complex type: Field"));

         if (last){
             rc = input.substring(start+1);
         }
         else{
             int pos = -1;
             if (start > 0)
               pos = input.indexOf(" ", start+1);
             else
               pos = input.indexOf(" ");

             if (pos == -1)
               throw (new DmcValueException("Missing value for field: " + fn + " in complex type: Field"));

           while(pos < (input.length()-1)){
               if ( input.charAt(pos+1) == ' ')
                   pos++;
               else
View Full Code Here

TOP

Related Classes of org.dmd.dmc.DmcValueException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.