コード例 #1
0
  /**
   * String form. Generated from:
   * org.dmd.dms.meta.MetaComplexTypeFormatter.dumpComplexType(MetaComplexTypeFormatter.java:257)
   */
  public String toString() {
    StringBuffer sb = new StringBuffer();
    sb.append(type.toString());
    sb.append(' ');
    sb.append(name.toString());
    sb.append(' ');
    sb.append("\"" + description.toString() + "\"");
    if (quoted != null) {
      sb.append(' ');
      sb.append("quoted=" + quoted.toString());
    }

    if (multivalued != null) {
      sb.append(' ');
      sb.append("multivalued=" + multivalued.toString());
    }

    if (weakref != null) {
      sb.append(' ');
      sb.append("weakref=" + weakref.toString());
    }

    if (greedy != null) {
      sb.append(' ');
      sb.append("greedy=" + greedy.toString());
    }

    return (sb.toString());
  }
コード例 #2
0
  @SuppressWarnings({"unchecked", "rawtypes"})
  public void resolve(DmcNameResolverIF resolver, String attrName) throws DmcValueException {
    DmcNamedObjectIF obj = null;

    if ((type != null) && (!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);
    }
  }
コード例 #3
0
  @SuppressWarnings({"unchecked", "rawtypes"})
  public void resolve(
      DmcNameResolverWithClashSupportIF resolver,
      DmcObject object,
      DmcNameClashResolverIF ncr,
      DmcAttributeInfo ai)
      throws DmcValueException, DmcValueExceptionSet {
    DmcNamedObjectIF obj = null;

    if ((type != null) && (!type.isResolved())) {
      obj = resolver.findNamedObjectMayClash(object, type.getObjectName(), ncr, typeAI);
      if (obj == null)
        throw (new DmcValueException(
            "Could not resolve reference to: "
                + type.getObjectName()
                + " via attribute: "
                + ai.name));

      if (obj instanceof DmcContainerIF)
        ((DmcNamedObjectREF) type)
            .setObject((DmcNamedObjectIF) ((DmcContainerIF) obj).getDmcObject());
      else ((DmcNamedObjectREF) type).setObject(obj);
    }
  }