Package org.apache.derby.impl.tools.ij

Examples of org.apache.derby.impl.tools.ij.AttributeHolder


    }
  }
  public void check(){
    Enumeration e = attributes.elements();
    while (e.hasMoreElements()) {
      AttributeHolder anAttribute = (AttributeHolder)e.nextElement();
      //The check for duplicate must be done at the URLCheck level
      //and not by each specific attribute.  Only URLCheck knowns about
      //all of the attributes and names.
      checkForDuplicate(anAttribute);
      //Have each attribute check as much about themself as possible.
      anAttribute.check( validProps);
    }
  }
View Full Code Here


    }
  }
  public void checkForDuplicate(AttributeHolder anAttribute){
    Enumeration e = attributes.elements();
    while (e.hasMoreElements()) {
      AttributeHolder aHolder = (AttributeHolder)e.nextElement();
      //If a duplicate is found, make sure that the message is only shown
      //once for each attribute.
      if (anAttribute != aHolder && anAttribute.getName().equals(aHolder.getName())) {
        anAttribute.addError(langUtil.getTextMessage("TL_dupAtt"));
      }
    }

  }
View Full Code Here

   
    //Parse the url into attributes and put them in a Properties object.
    StringTokenizer st = new StringTokenizer(url.substring(protocol.length()), ";:\"");
    attributes = new Vector();
    while (st.hasMoreTokens()) {
      AttributeHolder anAttribute = new AttributeHolder();
      String anAtt = "";
      String aValue = "";
    String aToken = st.nextToken();
      //The "=" is the seperator between key and value.
    int eqPos = aToken.indexOf('=');
    if (eqPos == -1) {
      //If there is no "=" this is not an attribute
      continue;
      }
      else {
        anAtt = (aToken.substring(0, eqPos)).trim();
        aValue = (aToken.substring(eqPos + 1)).trim();

      }
      anAttribute.setName(anAtt);
      anAttribute.setValue(aValue);
      anAttribute.setToken(aToken);
      attributes.addElement(anAttribute);
      props.put(anAtt, aToken);
  }
    return props;
  }
View Full Code Here

   
    //Parse the url into attributes and put them in a Properties object.
    StringTokenizer st = new StringTokenizer(url.substring(protocol.length()), ";:\"");
    attributes = new Vector();
    while (st.hasMoreTokens()) {
      AttributeHolder anAttribute = new AttributeHolder();
      String anAtt = "";
      String aValue = "";
    String aToken = st.nextToken();
      //The "=" is the seperator between key and value.
    int eqPos = aToken.indexOf('=');
    if (eqPos == -1) {
      //If there is no "=" this is not an attribute
      continue;
      }
      else {
        anAtt = (aToken.substring(0, eqPos)).trim();
        aValue = (aToken.substring(eqPos + 1)).trim();

      }
      anAttribute.setName(anAtt);
      anAttribute.setValue(aValue);
      anAttribute.setToken(aToken);
      attributes.addElement(anAttribute);
      props.put(anAtt, aToken);
  }
    return props;
  }
View Full Code Here

    }
  }
  public void check(){
    Enumeration e = attributes.elements();
    while (e.hasMoreElements()) {
      AttributeHolder anAttribute = (AttributeHolder)e.nextElement();
      //The check for duplicate must be done at the URLCheck level
      //and not by each specific attribute.  Only URLCheck knowns about
      //all of the attributes and names.
      checkForDuplicate(anAttribute);
      //Have each attribute check as much about themself as possible.
      anAttribute.check( validProps);
    }
  }
View Full Code Here

    }
  }
  public void checkForDuplicate(AttributeHolder anAttribute){
    Enumeration e = attributes.elements();
    while (e.hasMoreElements()) {
      AttributeHolder aHolder = (AttributeHolder)e.nextElement();
      //If a duplicate is found, make sure that the message is only shown
      //once for each attribute.
      if (anAttribute != aHolder && anAttribute.getName().equals(aHolder.getName())) {
        anAttribute.addError(langUtil.getTextMessage("TL_dupAtt"));
      }
    }

  }
View Full Code Here

   
    //Parse the url into attributes and put them in a Properties object.
    StringTokenizer st = new StringTokenizer(url.substring(protocol.length()), ";:\"");
    attributes = new Vector();
    while (st.hasMoreTokens()) {
      AttributeHolder anAttribute = new AttributeHolder();
      String anAtt = "";
      String aValue = "";
    String aToken = st.nextToken();
      //The "=" is the seperator between key and value.
    int eqPos = aToken.indexOf('=');
    if (eqPos == -1) {
      //If there is no "=" this is not an attribute
      continue;
      }
      else {
        anAtt = (aToken.substring(0, eqPos)).trim();
        aValue = (aToken.substring(eqPos + 1)).trim();

      }
      anAttribute.setName(anAtt);
      anAttribute.setValue(aValue);
      anAttribute.setToken(aToken);
      attributes.addElement(anAttribute);
      props.put(anAtt, aToken);
  }
    return props;
  }
View Full Code Here

TOP

Related Classes of org.apache.derby.impl.tools.ij.AttributeHolder

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.