Revision: 528
Author:
joe.b...@gmail.com
Date: Mon May 18 14:25:43 2015 UTC
Log: (Issue 162) AxiomModel.attributeIdentity method has additional
boolean arg to indicate whether or not attribute in question is newly
created and therefore, does not need its AttributeIdentity looked up.
https://code.google.com/p/genxdm/source/detail?r=528
Modified:
/trunk/project/bridge.axiom/src/main/java/org/genxdm/bridge/axiom/AxiomFragmentBuilder.java
/trunk/project/bridge.axiom/src/main/java/org/genxdm/bridge/axiom/AxiomModel.java
=======================================
---
/trunk/project/bridge.axiom/src/main/java/org/genxdm/bridge/axiom/AxiomFragmentBuilder.java
Thu Apr 3 22:02:58 2014 UTC
+++
/trunk/project/bridge.axiom/src/main/java/org/genxdm/bridge/axiom/AxiomFragmentBuilder.java
Mon May 18 14:25:43 2015 UTC
@@ -76,7 +76,7 @@
}
element.addAttribute(attribute);
- nodeId = AxiomModel.attributeIdentity(attribute);
+ nodeId = AxiomModel.attributeIdentity(attribute, true);
}
else
{
=======================================
---
/trunk/project/bridge.axiom/src/main/java/org/genxdm/bridge/axiom/AxiomModel.java
Wed Jan 23 17:56:53 2013 UTC
+++
/trunk/project/bridge.axiom/src/main/java/org/genxdm/bridge/axiom/AxiomModel.java
Mon May 18 14:25:43 2015 UTC
@@ -1259,7 +1259,7 @@
if (node instanceof OMAttribute)
{
final OMAttribute attr = (OMAttribute)node;
- return attributeIdentity(attr);
+ return attributeIdentity(attr, false);
}
if (node instanceof OMNamespace)
return new NamespaceIdentity((OMNamespace)node);
@@ -1417,9 +1417,9 @@
}
// done as static so that the fragmentbuilder can use the only map
that we want to have around.
- static AttributeIdentity attributeIdentity(OMAttribute attr)
+ static AttributeIdentity attributeIdentity(OMAttribute attr, boolean
isNew)
{
- AttributeIdentity id = attributes.get(attr);
+ AttributeIdentity id = isNew ? null : attributes.get(attr);
if (id == null)
{
id = new AttributeIdentity(attr);