1 22 package org.jboss.test.xml.initializer; 23 24 import javax.xml.namespace.QName ; 25 26 import org.jboss.xb.binding.metadata.ClassMetaData; 27 import org.jboss.xb.binding.metadata.PropertyMetaData; 28 import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding; 29 import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding; 30 import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingInitializer; 31 32 38 public class SimpleInitializer implements SchemaBindingInitializer 39 { 40 public static final String NS = "dummy://www.jboss.org/simple"; 41 42 private static final QName testQName = new QName (NS, "test"); 43 44 public SchemaBinding init(SchemaBinding schema) 45 { 46 ElementBinding test = schema.getElement(testQName); 47 ClassMetaData classMetaData = new ClassMetaData(); 48 classMetaData.setImpl(Simple.class.getName()); 49 test.setClassMetaData(classMetaData); 50 51 PropertyMetaData propMetaData = new PropertyMetaData(); 52 propMetaData.setName("value"); 53 test.setPropertyMetaData(propMetaData); 54 55 return schema; 56 } 57 } 58 | Popular Tags |