public E createElement() throws ContentCreationException { return delegate().createElement(); }
public E createElement() throws ContentCreationException { return delegate().createElement(); }
public E createElement() throws ContentCreationException { return delegate().createElement(); }
/** * Create a child element for the given name and metadata. */ protected Element createChildElement(QName qName, ElementMetadata<?, ?> metadata) throws ParseException { if (metadata == null) { return new Element(qName); } try { return metadata.createElement(); } catch (ContentCreationException e) { // to ElementHandler interface? throw new ParseException(e); } }
/** * Create a child element for the given name and metadata. */ protected Element createChildElement(QName qName, ElementMetadata<?, ?> metadata) throws ParseException { if (metadata == null) { return new Element(qName); } try { return metadata.createElement(); } catch (ContentCreationException e) { // to ElementHandler interface? throw new ParseException(e); } }
/** * Create a child element for the given name and metadata. */ protected Element createChildElement(QName qName, ElementMetadata<?, ?> metadata) throws ParseException { if (metadata == null) { return new Element(qName); } try { return metadata.createElement(); } catch (ContentCreationException e) { // to ElementHandler interface? throw new ParseException(e); } }
/** * For parsing, we always parse directly into the first source. */ public void parse(Element element, ElementMetadata<?, ?> metadata, Object value) throws ParseException { if (sources.isEmpty()) { return; } MetadataKey<?> source = sources.get(0); if (source instanceof ElementKey<?, ?>) { ElementKey<?, ?> childKey = (ElementKey<?, ?>) source; ElementMetadata<?, ?> childMeta = metadata.bindElement(childKey); Element child = element.getElement(childKey); if (child == null) { try { child = childMeta.createElement(); } catch (ContentCreationException e) { throw new ParseException(e); } element.addElement(childKey, child); } childMeta.parseValue(child, childMeta, value); } else { AttributeKey<?> attKey = (AttributeKey<?>) source; AttributeMetadata<?> attMeta = metadata.bindAttribute(attKey); attMeta.parseValue(element, metadata, value); } } }
/** * For parsing, we always parse directly into the first source. */ public void parse(Element element, ElementMetadata<?, ?> metadata, Object value) throws ParseException { if (sources.isEmpty()) { return; } MetadataKey<?> source = sources.get(0); if (source instanceof ElementKey<?, ?>) { ElementKey<?, ?> childKey = (ElementKey<?, ?>) source; ElementMetadata<?, ?> childMeta = metadata.bindElement(childKey); Element child = element.getElement(childKey); if (child == null) { try { child = childMeta.createElement(); } catch (ContentCreationException e) { throw new ParseException(e); } element.addElement(childKey, child); } childMeta.parseValue(child, childMeta, value); } else { AttributeKey<?> attKey = (AttributeKey<?>) source; AttributeMetadata<?> attMeta = metadata.bindAttribute(attKey); attMeta.parseValue(element, metadata, value); } } }
/** * For parsing, we always parse directly into the first source. */ public void parse(Element element, ElementMetadata<?, ?> metadata, Object value) throws ParseException { if (sources.isEmpty()) { return; } MetadataKey<?> source = sources.get(0); if (source instanceof ElementKey<?, ?>) { ElementKey<?, ?> childKey = (ElementKey<?, ?>) source; ElementMetadata<?, ?> childMeta = metadata.bindElement(childKey); Element child = element.getElement(childKey); if (child == null) { try { child = childMeta.createElement(); } catch (ContentCreationException e) { throw new ParseException(e); } element.addElement(childKey, child); } childMeta.parseValue(child, childMeta, value); } else { AttributeKey<?> attKey = (AttributeKey<?>) source; AttributeMetadata<?> attMeta = metadata.bindAttribute(attKey); attMeta.parseValue(element, metadata, value); } } }