Examples of DmwWrapper


Examples of org.dmd.dmw.DmwWrapper

   
    // Tricky stuff: we always try to instantiate the wrapper for the object so that
    // we can support the DMW environment i.e. the DMO will have a handle to its
    // container. If something goes wrong, we fall back to directly instantiating
    // the DMO.
    DmwWrapper wrapper = null;
    try {
      wrapper = cd.newInstance();
    }
    catch(Exception ex){
      // Just fall back to instantiating the DMO
    }
   
    if (wrapper == null)
      rc = cd.newDMOInstance();
    else
      rc = wrapper.getDmcObject();
   
    // Add the auxiliary classes if they exist
    if (classCount > 1){
      for(int i=1; i<classCount; i++){
        classID = dis.readInt();
View Full Code Here

Examples of org.dmd.dmw.DmwWrapper

    public DmwWrapper wrapIt(DmcObject dmo){
      ClassDefinition cd = isClass(dmo.getConstructionClassName());
      if (cd == null){
        throw(new IllegalStateException("Cannot create DmwWrapper for unknown class: " + dmo.getConstructionClassName()));
      }
      DmwWrapper rc = null;
    try {
      rc = cd.newInstance();
    } catch (ResultException e) {
        throw(new IllegalStateException("Cannot create DmwWrapper for class: " + dmo.getConstructionClassName(),e));
    }
      rc.setDmcObject(dmo);
      return(rc);
    }
View Full Code Here

Examples of org.dmd.dmw.DmwWrapper

     */
//    public DmwWrapperBase newInstance() throws ResultException
    public DmwWrapper newInstance() throws ResultException
    {
//      DmwWrapperBase rc = null;
      DmwWrapper rc = null;

        if (genobjclass == null){
            // The first time we try to create an object this way, get our
            // object class so we can call Class.newInstance()
            try{
View Full Code Here

Examples of org.dmd.dmw.DmwWrapper

               
                return;
              }
            }
           
            DmwWrapper newObj = dmwfactory.createWrapper(uco);
            newDef     = null;

          newDef = (DmsDefinition) newObj;
          newDef.setFile(srcFile);
          newDef.setLineNumber(lineNumber);
View Full Code Here

Examples of org.dmd.dmw.DmwWrapper

   
    // Tricky stuff: we always try to instantiate the wrapper for the object so that
    // we can support the DMW environment i.e. the DMO will have a handle to its
    // container. If something goes wrong, we fall back to directly instantiating
    // the DMO.
    DmwWrapper wrapper = null;
    try {
      wrapper = cd.newInstance();
    }
    catch(Exception ex){
      // Just fall back to instantiating the DMO
    }
   
    if (wrapper == null)
      rc = cd.newDMOInstance();
    else
      rc = wrapper.getDmcObject();
   
    // Add the auxiliary classes if they exist
    if (classCount > 1){
      for(int i=1; i<classCount; i++){
        classID = dis.readInt();
View Full Code Here

Examples of org.dmd.dmw.DmwWrapper

   * @throws ResultException
   * @throws DmcValueException
   * @throws ClassNotFoundException 
   */
  public DmwWrapper createWrapper(DmcUncheckedObject uco) throws ResultException, DmcValueException, ClassNotFoundException {
    DmwWrapper       rc = null;
    DmcObject      dmo  = null;
    ClassDefinition    cd  = null;
    AttributeDefinition  ad  = null;
   
    if ((cd = schema.isClass((String)uco.classes.get(0))) == null){
      DebugInfo.debug("UncheckedObject:\n\n" + uco.toOIF());
          ResultException ex = new ResultException();
            ex.result.addResult(Result.ERROR,"Unknown class: " + uco.classes.get(0));
            throw(ex);
    }
   
   
    rc  = cd.newInstance();
    dmo = rc.getDmcObject();
           
    // And add any auxiliary classes if we have them
    for(int i=1; i<uco.classes.size(); i++){
      if ((cd = schema.isClass((String)uco.classes.get(i))) == null){
        DebugInfo.debug("UncheckedObject AUX:\n\n" + uco.toOIF());
            ResultException ex = new ResultException();
              ex.result.addResult(Result.ERROR,"Unknown class: " + uco.classes.get(i));
              throw(ex);
      }
      rc.addAux(cd);
    }
       
    Iterator<String> names = uco.getAttributeNames();
    while(names.hasNext()){
      String n = names.next();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.