Package org.dmd.dms.generated.types

Examples of org.dmd.dms.generated.types.DmcTypeClassDefinitionREFMV


//    DebugInfo.debug(uco.toOIF(15));
   
    dmo = cd.newDMOInstance();
   
    // Add the object class
    DmcTypeClassDefinitionREFMV cref = new DmcTypeClassDefinitionREFMV();
    cref.add(cd.getObjectName());
   
    dmo.add(DmcObject.__objectClass, cref);
   
    // 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){
            ResultException ex = new ResultException();
              ex.result.addResult(Result.ERROR,"Unknown class: " + uco.classes.get(i));
              throw(ex);
      }
      cref.add(cd.getObjectName());
      dmo.add("objectClass", cref);
    }
   
    Iterator<String> names = uco.getAttributeNames();
    while(names.hasNext()){
View Full Code Here


    attributes   = new HashMap<Integer, DmcAttribute<?>>();
    info    = null;
   
    // All objects have a well known construction class which is the first
    // entry in their objectClass attribute.
        DmcAttribute<?> attr = new DmcTypeClassDefinitionREFMV(__objectClass);
        try {
            attr.add(new StringName(oc));
      add(__objectClass,attr);
    } catch (DmcValueException e) {
      throw(new IllegalStateException("Setting the objectClass using a String shouldn't ever croak!", e));
    }
  }
View Full Code Here

   * @return The class definition reference for this object. Realize that this may just contain the
   * name of the class, not the reference to the ClassDefinition itself; it all depends on the
   * operational context.
   */
  public Iterator<ClassDefinitionREF> getObjectClass(){
    DmcTypeClassDefinitionREFMV objClass = (DmcTypeClassDefinitionREFMV) attributes.get(__objectClass.id);
    if (objClass == null)
      throw(new IllegalStateException("A DMO shouldn't exist without its objClass attribute!"));
    return(objClass.getMV());
  }
View Full Code Here

   * @return The class definition reference for this object. Realize that this may just contain the
   * name of the class, not the reference to the ClassDefinition itself; it all depends on the
   * operational context.
   */
  public ClassDefinitionREF getConstructionClass(){
    DmcTypeClassDefinitionREFMV objClass = (DmcTypeClassDefinitionREFMV) attributes.get(__objectClass.id);
    if (objClass == null)
      throw(new IllegalStateException("A DMO shouldn't exist without its objClass attribute!"));
    return(objClass.getMVnth(0));
  }
View Full Code Here

    boolean rc = false;
   
    if (ai.id == __objectClass.id)
      return(true);
   
    DmcTypeClassDefinitionREFMV objClass = (DmcTypeClassDefinitionREFMV) attributes.get(__objectClass.id);
    for(int i=0; i<objClass.getMVSize(); i++){
      if (objClass.getMVnth(i).getClassInfo().allowsAttribute(ai)){
        rc = true;
        break;
      }
    }
   
View Full Code Here

//   
       
    if (id == __objectClass.id)
      return(__objectClass);
   
    DmcTypeClassDefinitionREFMV objClass = (DmcTypeClassDefinitionREFMV) attributes.get(__objectClass.id);
    for(int i=0; i<objClass.getMVSize(); i++){
      rc = objClass.getMVnth(i).getClassInfo().allowsAttribute(id);
      if (rc != null)
        break;
    }
   
    return(rc);
View Full Code Here

 
  /**
   * @return The class name of this object.
   */
  public String getConstructionClassName(){
    DmcTypeClassDefinitionREFMV ocl = (DmcTypeClassDefinitionREFMV) get(__objectClass.id);
   
    if (ocl != null){
      // HACK - attrInfo
      ocl.getAttributeInfo();
      if (ocl.getMVSize() > 0){
        return(ocl.getMVnth(0).getObjectName().getNameString());
      }
    }
   
    return(null);
  }
View Full Code Here

   * @return The full class name of this object with auxiliary classes included
   */
  public String getFullClassName(){
    StringBuffer sb = new StringBuffer();
   
    DmcTypeClassDefinitionREFMV objClass = (DmcTypeClassDefinitionREFMV) attributes.get(__objectClass.id);
    for(int i=0; i<objClass.getMVSize(); i++){
      if (i>0)
        sb.append(" " + objClass.getMVnth(i).getClassInfo().name);
      else
        sb.append(objClass.getMVnth(i).getClassInfo().name);
    }
   
    return(null);
  }
View Full Code Here

     * Adds the specified auxiliary class name to the object.
     * @param cd The auxiliary class name.
     * @throws DmcValueException 
     */
    public void addAux(String cd) throws DmcValueException {
      DmcTypeClassDefinitionREFMV ocl = (DmcTypeClassDefinitionREFMV) get(__objectClass.id);

    if (ocl != null)
      ocl.add(cd);
    }
View Full Code Here

     * Adds the specified auxiliary class name to the object.
     * @param cd The auxiliary class name.
     * @throws DmcValueException 
     */
    public void addAux(ClassDefinitionREF cd) throws DmcValueException {
      DmcTypeClassDefinitionREFMV ocl = (DmcTypeClassDefinitionREFMV) get(__objectClass.id);

    if (ocl != null)
      ocl.add(cd);
    }
View Full Code Here

TOP

Related Classes of org.dmd.dms.generated.types.DmcTypeClassDefinitionREFMV

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.