/** {@inheritDoc} */ public IEntity create(OMElement root, IParserContext context) { BeanXml entity = new BeanXml(context.getResource()); entity.setEntity(entity); entity.setResource(context.getResource()); entity.setResourceLocator(context.getLocator()); entity.setTagName(TAG_NAME); return entity; }
/** {@inheritDoc} */ @Override protected boolean populate(T tag, IParserContext context) { super.populate(tag, context); final OMElement ele = context.getElement(); final Set<String> ignore = getIgnoredAttributes(tag, context); processElement( tag, context, new IAttributeFilter() { public boolean accept(OMElement ele, String attrName, String attrValue) { return ignore == null || !ignore.contains(attrName); } }); for (OMElement child : AxiomUtils.getElements(ele, null)) { if (isInvokerTag(child, context)) { encloseWithValueTag(ele, child, null); } } return false; }
/** * Process the tag attributes and children. * * @param tag the tag * @param context the parse context * @param filter the attribute filter */ public static void processElement(ITag tag, IParserContext context, IAttributeFilter filter) { final OMElement ele = context.getElement(); String text = ele.getText(); if (StringUtils.isBlank(text)) { text = null; } pushAttributeToSubConst(ele, filter); }