1 15 package org.apache.hivemind.xml.definition.impl; 16 17 import org.apache.hivemind.definition.ConfigurationParser; 18 import org.apache.hivemind.definition.ConfigurationParserConstructor; 19 import org.apache.hivemind.definition.ConstructionContext; 20 import org.apache.hivemind.schema.Schema; 21 import org.apache.hivemind.util.Defense; 22 23 26 public class HiveMindSchemaParserConstructor implements ConfigurationParserConstructor 27 { 28 private Schema _schema; 29 private String _schemaId; 30 31 public HiveMindSchemaParserConstructor(String schemaId) 32 { 33 _schemaId = schemaId; 34 } 35 36 public HiveMindSchemaParserConstructor(Schema schema) 37 { 38 _schema = schema; 39 } 40 41 public ConfigurationParser constructParser(ConstructionContext context) 42 { 43 Defense.fieldNotNull(_schema, "schema"); 44 45 return new HiveMindSchemaParser(_schema); 46 } 47 48 public Schema getSchema() 49 { 50 return _schema; 51 } 52 53 public void setSchema(Schema schema) 54 { 55 _schema = schema; 56 } 57 58 public String getSchemaId() 59 { 60 return _schemaId; 61 } 62 63 public void setSchemaId(String schemaId) 64 { 65 _schemaId = schemaId; 66 } 67 68 } 69 | Popular Tags |