Check the attribute names
@param attributeNames Atttribute names to check
@return Null if all attribute names are invalid, non-empty if the check
failed, with an appropriate error message
509043
public static String validateAttributeNames(
      Enumeration<String> attributeNames) {
    while (attributeNames.hasMoreElements()) {
      String attribute = attributeNames.nextElement();
      if (!attribute.equals("users") && !attribute.equals("poolGroups") &&
          !attribute.equals("poolInfos") && !attribute.equals("toKillSessionId")
          && !attribute.equals("killSessionsToken")) {
        return 
          "Illegal parameter " + attribute + ", only 'users, " +
          "poolGroups, 'poolInfos', 'toKillSessionId' and 'killSessionsToken'" +
          "parameters allowed.";
      }
    }
    return null;
  }
872496
public void setAttributes( final String... attributes )
    {
        this.attributes = attributes == null ? null : new HashSet<String>( Arrays.asList( attributes ) );
    }
252819
public Enumeration<String> getAttributeNames() {
		Vector<String> names = new Vector<String>(this.getAttributeMap().keySet());
		return names.elements();
	}
1044560
public boolean hasLong(String attributeName) {
        String attr = attributes.get(attributeName);
        if (attr == null || attr.isEmpty()) {
            return false;
        }
        try {
            Long.parseLong(attr);
            return true;
        } catch (NumberFormatException ex) {
            return false;
        }
    }
732757
private void extractAttributes(final String attributes)
	{
		String s = attributes.trim();
		if (s.length() > 0 && s.charAt(s.length() - 1) == '/')
			emptyTag = true;

		while (s.length() != 0) {
			final int equal = s.indexOf('=');
			if (equal == -1 || equal == s.length() - 1)
				break;
			// cut off attribute name
			final String att = s.substring(0, equal).trim();
			s = s.substring(equal + 1).trim();
			if (s.length() == 0)
				break;
			final boolean quote = s.charAt(0) == '\'' || s.charAt(0) == '\"';
			if (att.length() > 0 && quote) {
				String value = s.substring(1);
				final int end = value.indexOf(s.charAt(0));
				if (end >= 0)
					value = value.substring(0, end);
				attributeName.add(att);
				attributeValue.add(References.replace(value, false));
			}
			final int i = s.indexOf(quote ? s.charAt(0) : ' ', 1);
			s = i == -1 ? "" : s.substring(i + 1);
		}
	}
512697
public List<String> getAttributesNames() {
        SimpleFeatureType featureType = feature.getFeatureType();
        List<AttributeDescriptor> attributeDescriptors = featureType.getAttributeDescriptors();

        List<String> attributeNames = new ArrayList<String>();
        for( AttributeDescriptor attributeDescriptor : attributeDescriptors ) {
            String name = attributeDescriptor.getLocalName();
            attributeNames.add(name);
        }
        return attributeNames;
    }
613290
protected void checkAttribute(String attribute) {
        if (!hasAttribute(attribute)) {
            String sb = "Attribute: '" + attribute + "' is not defined in model: '" + getModelClass() + ". "
                    + "Available attributes: " +getAttributeNames();
            throw new IllegalArgumentException(sb);
        }
    }
716271
public void setAutoVerifiedAttributes(java.util.Collection<String> autoVerifiedAttributes) {
        if (autoVerifiedAttributes == null) {
            this.autoVerifiedAttributes = null;
            return;
        }

        this.autoVerifiedAttributes = new java.util.ArrayList<String>(autoVerifiedAttributes);
    }
350938
public boolean isNullOrEmpty(String attributeName) {
        String attr = attributes.get(attributeName);
        if (attr == null || attr.isEmpty()) {
            return true;
        }
        return false;
    }
1337566
public static final void checkTxAttrs(TransactionAttribute[] txAttrs,
                                          String[] methodNames, String[] methodSignatures,//PQ63130
                                          String[] checkedNames, String[] checkedSignatures,//PQ63130

                                          TransactionAttribute prescribedAttr)
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "checkTxAttrs");
        for (int i = 0; i < methodNames.length; ++i) {
            for (int j = 0; j < checkedNames.length; ++j) {

                //PQ63130 added check of method signature
                if (((methodNames[i].equals(checkedNames[j])) && (methodSignatures[i].equals(checkedSignatures[j]))) | checkedNames[j].equals("*")) {

                    txAttrs[i] = prescribedAttr;
                    break;
                }
            }
        }

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "checkTxAttrs");

    }
718062
public void validateAttributes(Collection<String> attributes) throws CompatibilityException {
                Validate.notNull(attributes);
                for (String attribute : attributes) {
                        validateAttribute(attribute);
                }
        }
