@Override public String[] getNamespaces() { Set<String> namespaceSet = new HashSet<String>(); Set<Entry<String, TagAttribute>> entrySet = tagAttributeMap.entrySet(); for (Entry<String, TagAttribute> mapEntry : entrySet) { TagAttribute tagAttribute = mapEntry.getValue(); namespaceSet.add(tagAttribute.getNamespace()); } return namespaceSet.toArray(new String[namespaceSet.size()]); }
@Override public String[] getNamespaces() { Set<String> namespaceSet = new HashSet<String>(); Set<Entry<String, TagAttribute>> entrySet = tagAttributeMap.entrySet(); for (Entry<String, TagAttribute> mapEntry : entrySet) { TagAttribute tagAttribute = mapEntry.getValue(); namespaceSet.add(tagAttribute.getNamespace()); } return namespaceSet.toArray(new String[namespaceSet.size()]); } }
@Override public String[] getNamespaces() { Set<String> namespaceSet = new HashSet<String>(); Set<Entry<String, TagAttribute>> entrySet = tagAttributeMap.entrySet(); for (Entry<String, TagAttribute> mapEntry : entrySet) { TagAttribute tagAttribute = mapEntry.getValue(); namespaceSet.add(tagAttribute.getNamespace()); } return namespaceSet.toArray(new String[namespaceSet.size()]); } }
@Override public String[] getNamespaces() { Map<String, String> m = new HashMap<String, String>(); for (TagAttribute a:attrs) { String namespace = a.getNamespace(); if (!m.containsKey(namespace)) { m.put(namespace, namespace); } } String[] namespaces = new String[m.size()]; m.values().toArray(namespaces); return namespaces; }
@Override public String[] getNamespaces() { Map<String, String> m = new HashMap<String, String>(); for (TagAttribute a:attrs) { String namespace = a.getNamespace(); if (!m.containsKey(namespace)) { m.put(namespace, namespace); } } String[] namespaces = new String[m.size()]; m.values().toArray(namespaces); return namespaces; }
@Override public String[] getNamespaces() { Map<String, String> m = new HashMap<String, String>(); for (TagAttribute a:attrs) { String namespace = a.getNamespace(); if (!m.containsKey(namespace)) { m.put(namespace, namespace); } } String[] namespaces = new String[m.size()]; m.values().toArray(namespaces); return namespaces; }
@Override public TagAttribute[] getAll(String namespace) { List<TagAttribute> tagAttributeList = new ArrayList<TagAttribute>(); Set<Entry<String, TagAttribute>> entrySet = tagAttributeMap.entrySet(); for (Entry<String, TagAttribute> mapEntry : entrySet) { TagAttribute tagAttribute = mapEntry.getValue(); String tagAttributeNamespace = tagAttribute.getNamespace(); if (((namespace == null) && (tagAttributeNamespace == null)) || ((namespace != null) && namespace.equals(tagAttributeNamespace))) { tagAttributeList.add(tagAttribute); } } return tagAttributeList.toArray(new TagAttribute[tagAttributeList.size()]); }
@Override public TagAttribute[] getAll(String namespace) { List<TagAttribute> tagAttributeList = new ArrayList<TagAttribute>(); Set<Entry<String, TagAttribute>> entrySet = tagAttributeMap.entrySet(); for (Entry<String, TagAttribute> mapEntry : entrySet) { TagAttribute tagAttribute = mapEntry.getValue(); String tagAttributeNamespace = tagAttribute.getNamespace(); if (((namespace == null) && (tagAttributeNamespace == null)) || ((namespace != null) && namespace.equals(tagAttributeNamespace))) { tagAttributeList.add(tagAttribute); } } return tagAttributeList.toArray(new TagAttribute[tagAttributeList.size()]); }
@Override public TagAttribute[] getAll(String namespace) { List<TagAttribute> tagAttributeList = new ArrayList<TagAttribute>(); Set<Entry<String, TagAttribute>> entrySet = tagAttributeMap.entrySet(); for (Entry<String, TagAttribute> mapEntry : entrySet) { TagAttribute tagAttribute = mapEntry.getValue(); String tagAttributeNamespace = tagAttribute.getNamespace(); if (((namespace == null) && (tagAttributeNamespace == null)) || ((namespace != null) && namespace.equals(tagAttributeNamespace))) { tagAttributeList.add(tagAttribute); } } return tagAttributeList.toArray(new TagAttribute[tagAttributeList.size()]); }
/** * This method is used exclusively to get the pass through attributes! * Namespaces http://xmlns.jcp.org/jsf/passthrough and http://xmlns.jcp.org/jsf/passthrough * Get all TagAttributesImpl for the passed namespace * * @param namespace * namespace to search * @return a non-null array of TagAttributesImpl */ @Override public TagAttribute[] getAll(String namespace) { if (namespace==null) namespace=""; List<TagAttribute> list = new ArrayList<TagAttribute>(); for (TagAttribute a:attrs) { if (namespace.equals(a.getNamespace())) { list.add(a); } } TagAttribute[] result = new TagAttribute[list.size()]; list.toArray(result); return result; }
/** * This method is used exclusively to get the pass through attributes! * Namespaces http://xmlns.jcp.org/jsf/passthrough and http://xmlns.jcp.org/jsf/passthrough * Get all TagAttributesImpl for the passed namespace * * @param namespace * namespace to search * @return a non-null array of TagAttributesImpl */ @Override public TagAttribute[] getAll(String namespace) { if (namespace==null) namespace=""; List<TagAttribute> list = new ArrayList<TagAttribute>(); for (TagAttribute a:attrs) { if (namespace.equals(a.getNamespace())) { list.add(a); } } TagAttribute[] result = new TagAttribute[list.size()]; list.toArray(result); return result; }
/** * This method is used exclusively to get the pass through attributes! * Namespaces http://xmlns.jcp.org/jsf/passthrough and http://xmlns.jcp.org/jsf/passthrough * Get all TagAttributesImpl for the passed namespace * * @param namespace * namespace to search * @return a non-null array of TagAttributesImpl */ @Override public TagAttribute[] getAll(String namespace) { if (namespace==null) namespace=""; List<TagAttribute> list = new ArrayList<TagAttribute>(); for (TagAttribute a:attrs) { if (namespace.equals(a.getNamespace())) { list.add(a); } } TagAttribute[] result = new TagAttribute[list.size()]; list.toArray(result); return result; }
/** * Find a TagAttribute that matches the passed namespace and local name. * * @param ns * namespace of the desired attribute * @param localName * local name of the attribute * @return a TagAttribute found, otherwise null */ @Override public TagAttribute get(String ns, String localName) { if (ns != null && localName != null) for (TagAttribute a:attrs) if (localName.equals(a.getLocalName())) if (ns.equals(a.getNamespace())) return a; return null; }
/** * Find a TagAttribute that matches the passed namespace and local name. * * @param ns * namespace of the desired attribute * @param localName * local name of the attribute * @return a TagAttribute found, otherwise null */ @Override public TagAttribute get(String ns, String localName) { if (ns != null && localName != null) for (TagAttribute a:attrs) if (localName.equals(a.getLocalName())) if (ns.equals(a.getNamespace())) return a; return null; }
/** * Find a TagAttribute that matches the passed namespace and local name. * * @param ns * namespace of the desired attribute * @param localName * local name of the attribute * @return a TagAttribute found, otherwise null */ @Override public TagAttribute get(String ns, String localName) { if (ns != null && localName != null) for (TagAttribute a:attrs) if (localName.equals(a.getLocalName())) if (ns.equals(a.getNamespace())) return a; return null; }
private void replaceAttr(List<TagAttribute> attrs, TagAttribute attr, String value, String search, String replace) { if (search.equals(attr.getQName())) { attrs.set(attrs.indexOf(attr), new TagAttributeImpl( attr.getLocation(), attr.getNamespace(), replace, replace, value)); } } }
private void replaceAttr(List<TagAttribute> attrs, TagAttribute attr, String value, String search, String replace) { if (search.equals(attr.getQName())) { attrs.set(attrs.indexOf(attr), new TagAttributeImpl( attr.getLocation(), attr.getNamespace(), replace, replace, value)); } } }
public TagAttributesAlloyImpl(TagAttributes tagAttributes) { TagAttribute[] tagAttributesArray = tagAttributes.getAll(); for (TagAttribute tagAttribute : tagAttributesArray) { String localName = tagAttribute.getLocalName(); if (!Renderer.PASSTHROUGH_RENDERER_LOCALNAME_KEY.equals(localName)) { String namespace = tagAttribute.getNamespace(); String mapKey = getMapKey(namespace, localName); this.tagAttributeMap.put(mapKey, tagAttribute); } } }
public TagAttributesAlloyImpl(TagAttributes tagAttributes) { TagAttribute[] tagAttributesArray = tagAttributes.getAll(); for (TagAttribute tagAttribute : tagAttributesArray) { String localName = tagAttribute.getLocalName(); if (!ELEMENT_NAME.equals(localName)) { String namespace = tagAttribute.getNamespace(); String mapKey = getMapKey(namespace, localName); this.tagAttributeMap.put(mapKey, tagAttribute); } } }
public TagAttributesAlloyImpl(TagAttributes tagAttributes) { TagAttribute[] tagAttributesArray = tagAttributes.getAll(); for (TagAttribute tagAttribute : tagAttributesArray) { String localName = tagAttribute.getLocalName(); if (!Renderer.PASSTHROUGH_RENDERER_LOCALNAME_KEY.equals(localName)) { String namespace = tagAttribute.getNamespace(); String mapKey = getMapKey(namespace, localName); this.tagAttributeMap.put(mapKey, tagAttribute); } } }