Package org.dmd.dmc

Examples of org.dmd.dmc.DmcAttributeInfo


            ResultException ex = new ResultException();
              ex.result.addResult(Result.ERROR,"Unknown attribute: " + n);
              throw(ex);
      }
     
      DmcAttributeInfo ai = dmo.getAttributeInfo(n);
      if (ai == null){
        ai = ad.getAttributeInfo();
      }
     
//      DmcAttributeInfo ai = DmcOmni.instance().getInfo(ad.getDmdID());
View Full Code Here


  @Override
  public int readAttributeID() throws Exception {
    int id = dis.readShort();
   
//    DmcAttributeInfo ai = schema.getAttributeInfo(id);
    DmcAttributeInfo ai = DmcOmni.instance().getInfo(id);
   
    if (calledFrom)
      System.out.print(format.sprintf(DebugInfo.getShortWhereWeWereCalledFrom()) + " ");
    if (ai == null)
      System.out.println(" attrid: " + id + "  ???");
View Full Code Here

       
        Iterator<Modifier>  modifiers = getModifyAttribute().getMV();
        if (modifiers != null){
          while(modifiers.hasNext()){
            Modifier mod = modifiers.next();
            DmcAttributeInfo ai = mod.getAttributeInfo();
            if (ai == null)
              throw(new IllegalStateException("Unknown attribute in modify: " + mod.getAttributeName()));
            if (ai.dataType == DataTypeEnum.PERSISTENT)
              newModifier.add(new Modifier(mod));
          }
View Full Code Here

    if (getEventTypeDMP() == DMPEventTypeEnum.MODIFIED){
      DmcTypeModifierMV mods = getModifyAttribute();
      if (mods != null){
        for(int i=0; i<mods.getMVSize(); i++){
          Modifier mod = mods.getMVnth(i);
          DmcAttributeInfo modai = mod.getAttributeInfo();
          if (modai == null)
            throw(new IllegalStateException("Couldn't get attriute info for: " + mod.getAttributeName()));
          if (modai.id == ai.id)
            return(true);
        }
View Full Code Here

     * @throws IllegalAccessException
     * @throws ClassNotFoundException
     */
    public DmcAttribute<?> getAttributeInstance(Integer id) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
      AttributeDefinition ad = attrByID.get(id);
      DmcAttributeInfo  ai = DmcOmni.instance().getInfo(id);
     
      if (ad == null){
        throw(new IllegalStateException("Tried to deserialize attribute with unknown ID: " + id));
      }
     
View Full Code Here

     
      if (ad == null){
        throw(new IllegalStateException("No naming attribute has been defined of type: " + oni.getNameClass()));
      }
     
      DmcAttributeInfo ai = DmcOmni.instance().getInfo(ad.getDmdID());
     
      if (ai == null){
        throw(new IllegalStateException("No attribute info for attribute: " + ad.getName() + " id: " + ad.getDmdID()));
      }
     
View Full Code Here

     * associated with auxiliary classes. It shouldn't be used for any other purpose.
     * @return The attribute info.
     */
    public DmcAttributeInfo getAttributeInfo(){
      if (attrInfo == null)
        attrInfo = new DmcAttributeInfo(getName().getNameString(), getDmdID(), getType().getName().getNameString(), getValueType(), getDataType());
     
      return(attrInfo);
    }
View Full Code Here

     * @return the DmcClassInfo that was associated with this definition when it was constructed as
     * part of the SchemaAG.
     */
    public DmcClassInfo getDynamicClassInfo(){
      if (classInfo == null){
        DmcAttributeInfo na = null;
        if (this.getIsNamedBy() != null){
          na = this.getIsNamedBy().getAttributeInfo();
        }
       
        if (getDerivedFrom() == null)
View Full Code Here

            ResultException ex = new ResultException();
              ex.result.addResult(Result.ERROR,"Unknown attribute: " + n);
              throw(ex);
      }
     
      DmcAttributeInfo ai = dmo.getAttributeInfo(n);
      if (ai == null){
        ai = ad.getAttributeInfo();
      }
     
//      DmcAttributeInfo ai = DmcOmni.instance().getInfo(ad.getDmdID());
View Full Code Here

     * @param obj The object in which the attribute exists
     * @param attribute The attribute to be validated
     */
    public void execute(DmcObject obj, DmcAttribute<?> attribute) throws DmcRuleExceptionSet {
        DmcRuleExceptionSet rc = null;
        DmcAttributeInfo    aI = attribute.getAttributeInfo();
        DmcClassInfo        cI = obj.getConstructionClassInfo();
        ArrayList<AttributeValidationIF> ruleList = super.getRules(aI,cI);

        if (ruleList != null){
            for(AttributeValidationIF rule: ruleList){
View Full Code Here

TOP

Related Classes of org.dmd.dmc.DmcAttributeInfo

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.