diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-10-01 21:09:06 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-10-01 21:09:06 +0200 |
| commit | 9c5d6e82b5ce733cf23e4317e3bafaa42c2221ba (patch) | |
| tree | 64657888b5ff52cd8759c6feb15c6087b96d37c6 | |
| parent | 8afca6b565edfa0e32aa8e12f30bfff5598abdd4 (diff) | |
Collection version support, stored as a new final component of the
Collection path. Null version implies "last".
13 files changed, 111 insertions, 65 deletions
diff --git a/src/main/java/com/c2kernel/collection/AggregationDescription.java b/src/main/java/com/c2kernel/collection/AggregationDescription.java index 132a357..10ea5f7 100644 --- a/src/main/java/com/c2kernel/collection/AggregationDescription.java +++ b/src/main/java/com/c2kernel/collection/AggregationDescription.java @@ -24,7 +24,6 @@ public class AggregationDescription extends Aggregation implements CollectionDes setName(name);
}
-
@Override
public Aggregation newInstance() throws ObjectNotFoundException
{
@@ -33,8 +32,9 @@ public class AggregationDescription extends Aggregation implements CollectionDes for (int i=0; i<size(); i++)
{
AggregationMember mem = mMembers.list.get(i);
- //get the propdesc of the member item
- PropertyDescriptionList pdList = PropertyUtility.getPropertyDescriptionOutcome(mem.getItemPath());
+ //get the propdesc of the member item and look for an explicit version
+ String descVer = getDescVer(mem);
+ PropertyDescriptionList pdList = PropertyUtility.getPropertyDescriptionOutcome(mem.getItemPath(), descVer);
if (pdList!=null)
{
//create the new props of the member object
diff --git a/src/main/java/com/c2kernel/collection/Collection.java b/src/main/java/com/c2kernel/collection/Collection.java index 13642c3..270d021 100644 --- a/src/main/java/com/c2kernel/collection/Collection.java +++ b/src/main/java/com/c2kernel/collection/Collection.java @@ -25,8 +25,7 @@ abstract public class Collection<E extends CollectionMember> implements C2KLocal public int getCounter()
{
if (mCounter == -1)
- for (Object name : mMembers.list) {
- CollectionMember element = (CollectionMember)name;
+ for (E element : mMembers.list) {
if (mCounter < element.getID())
mCounter = element.getID();
}
@@ -89,19 +88,23 @@ abstract public class Collection<E extends CollectionMember> implements C2KLocal }
public boolean contains(ItemPath itemPath) {
- for (Object name : mMembers.list) {
- CollectionMember element = (CollectionMember)name;
+ for (E element : mMembers.list) {
if (element.getItemPath().equals(itemPath))
return true;
}
return false;
}
+
+ public String getDescVer(E mem) {
+ String descVer = "last";
+ Object descVerObj = mem.getProperties().get("Version");
+ if (descVerObj != null) descVer = descVerObj.toString();
+ return descVer;
+ }
public boolean isFull()
{
- for (int i=0; i<size(); i++)
- {
- CollectionMember element = mMembers.list.get(i);
+ for (E element : mMembers.list) {
if (element.getItemPath() == null)
return false;
}
@@ -135,7 +138,7 @@ abstract public class Collection<E extends CollectionMember> implements C2KLocal if (!same) return false;
for (Iterator<E> i = getMembers().list.iterator(); i.hasNext();) {
try {
- CollectionMember thisMem = i.next();
+ E thisMem = i.next();
CollectionMember otherMem = otherColl.getMember(thisMem.getID());
if (!thisMem.equals(otherMem)) return false;
} catch (ObjectNotFoundException ex) {
diff --git a/src/main/java/com/c2kernel/collection/DependencyDescription.java b/src/main/java/com/c2kernel/collection/DependencyDescription.java index 3c3b287..6698be3 100644 --- a/src/main/java/com/c2kernel/collection/DependencyDescription.java +++ b/src/main/java/com/c2kernel/collection/DependencyDescription.java @@ -12,7 +12,7 @@ public class DependencyDescription extends Dependency implements CollectionDescr {
setName("DependencyDescription");
}
-
+
public DependencyDescription(String name)
{
setName(name);
@@ -24,7 +24,8 @@ public class DependencyDescription extends Dependency implements CollectionDescr Dependency newDep = new Dependency(depName);
if (mMembers.list.size() == 1) { // constrain the members based on the property description
DependencyMember mem = mMembers.list.get(0);
- PropertyDescriptionList pdList = PropertyUtility.getPropertyDescriptionOutcome(mem.getItemPath());
+ String descVer = getDescVer(mem);
+ PropertyDescriptionList pdList = PropertyUtility.getPropertyDescriptionOutcome(mem.getItemPath(), descVer);
if (pdList!=null) {
newDep.setProperties(PropertyUtility.createProperty(pdList));
newDep.setClassProps(pdList.getClassProps());
diff --git a/src/main/java/com/c2kernel/entity/imports/ImportAggregation.java b/src/main/java/com/c2kernel/entity/imports/ImportAggregation.java index 27eb0ed..8a15045 100644 --- a/src/main/java/com/c2kernel/entity/imports/ImportAggregation.java +++ b/src/main/java/com/c2kernel/entity/imports/ImportAggregation.java @@ -2,6 +2,9 @@ package com.c2kernel.entity.imports; import java.util.ArrayList;
+import com.c2kernel.collection.Aggregation;
+import com.c2kernel.collection.AggregationDescription;
+import com.c2kernel.collection.AggregationInstance;
import com.c2kernel.collection.MembershipException;
import com.c2kernel.common.ObjectNotFoundException;
import com.c2kernel.graph.model.GraphPoint;
@@ -15,6 +18,7 @@ import com.c2kernel.property.PropertyUtility; public class ImportAggregation {
public boolean isDescription;
+ public Integer version;
public ArrayList<ImportAggregationMember> aggregationMemberList = new ArrayList<ImportAggregationMember>();
public String name;
@@ -29,8 +33,8 @@ public class ImportAggregation { }
public com.c2kernel.collection.Aggregation create() throws MembershipException, ObjectNotFoundException {
- com.c2kernel.collection.Aggregation newAgg = isDescription?new com.c2kernel.collection.AggregationDescription(name):new com.c2kernel.collection.AggregationInstance(name);
- newAgg.setName(name);
+ Aggregation newAgg = isDescription?new AggregationDescription(name):new AggregationInstance(name);
+ if (version!= null) newAgg.setVersion(version);
for (ImportAggregationMember thisMem : aggregationMemberList) {
StringBuffer classProps = new StringBuffer();
if (thisMem.itemDescriptionPath != null && thisMem.itemDescriptionPath.length()>0) {
@@ -40,7 +44,9 @@ public class ImportAggregation { } catch (InvalidItemPathException ex) {
itemPath = new DomainPath(thisMem.itemDescriptionPath).getItemPath();
}
- PropertyDescriptionList propList = PropertyUtility.getPropertyDescriptionOutcome(itemPath);
+
+ String descVer = thisMem.itemDescriptionVersion==null?"last":thisMem.itemDescriptionVersion;
+ PropertyDescriptionList propList = PropertyUtility.getPropertyDescriptionOutcome(itemPath, descVer);
for (PropertyDescription pd : propList.list) {
thisMem.props.put(pd.getName(), pd.getDefaultValue());
if (pd.getIsClassIdentifier())
diff --git a/src/main/java/com/c2kernel/entity/imports/ImportAggregationMember.java b/src/main/java/com/c2kernel/entity/imports/ImportAggregationMember.java index 159e02c..3ea5c16 100644 --- a/src/main/java/com/c2kernel/entity/imports/ImportAggregationMember.java +++ b/src/main/java/com/c2kernel/entity/imports/ImportAggregationMember.java @@ -7,6 +7,7 @@ public class ImportAggregationMember { public int slotNo;
public String itemDescriptionPath;
+ public String itemDescriptionVersion = null;
public String itemPath;
public Geometry geometry;
public CastorHashMap props = new CastorHashMap();
@@ -16,9 +17,10 @@ public class ImportAggregationMember { super();
}
- public ImportAggregationMember(int slotNo, String itemDescPath, String itemPath, Geometry geometry) {
+ public ImportAggregationMember(int slotNo, String itemDescPath, String itemDescVersion, String itemPath, Geometry geometry) {
this.slotNo = slotNo;
this.itemDescriptionPath = itemDescPath;
+ this.itemDescriptionVersion = itemDescVersion;
this.itemPath = itemPath;
this.geometry = geometry;
}
diff --git a/src/main/java/com/c2kernel/entity/imports/ImportDependency.java b/src/main/java/com/c2kernel/entity/imports/ImportDependency.java index c235ba4..dc26551 100644 --- a/src/main/java/com/c2kernel/entity/imports/ImportDependency.java +++ b/src/main/java/com/c2kernel/entity/imports/ImportDependency.java @@ -2,6 +2,8 @@ package com.c2kernel.entity.imports; import java.util.ArrayList;
+import com.c2kernel.collection.Dependency;
+import com.c2kernel.collection.DependencyDescription;
import com.c2kernel.collection.MembershipException;
import com.c2kernel.common.ObjectNotFoundException;
import com.c2kernel.lookup.DomainPath;
@@ -16,8 +18,10 @@ import com.c2kernel.utils.KeyValuePair; public class ImportDependency {
public String name;
+ public Integer version;
public boolean isDescription;
public String itemDescriptionPath;
+ public String itemDescriptionVersion = null;
public ArrayList<ImportDependencyMember> dependencyMemberList = new ArrayList<ImportDependencyMember>();
public CastorHashMap props = new CastorHashMap();
@@ -42,9 +46,17 @@ public class ImportDependency { * @return
*/
public com.c2kernel.collection.Dependency create() throws MembershipException, ObjectNotFoundException {
- com.c2kernel.collection.Dependency newDep = isDescription?new com.c2kernel.collection.DependencyDescription(name):new com.c2kernel.collection.Dependency(name);
+ Dependency newDep = isDescription?new DependencyDescription(name):new Dependency(name);
+ if (version!= null) newDep.setVersion(version);
if (itemDescriptionPath != null && itemDescriptionPath.length()>0) {
- PropertyDescriptionList propList = PropertyUtility.getPropertyDescriptionOutcome(new DomainPath(itemDescriptionPath).getItemPath());
+ ItemPath itemPath;
+ try {
+ itemPath = new ItemPath(itemDescriptionPath);
+ } catch (InvalidItemPathException ex) {
+ itemPath = new DomainPath(itemDescriptionPath).getItemPath();
+ }
+ String descVer = itemDescriptionVersion==null?"last":itemDescriptionVersion;
+ PropertyDescriptionList propList = PropertyUtility.getPropertyDescriptionOutcome(itemPath, descVer);
StringBuffer classProps = new StringBuffer();
for (PropertyDescription pd : propList.list) {
props.put(pd.getName(), pd.getDefaultValue());
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/predefined/AddNewSlot.java b/src/main/java/com/c2kernel/lifecycle/instance/predefined/AddNewSlot.java index a482a43..facf7e1 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/predefined/AddNewSlot.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/predefined/AddNewSlot.java @@ -49,8 +49,9 @@ public class AddNewSlot extends PredefinedStep * Creates a new slot in the given aggregation, that holds instances of the given item description
*
* Params:
- * 0 - collection name
- * 1 - Item Description key (optional)
+ * <ol><li>Collection name</li>
+ * <li>Item Description key (optional)</li>
+ * </ol>
*/
@Override
protected String runActivityLogic(AgentPath agent, ItemPath item,
@@ -64,9 +65,10 @@ public class AddNewSlot extends PredefinedStep String[] params = getDataList(requestData);
if (Logger.doLog(3)) Logger.msg(3, "AddNewSlot: called by "+agent+" on "+item+" with parameters "+Arrays.toString(params));
+ // resolve desc item path and version
try {
collName = params[0];
- if (params.length > 1 && params[1].length() > 0) descKey = new ItemPath(params[1]);
+ if (params.length > 1 && params[1].length() > 0) descKey = new ItemPath(params[1]);
} catch (Exception e) {
throw new InvalidDataException("AddNewSlot: Invalid parameters "+Arrays.toString(params), "");
}
@@ -90,7 +92,7 @@ public class AddNewSlot extends PredefinedStep if (descKey != null) {
PropertyDescriptionList propList;
try {
- propList = PropertyUtility.getPropertyDescriptionOutcome(descKey);
+ propList = PropertyUtility.getPropertyDescriptionOutcome(descKey, "last");
} catch (ObjectNotFoundException e) {
throw new InvalidDataException("AddNewSlot: Item "+descKey+" does not contain a PropertyDescription outcome to define a slot", "");
}
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/predefined/agent/CreateAgentFromDescription.java b/src/main/java/com/c2kernel/lifecycle/instance/predefined/agent/CreateAgentFromDescription.java index 780c82e..26856e1 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/predefined/agent/CreateAgentFromDescription.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/predefined/agent/CreateAgentFromDescription.java @@ -39,8 +39,11 @@ public class CreateAgentFromDescription extends CreateItemFromDescription /**
* Params:
- * <ol><li>1: new Agent name</li>
- * <li>2...: Roles to assign to the agent. Must already exist.
+ * <ol><li>New Agent name</li>
+ * <li>Description version to use</li>
+ * <li>Comma-delimited Role names to assign to the agent. Must already exist.</li>
+ * <li>Initial properties to set in the new Agent</li>
+ * </ol>
* @see com.c2kernel.lifecycle.instance.predefined.item.CreateItemFromDescription#runActivityLogic(com.c2kernel.lookup.AgentPath, int, int, java.lang.String)
*/
@Override
@@ -49,19 +52,20 @@ public class CreateAgentFromDescription extends CreateItemFromDescription String[] input = getDataList(requestData);
String newName = input[0];
+ String descVer = input[1];
+ String roles = input[2];
PropertyArrayList initProps =
- input.length > 1?getInitProperties(input[1]):new PropertyArrayList();
+ input.length > 3 ? getInitProperties(input[3]):new PropertyArrayList();
Logger.msg(1, "CreateAgentFromDescription::request() - Starting.");
try {
- if (input.length < 2)
- throw new InvalidDataException("Agent should have at least one Role defined on creation");
// check if given roles exist
- for(int i=1; i<input.length; i++) {
- RolePath thisRole = Gateway.getLookup().getRolePath(input[i]);
- if (!thisRole.exists()) throw new InvalidDataException("Role "+input[i]+" does not exist");
+ String[] roleArr = roles.split(",");
+ for(int i=0; i<roleArr.length; i++) {
+ RolePath thisRole = Gateway.getLookup().getRolePath(roleArr[i]);
+ if (!thisRole.exists()) throw new InvalidDataException("Role "+roleArr[i]+" does not exist");
}
// check if the path is already taken
@@ -90,9 +94,9 @@ public class CreateAgentFromDescription extends CreateItemFromDescription newAgent.initialise(
agent.getSystemKey(),
- Gateway.getMarshaller().marshall(getNewProperties(itemPath, initProps, newName, agent)),
- Gateway.getMarshaller().marshall(getNewWorkflow(itemPath)),
- Gateway.getMarshaller().marshall(getNewCollections(itemPath))
+ Gateway.getMarshaller().marshall(getNewProperties(itemPath, descVer, initProps, newName, agent)),
+ Gateway.getMarshaller().marshall(getNewWorkflow(itemPath, descVer)),
+ Gateway.getMarshaller().marshall(getNewCollections(itemPath, descVer))
);
// add roles if given
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/predefined/item/CreateItemFromDescription.java b/src/main/java/com/c2kernel/lifecycle/instance/predefined/item/CreateItemFromDescription.java index 92b56f2..c8c7aa6 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/predefined/item/CreateItemFromDescription.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/predefined/item/CreateItemFromDescription.java @@ -11,8 +11,6 @@ package com.c2kernel.lifecycle.instance.predefined.item;
-import java.util.ArrayList;
-
import com.c2kernel.collection.Collection;
import com.c2kernel.collection.CollectionArrayList;
import com.c2kernel.collection.CollectionDescription;
@@ -59,8 +57,9 @@ public class CreateItemFromDescription extends PredefinedStep String[] input = getDataList(requestData);
String newName = input[0];
String domPath = input[1];
+ String descVer = input.length > 2 ? input[2]:"last";
PropertyArrayList initProps =
- input.length > 2?getInitProperties(input[2]):new PropertyArrayList();
+ input.length > 3?getInitProperties(input[3]):new PropertyArrayList();
Logger.msg(1, "CreateItemFromDescription - Starting.");
@@ -96,9 +95,9 @@ public class CreateItemFromDescription extends PredefinedStep newItem.initialise(
agent.getSystemKey(),
- Gateway.getMarshaller().marshall(getNewProperties(itemPath, initProps, newName, agent)),
- Gateway.getMarshaller().marshall(getNewWorkflow(itemPath)),
- Gateway.getMarshaller().marshall(getNewCollections(itemPath))
+ Gateway.getMarshaller().marshall(getNewProperties(itemPath, descVer, initProps, newName, agent)),
+ Gateway.getMarshaller().marshall(getNewWorkflow(itemPath, descVer)),
+ Gateway.getMarshaller().marshall(getNewCollections(itemPath, descVer))
);
// add its domain path
@@ -122,9 +121,9 @@ public class CreateItemFromDescription extends PredefinedStep }
}
- protected PropertyArrayList getNewProperties(ItemPath itemPath, PropertyArrayList initProps, String newName, AgentPath agent) throws ObjectNotFoundException, InvalidDataException {
+ protected PropertyArrayList getNewProperties(ItemPath itemPath, String descVer, PropertyArrayList initProps, String newName, AgentPath agent) throws ObjectNotFoundException, InvalidDataException {
// copy properties -- intend to create from propdesc
- PropertyDescriptionList pdList = PropertyUtility.getPropertyDescriptionOutcome(itemPath);
+ PropertyDescriptionList pdList = PropertyUtility.getPropertyDescriptionOutcome(itemPath, descVer);
PropertyArrayList props = pdList.instantiate(initProps);
// set Name prop or create if not present
boolean foundName = false;
@@ -139,25 +138,20 @@ public class CreateItemFromDescription extends PredefinedStep return props;
}
- protected CompositeActivity getNewWorkflow(ItemPath itemPath) throws ClusterStorageException, ObjectNotFoundException, InvalidDataException {
- // loop through collections, collecting instantiated descriptions and finding the default workflow def
- String[] collNames = Gateway.getStorage().getClusterContents(itemPath, ClusterStorage.COLLECTION);
+ protected CompositeActivity getNewWorkflow(ItemPath itemPath, String descVer) throws ClusterStorageException, ObjectNotFoundException, InvalidDataException {
+ // find the workflow def for the given description version
+
String wfDefName = null; Integer wfDefVer = null;
- for (String collName : collNames) {
- if (collName.equalsIgnoreCase("workflow")) {
- Collection<? extends CollectionMember> thisCol = (Collection<? extends CollectionMember>)Gateway.getStorage().get(itemPath, ClusterStorage.COLLECTION+"/"+collName, null);
- ArrayList<? extends CollectionMember> members = thisCol.getMembers().list;
- // get the first member from the wf collection
- CollectionMember wfMember = members.get(0);
- wfDefName = wfMember.resolveItem().getName();
- Object wfVerObj = wfMember.getProperties().get("Version");
- try {
- wfDefVer = Integer.parseInt(wfVerObj.toString());
- } catch (NumberFormatException ex) {
- throw new InvalidDataException("Invalid workflow version number: "+wfVerObj.toString(), "");
- }
- }
- }
+
+ Collection<? extends CollectionMember> thisCol = (Collection<? extends CollectionMember>)Gateway.getStorage().get(itemPath, ClusterStorage.COLLECTION+"/workflow/"+descVer, null);
+ CollectionMember wfMember = thisCol.getMembers().list.get(0);
+ wfDefName = wfMember.resolveItem().getName();
+ Object wfVerObj = wfMember.getProperties().get("Version");
+ try {
+ wfDefVer = Integer.parseInt(wfVerObj.toString());
+ } catch (NumberFormatException ex) {
+ throw new InvalidDataException("Invalid workflow version number: "+wfVerObj.toString(), "");
+ }
// load workflow def
if (wfDefName == null)
@@ -175,14 +169,14 @@ public class CreateItemFromDescription extends PredefinedStep }
}
- protected CollectionArrayList getNewCollections(ItemPath itemPath) throws ClusterStorageException, ObjectNotFoundException {
+ protected CollectionArrayList getNewCollections(ItemPath itemPath, String descVer) throws ClusterStorageException, ObjectNotFoundException {
// loop through collections, collecting instantiated descriptions and finding the default workflow def
CollectionArrayList colls = new CollectionArrayList();
String[] collNames = Gateway.getStorage().getClusterContents(itemPath, ClusterStorage.COLLECTION);
for (String collName : collNames) {
- Collection<? extends CollectionMember> thisCol = (Collection<? extends CollectionMember>)Gateway.getStorage().get(itemPath, ClusterStorage.COLLECTION+"/"+collName, null);
+ Collection<? extends CollectionMember> thisCol = (Collection<? extends CollectionMember>)Gateway.getStorage().get(itemPath, ClusterStorage.COLLECTION+"/"+collName+"/"+descVer, null);
if (thisCol instanceof CollectionDescription) {
- CollectionDescription<? extends CollectionMember> thisDesc = (CollectionDescription<? extends CollectionMember>)thisCol;
+ CollectionDescription<?> thisDesc = (CollectionDescription<?>)thisCol;
colls.put(thisDesc.newInstance());
}
}
diff --git a/src/main/java/com/c2kernel/property/PropertyUtility.java b/src/main/java/com/c2kernel/property/PropertyUtility.java index 1e35c98..602426d 100644 --- a/src/main/java/com/c2kernel/property/PropertyUtility.java +++ b/src/main/java/com/c2kernel/property/PropertyUtility.java @@ -55,11 +55,11 @@ public class PropertyUtility }
- static public PropertyDescriptionList getPropertyDescriptionOutcome(ItemPath itemPath) throws ObjectNotFoundException
+ static public PropertyDescriptionList getPropertyDescriptionOutcome(ItemPath itemPath, String descVer) throws ObjectNotFoundException
{
try
{
- Outcome outc = (Outcome) Gateway.getStorage().get(itemPath, ClusterStorage.VIEWPOINT+"/PropertyDescription/last/data", null);
+ Outcome outc = (Outcome) Gateway.getStorage().get(itemPath, ClusterStorage.VIEWPOINT+"/PropertyDescription/"+descVer+"/data", null);
return (PropertyDescriptionList)Gateway.getMarshaller().unmarshall(outc.getData());
}
catch (Exception ex)
diff --git a/src/main/resources/boot/OD/Item.xsd b/src/main/resources/boot/OD/Item.xsd index 2169161..b3d64e6 100644 --- a/src/main/resources/boot/OD/Item.xsd +++ b/src/main/resources/boot/OD/Item.xsd @@ -39,6 +39,8 @@ use="optional" default="false" />
<xs:attribute name="itemDescriptionPath" type="xs:string"
use="optional" />
+ <xs:attribute name="itemDescriptionVersion" type="xs:string"
+ use="optional" />
</xs:complexType>
</xs:element>
<xs:element name="Aggregation" minOccurs="0" maxOccurs="unbounded">
@@ -69,6 +71,8 @@ <xs:attribute name="slotNo" type="xs:int" use="required" />
<xs:attribute name="itemDescriptionPath" type="xs:string"
use="optional" />
+ <xs:attribute name="itemDescriptionVersion" type="xs:string"
+ use="optional" />
<xs:attribute name="itemPath" type="xs:string"
use="optional" />
</xs:complexType>
diff --git a/src/main/resources/boot/OD/Module.xsd b/src/main/resources/boot/OD/Module.xsd index 9fb93b2..54d89e2 100644 --- a/src/main/resources/boot/OD/Module.xsd +++ b/src/main/resources/boot/OD/Module.xsd @@ -100,10 +100,13 @@ minOccurs="0" />
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required" />
+ <xs:attribute name="version" type="xs:integer" use="optional" />
<xs:attribute name="isDescription" type="xs:boolean"
use="optional" default="false" />
<xs:attribute name="itemDescriptionPath" type="xs:string"
use="optional" />
+ <xs:attribute name="itemDescriptionVersion" type="xs:string"
+ use="optional" />
</xs:complexType>
</xs:element>
<xs:element name="Aggregation" minOccurs="0"
@@ -138,12 +141,15 @@ use="required" />
<xs:attribute name="itemDescriptionPath"
type="xs:string" use="optional" />
+ <xs:attribute name="itemDescriptionVersion"
+ type="xs:string" use="optional" />
<xs:attribute name="itemPath" type="xs:string"
use="optional" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required" />
+ <xs:attribute name="version" type="xs:integer" use="optional" />
<xs:attribute name="isDescription" type="xs:boolean"
use="required" />
</xs:complexType>
diff --git a/src/main/resources/mapFiles/NewEntityMap.xml b/src/main/resources/mapFiles/NewEntityMap.xml index 58de4d1..0c91b64 100644 --- a/src/main/resources/mapFiles/NewEntityMap.xml +++ b/src/main/resources/mapFiles/NewEntityMap.xml @@ -34,6 +34,9 @@ <field name="name" type="string" direct="true">
<bind-xml name="name" node="attribute"/>
</field>
+ <field name="version" type="integer" direct="true">
+ <bind-xml name="version" node="attribute"/>
+ </field>
<field name="isDescription" type="boolean" direct="true">
<bind-xml name="isDescription" node="attribute"/>
</field>
@@ -48,6 +51,9 @@ <field name="itemDescriptionPath" type="string" direct="true">
<bind-xml name="itemDescriptionPath" node="attribute"/>
</field>
+ <field name="itemDescriptionVersion" type="string" direct="true">
+ <bind-xml name="itemDescriptionVersion" node="attribute"/>
+ </field>
<field name="itemPath" type="string" direct="true">
<bind-xml name="itemPath" node="attribute"/>
</field>
@@ -77,12 +83,18 @@ <field name="name" type="string" direct="true">
<bind-xml name="name" node="attribute"/>
</field>
+ <field name="version" type="integer" direct="true">
+ <bind-xml name="version" node="attribute"/>
+ </field>
<field name="isDescription" type="boolean" direct="true">
<bind-xml name="isDescription" node="attribute"/>
</field>
<field name="itemDescriptionPath" type="string" direct="true">
<bind-xml name="itemDescriptionPath" node="attribute"/>
</field>
+ <field name="itemDescriptionVersion" type="string" direct="true">
+ <bind-xml name="itemDescriptionVersion" node="attribute"/>
+ </field>
<field name="dependencyMemberList" collection="arraylist" direct="true" type="com.c2kernel.entity.imports.ImportDependencyMember">
<bind-xml name="DependencyMember" node="element"/>
</field>
|
