/** * Visit mapping element. This just adds the mapping definition, if not already added. * * @param node * @return expansion flag */ public boolean visit(MappingElement node) { // check for nested mapping if (!(m_context.getParentElement() instanceof BindingElement)) { m_context.addWarning("No schema equivalent for nested type definitions - converting to global type"); } // add the definition forceMappingDetail(node); return super.visit(node); }
/** * Get the qualified name of the simple type used for a component, if a named simple type. If this returns * <code>null</code>, the {@link #buildSimpleType(IComponent)} method needs to be able to construct the * appropriate simple type definition. * * @param comp * @return qualified type name, <code>null</code> if inline definition needed */ private QName getSimpleTypeQName(IComponent comp) { IClass type = comp.getType(); String tname = comp.getType().getName(); QName qname = Types.schemaType(tname); if (qname == null) { qname = (QName)m_classSimpletypes.get(tname); if (qname == null) { ClassCustom custom = m_custom.getClassCustomization(type.getName()); if (custom != null && custom.isSimpleValue()) { qname = Types.STRING_QNAME; } else if (!type.isSuperclass("java.lang.Enum")) { m_context.addWarning("No schema equivalent known for type - treating as string", comp); qname = Types.STRING_QNAME; } } } return qname; }
m_context.addWarning("Handling not implemented for unspecified mapping", coll); m_context.addWarning("Handling not implemented for unspecified mapping", struct);
m_context.addWarning("Handling not implemented for unspecified mapping", coll); m_context.addWarning("Handling not implemented for unspecified mapping", struct);