1 15 package org.apache.hivemind.xml.definition.impl; 16 17 import java.util.ArrayList ; 18 import java.util.Collection ; 19 import java.util.HashMap ; 20 import java.util.Map ; 21 22 import org.apache.hivemind.ClassResolver; 23 import org.apache.hivemind.Location; 24 import org.apache.hivemind.definition.impl.ModuleDefinitionImpl; 25 import org.apache.hivemind.impl.SchemaAssignment; 26 import org.apache.hivemind.schema.Schema; 27 28 public class XmlModuleDefinitionImpl extends ModuleDefinitionImpl 29 { 30 33 private Map _schemas = new HashMap (); 34 35 38 private Collection _schemaAssignments = new ArrayList (); 39 40 public XmlModuleDefinitionImpl(String id, Location location, ClassResolver resolver, String packageName) 41 { 42 super(id, location, resolver, packageName); 43 } 44 45 public void addSchema(String qualifiedSchemaId, Schema schema) 46 { 47 _schemas.put(qualifiedSchemaId, schema); 48 } 49 50 public Schema getSchema(String qualifiedSchemaId) 51 { 52 return (Schema) _schemas.get(qualifiedSchemaId); 53 } 54 55 public Collection getSchemas() 56 { 57 return _schemas.values(); 58 } 59 60 public void addSchemaAssignment(SchemaAssignment assignment) 61 { 62 _schemaAssignments.add(assignment); 63 } 64 65 public Collection getSchemaAssignments() 66 { 67 return _schemaAssignments; 68 } 69 70 } 71 | Popular Tags |