Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSMutableDictionary.keyEnumerator()


  private NSMutableDictionary parseDeclarationsWithoutComments(String declarationWithoutComment) throws WOHelperFunctionDeclarationFormatException {
    NSMutableDictionary declarations = new NSMutableDictionary();
    NSMutableDictionary rawDeclarations = _rawDeclarationsWithoutComment(declarationWithoutComment);
    String tagName;
    WODeclaration declaration;
    Enumeration rawDeclarationHeaderEnum = rawDeclarations.keyEnumerator();
    while (rawDeclarationHeaderEnum.hasMoreElements()) {
      String declarationHeader = (String) rawDeclarationHeaderEnum.nextElement();
      String declarationBody = (String) rawDeclarations.objectForKey(declarationHeader);
      int colonIndex = declarationHeader.indexOf(':');
      if (colonIndex < 0) {
View Full Code Here


    // that are SharedEntity EOs to a dictionary with keys (encodedSharedEO or encodedEO,
    // entityName, pk)
    protected NSMutableDictionary encodeDictionaryWithEOs(NSDictionary dictionary) {
      NSMutableDictionary theMutableDictionary = (NSMutableDictionary) ((dictionary instanceof NSMutableDictionary) ? dictionary : dictionary.mutableClone());

      for (Enumeration anEnum = theMutableDictionary.keyEnumerator(); anEnum.hasMoreElements();) {
        String key = (String) anEnum.nextElement();
        Object value = theMutableDictionary.objectForKey(key);

        if (value instanceof EOEnterpriseObject && !ERXEOControlUtilities.isNewObject((EOEnterpriseObject)value)) {
                    EOEnterpriseObject eo = (EOEnterpriseObject)value;
View Full Code Here

                // If we can't decode the EO, then just return the dictionary.
                return  (eo != null) ? eo : dictionary;
      }

      for (Enumeration anEnum = theMutableDictionary.keyEnumerator(); anEnum.hasMoreElements();) {
        String key = (String) anEnum.nextElement();
        Object value = theMutableDictionary.objectForKey(key);

        if (value instanceof NSDictionary) {
          theMutableDictionary.setObjectForKey(decodeDictionaryWithEOs((NSDictionary) value), key);
View Full Code Here

    aLog.append(new StringBuilder().append(indentString).append("<EOAttribute ").append(name()).append('\n').toString());
    String aKey = "";
    try {
      NSMutableDictionary aDictionary = new NSMutableDictionary();
      encodeIntoPropertyList(aDictionary);
      for (Enumeration enumerator = aDictionary.keyEnumerator(); enumerator.hasMoreElements(); aLog.append(new StringBuilder().append(indentString).append('\t').append(aKey).append(" : '").append(aDictionary.objectForKey(aKey)).append("'\n").toString()))
        aKey = (String) enumerator.nextElement();

    }
    catch (Exception exception) {
      aLog.append(new StringBuilder().append(indentString).append('\t').append(getClass().getName()).append(".toString: characteristics ").append(aKey).append(" exception ").append(exception).append('\n').toString());
View Full Code Here

            if ( (unknownApps.count() ==0) ) {
                // we endReading in the finally block
                return sb;
            }

            for (Enumeration e = unknownApps.keyEnumerator(); e.hasMoreElements(); ) {
                String appName = (String) e.nextElement();
                NSMutableDictionary appDict = (NSMutableDictionary) unknownApps.valueForKey(appName);

                sb.append("  <application name=\"");
                sb.append(appName);
View Full Code Here

                sb.append("  <application name=\"");
                sb.append(appName);
                sb.append("\">\n");

                for (Enumeration e2 = appDict.keyEnumerator(); e2.hasMoreElements(); ) {
                    String port = (String) e2.nextElement();
                    sb.append("    <instance");

                    sb.append(" id=\"-");
                    sb.append(port);
View Full Code Here

    public static void setDefaultEncodingForAllLanguages(String newDefaultEncoding) {
        // This statement may throw an IllegalArgumentException when newDefaultEncoding isn't supported. 
        setDefaultEncoding(newDefaultEncoding);

        NSMutableDictionary d = new NSMutableDictionary(_languagesAndDefaultEncodings());
        Enumeration e = d.keyEnumerator();
        while (e.hasMoreElements()) {
            String key = (String)e.nextElement();
            d.setObjectForKey(newDefaultEncoding, key);
        }
        _setLanguagesAndDefaultEncodings(d);
View Full Code Here

    bindings.setObjectForKey(association, key);
  }

  protected void processDeclaration(WODeclaration declaration) {
    NSMutableDictionary associations = (NSMutableDictionary) declaration.associations();
    Enumeration bindingNameEnum = associations.keyEnumerator();
    while (bindingNameEnum.hasMoreElements()) {
      String bindingName = (String) bindingNameEnum.nextElement();
      WOAssociation association = (WOAssociation) associations.valueForKey(bindingName);
      WOAssociation helperAssociation = parserHelperAssociation(association);
      if (helperAssociation != association) {
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.