Index: lutingenerator/src/java/org/codelutin/generator/models/object/xml/ObjectModelImpl.java diff -u lutingenerator/src/java/org/codelutin/generator/models/object/xml/ObjectModelImpl.java:1.20 lutingenerator/src/java/org/codelutin/generator/models/object/xml/ObjectModelImpl.java:1.21 --- lutingenerator/src/java/org/codelutin/generator/models/object/xml/ObjectModelImpl.java:1.20 Wed Jan 4 13:29:11 2006 +++ lutingenerator/src/java/org/codelutin/generator/models/object/xml/ObjectModelImpl.java Tue Jan 24 18:20:00 2006 @@ -23,9 +23,9 @@ * * @author C�dric Pineau * Copyright Code Lutin -* @version $Revision: 1.20 $ +* @version $Revision: 1.21 $ * -* Last update : $Date: 2006/01/04 13:29:11 $ +* Last update : $Date: 2006/01/24 18:20:00 $ * by : $Author: bpoussin $ */ package org.codelutin.generator.models.object.xml; @@ -35,6 +35,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; +import java.util.Map; import org.codelutin.generator.models.object.ObjectModel; import org.codelutin.generator.models.object.ObjectModelClass; @@ -53,6 +54,7 @@ protected HashMap interfaces = new HashMap(); protected HashMap classifiers = new HashMap(); protected List comments = new ArrayList(); + private HashMap tagValues = new HashMap(); public void parsetName(String name) { this.name = name; @@ -336,4 +338,30 @@ return coll.contains(toFind); //Le equals(...) de ObjectModelImplRef convient } + public ObjectModelImplTagValue parsetTagValue(ObjectModelImplTagValue tagValue) { + if (tagValue == null) + return new ObjectModelImplTagValue(); + tagValues .put(tagValue.getName(), tagValue.getValue()); + return tagValue; + } + + /** + * Returns the tagValues associated with this element. + * For each entry, the key is the name of the tagValue, the value is the value of the tagValue :-) + * + * @return a Map containing all tagValues associated with this element + */ + public Map getTagValues() { + return tagValues; + } + + /** + * Returns the tagValue corresponding to the given name, or null if the element has no associated tagValue for this name. + * + * @return the value of the found tagValue, or null if the element has no associated tagValue for this name. + */ + public String getTagValue(String tagValue) { + return (tagValue == null?null:(String) tagValues.get(tagValue)); + } + }