Package org.dmd.dmc

Examples of org.dmd.dmc.DmcValueException


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

        return(rc);
    }
View Full Code Here


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

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

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

        return(rc);
    }
View Full Code Here

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

        return(rc);
    }
View Full Code Here

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

        return(rc);
    }
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: EventSpec"));

         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: EventSpec"));

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

    else if (value instanceof String){
      String v = ((String) value).trim();

      int space = v.indexOf(" ");
      if (space == -1){
              throw(new DmcValueException("Expecting String followed by a String for StringToString"));
      }
     
      String keyPart = v.substring(0,space);
     
          if ( (space+1) == v.length()){
            throw(new DmcValueException("Missing String value for StringToString"));
          }
         
          rc = new StringToString(keyPart,v.substring(space+1).trim());
    }
        else{
            throw(new DmcValueException("Object of class: " + value.getClass().getName() + " passed where object compatible with StringToString expected."));
        }
   
    return(rc);
  }
View Full Code Here

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

      while(mods.hasNext()){
        Modifier mod = mods.next();
        if (!mod.isResolved()){
          if (ex == null)
            ex = new DmcValueExceptionSet();
          ex.add(new DmcValueException("The value for the " + mod.operation + " modification on the " + mod.attributeName + " attribute is not resolved."));
        }
      }
    }
   
    if (ex != null)
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.