1255691
private void checkAndAddDefaults(QName name, XMLAttributes atts) {
    List<RelaxNGDefaultValues.Attribute> def = defaults.getDefaultAttributes(
        name.localpart, name.uri);
    if (def != null) {
      for (RelaxNGDefaultValues.Attribute a : def) {
        //EXM-24143 it is possible that the namespace of the default attribute is empty
        //and the namespace of the attribute declared in the XMLAttributes is NULL.
        boolean alreadyDeclared = false;
        alreadyDeclared = atts.getIndex(a.namespace, a.localName) >= 0;
        if(! alreadyDeclared) {
          if("".equals(a.namespace)) {
            //Extra check with NULL Namespace
            alreadyDeclared = atts.getIndex(null, a.localName) >= 0;    
          }
        }
        
        if (! alreadyDeclared) {
          String prefix = null;
          String rawname = a.localName;
          if (a.namespace != null && a.namespace.length() > 0) {
            prefix = context.getPrefix(a.namespace);
            if (prefix == null) {
              for (int i = 0; i < atts.getLength(); i++) {
                String attname = atts.getQName(i);
                if (attname.startsWith("xmlns:")) {
                  if (a.namespace.equals(atts.getValue(i))) {
                    prefix = attname.substring(6);
                  }
                }
              }
            }

            if (prefix != null && prefix.length() > 0) {
              rawname = prefix + ":" + a.localName;
              // double check in case of no namespace aware parsers.
              // if we want to fully handle this case we may need further
              // processing.
              if (atts.getIndex(rawname) < 0) {
                QName attName = new QName(fSymbolTable.addSymbol(prefix),
                    fSymbolTable.addSymbol(a.localName), fSymbolTable.addSymbol(rawname),
                    fSymbolTable.addSymbol(a.namespace));
                atts.addAttribute(attName, "CDATA", a.value);
                int attrIndex = atts.getIndex(attName.uri, attName.localpart);
                atts.setSpecified(attrIndex, false);
              }
            } else {
              int k = 1;
              if(
                  //EXM-24494 Prefer this prefix
                  //See the implementation in: org.dita.dost.reader.MergeTopicParser.startElement(String, String, String, Attributes)
                  //If the file is a composite no attributes are copied from the root element.
                  "http://dita.oasis-open.org/architecture/2005/".equals(a.namespace)) {
                prefix = "ditaarch";
              } else {
              	prefix = "ns" + k;
              }
              while (context.getURI(prefix) != null
                  || atts.getValue("xmlns:" + prefix) != null) {
                k++;
                prefix = "ns" + k;
              }
              rawname = prefix + ":" + a.localName;

              QName attNs = new QName(fSymbolTable.addSymbol("xmlns"),
                  fSymbolTable.addSymbol(prefix), fSymbolTable.addSymbol("xmlns:" + prefix),
                  fSymbolTable.addSymbol("http://www.w3.org/2000/xmlns/"));
              atts.addAttribute(attNs, "CDATA", a.namespace);
              context.declarePrefix(prefix, a.namespace);

              QName attName = new QName(fSymbolTable.addSymbol(prefix),
                  fSymbolTable.addSymbol(a.localName), fSymbolTable.addSymbol(rawname),
                  fSymbolTable.addSymbol(a.namespace));
              atts.addAttribute(attName, "CDATA", a.value);
              int attrIndex = atts.getIndex(attName.uri, attName.localpart);
              atts.setSpecified(attrIndex, false);
            }
          } else {
            String attname = fSymbolTable.addSymbol(a.localName);
            QName attName = new QName(null, attname, attname, null);
            atts.addAttribute(attName, "CDATA", a.value);
            int attrIndex = atts.getIndex(attname);
            atts.setSpecified(attrIndex, false);
          }
        }
      }
    }
  }
106143
@Override
    public Attribute getAttributeByName(QName name)
    {
        if (mAttrs == null) {
            return null;
        }
        int ix = mAttrs.findIndex(name);
        if (ix < 0) {
            return null;
        }
        return constructAttr(mRawAttrs, ix, mAttrs.isDefault(ix));
    }
120317
public String getAttribute(String attributeName) {
		if (attributeName != null){
			return this.attributes.get(attributeName);
		}
		
		return null;
	}
224380
def validate_attr_name(name):
    

    try:
        validate_sqlite_attr_name(name)
    except (InvalidCharError, InvalidReservedNameError) as e:
        raise NameValidationError(e)
    except NullNameError:
        raise NameValidationError("attribute name is empty")
435858
protected Set<String> getAttributeNames() {
        if(columnMetadata == null || columnMetadata.isEmpty()) throw new InitException("Failed to find table: " + getTableName());
        return Collections.unmodifiableSet(columnMetadata.keySet());
    }
161750
public final Set<BodyQName> getAttributeNames() {
        Map<BodyQName, String> attrs = getAttributes();
        return Collections.unmodifiableSet(attrs.keySet());
    }