/** * This will register the attribute specified in the path within * the provided model. Registration here will ensure that the * attribute is ordered so that it is placed within the document * in a required position. * * @param model this is the model to register the attribute in * @param path this is the path referencing the attribute */ private void registerAttribute(Model model, Expression path) throws Exception { String name = path.getFirst(); if(name != null) { model.registerAttribute(name); } }
/** * This will register the attribute specified in the path within * the provided model. Registration here will ensure that the * attribute is ordered so that it is placed within the document * in a required position. * * @param model this is the model to register the attribute in * @param path this is the path referencing the attribute */ private void registerAttribute(Model model, Expression path) throws Exception { String name = path.getFirst(); if(name != null) { model.registerAttribute(name); } }
/** * This will register the attribute specified in the path within * the provided model. Registration here will ensure that the * attribute is ordered so that it is placed within the document * in a required position. * * @param model this is the model to register the attribute in * @param path this is the path referencing the attribute */ private void registerAttribute(Model model, Expression path) throws Exception { String name = path.getFirst(); if(name != null) { model.registerAttribute(name); } }
/** * This is used to assemble the model by perform registrations * based on the <code>Order</code> annotation. The initial * registrations performed by this establish the element and * attribute order for serialization of the schema class. * * @param model the model to perform registrations on * @param order this is the order specified by the class */ private void assembleAttributes(Model model, Order order) throws Exception { for(String value : order.attributes()) { Expression path = builder.build(value); if(!path.isAttribute() && path.isPath()) { throw new PathException("Ordered attribute '%s' references an element in %s", path, detail); } if(!path.isPath()) { Style style = format.getStyle(); String name = style.getAttribute(value); model.registerAttribute(name); } else { registerAttributes(model, path); } } }
/** * This is used to assemble the model by perform registrations * based on the <code>Order</code> annotation. The initial * registrations performed by this establish the element and * attribute order for serialization of the schema class. * * @param model the model to perform registrations on * @param order this is the order specified by the class */ private void assembleAttributes(Model model, Order order) throws Exception { for(String value : order.attributes()) { Expression path = builder.build(value); if(!path.isAttribute() && path.isPath()) { throw new PathException("Ordered attribute '%s' references an element in %s", path, detail); } if(!path.isPath()) { Style style = format.getStyle(); String name = style.getAttribute(value); model.registerAttribute(name); } else { registerAttributes(model, path); } } }
/** * This is used to assemble the model by perform registrations * based on the <code>Order</code> annotation. The initial * registrations performed by this establish the element and * attribute order for serialization of the schema class. * * @param model the model to perform registrations on * @param order this is the order specified by the class */ private void assembleAttributes(Model model, Order order) throws Exception { for(String value : order.attributes()) { Expression path = builder.build(value); if(!path.isAttribute() && path.isPath()) { throw new PathException("Ordered attribute '%s' references an element in %s", path, detail); } if(!path.isPath()) { Style style = format.getStyle(); String name = style.getAttribute(value); model.registerAttribute(name); } else { registerAttributes(model, path); } } }