1 15 package org.apache.hivemind.schema.rules; 16 17 import org.apache.hivemind.Element; 18 import org.apache.hivemind.schema.Rule; 19 import org.apache.hivemind.schema.SchemaProcessor; 20 import org.apache.hivemind.schema.Translator; 21 22 29 public class PushContentRule extends BaseRule implements Rule 30 { 31 35 public void begin(SchemaProcessor processor, Element element) 36 { 37 Translator t = processor.getContentTranslator(); 38 39 String value = RuleUtils.processText(processor, element, element.getContent()); 40 41 Object finalValue = t.translate( 42 processor.getContributingModule(), 43 Object .class, 44 value, 45 element.getLocation()); 46 47 processor.push(finalValue); 48 } 49 50 53 public void end(SchemaProcessor processor, Element element) 54 { 55 processor.pop(); 56 } 57 } 58 | Popular Tags |