/** * This is used to read the specified node from in to the list. If * the node is null then this represents a null element value in * the array. The node can be null only if there is a parent and * that parent contains no child XML elements. * * @param node this is the node to read the array value from * @param list this is the list to add the array value in to * @param index this is the offset to set the value in the array */ private void read(InputNode node, Object list, int index) throws Exception { Class type = entry.getType(); Object value = null; if(!node.isEmpty()) { value = root.read(node, type); } Array.set(list, index, value); }
/** * This is used to read the specified node from in to the list. If * the node is null then this represents a null element value in * the array. The node can be null only if there is a parent and * that parent contains no child XML elements. * * @param node this is the node to read the array value from * @param list this is the list to add the array value in to * @param index this is the offset to set the value in the array */ private void read(InputNode node, Object list, int index) throws Exception { Class type = entry.getType(); Object value = null; if(!node.isEmpty()) { value = root.read(node, type); } Array.set(list, index, value); }
/** * This is used to read the specified node from in to the list. If * the node is null then this represents a null element value in * the array. The node can be null only if there is a parent and * that parent contains no child XML elements. * * @param node this is the node to read the array value from * @param list this is the list to add the array value in to * @param index this is the offset to set the value in the array */ private void read(InputNode node, Object list, int index) throws Exception { Class type = entry.getType(); Object value = null; if(!node.isEmpty()) { value = root.read(node, type); } Array.set(list, index, value); }
/** * This <code>validate</code> method wll validate the XML element * list against the provided node and validate its children as entry * types. This ensures each entry type is validated as a root type, * that is, its <code>Root</code> annotation must be present and the * name of the entry element must match that root element name. * * @param node this is the XML element that is to be validated * @param type this is the array type used to create the array * * @return true if the element matches the XML schema class given */ private boolean validate(InputNode node, Class type) throws Exception{ while(true) { InputNode next = node.getNext(); if(next == null) { return true; } if(!next.isEmpty()) { root.validate(next, type); } } }
/** * This <code>validate</code> method wll validate the XML element * list against the provided node and validate its children as entry * types. This ensures each entry type is validated as a root type, * that is, its <code>Root</code> annotation must be present and the * name of the entry element must match that root element name. * * @param node this is the XML element that is to be validated * @param type this is the array type used to create the array * * @return true if the element matches the XML schema class given */ private boolean validate(InputNode node, Class type) throws Exception{ while(true) { InputNode next = node.getNext(); if(next == null) { return true; } if(!next.isEmpty()) { root.validate(next, type); } } }
/** * This <code>validate</code> method wll validate the XML element * list against the provided node and validate its children as entry * types. This ensures each entry type is validated as a root type, * that is, its <code>Root</code> annotation must be present and the * name of the entry element must match that root element name. * * @param node this is the XML element that is to be validated * @param type this is the array type used to create the array * * @return true if the element matches the XML schema class given */ private boolean validate(InputNode node, Class type) throws Exception{ while(true) { InputNode next = node.getNext(); if(next == null) { return true; } if(!next.isEmpty()) { root.validate(next, type); } } }
/** * This method is used to read the value object from the node. The * value read from the node is resolved using the template filter. * If the value data can not be found according to the annotation * attributes then null is assumed and returned. * * @param node this is the node to read the value object from * * @return this returns the value deserialized from the node */ public Object read(InputNode node) throws Exception { InputNode next = node.getNext(); Class expect = type.getType(); if(next == null) { return null; } if(next.isEmpty()) { return null; } return root.read(next, expect); }
/** * This method is used to read the value object from the node. The * value read from the node is resolved using the template filter. * If the value data can not be found according to the annotation * attributes then null is assumed and returned. * * @param node this is the node to read the value object from * * @return this returns the value deserialized from the node */ public Object read(InputNode node) throws Exception { InputNode next = node.getNext(); Class expect = type.getType(); if(next == null) { return null; } if(next.isEmpty()) { return null; } return root.read(next, expect); }
/** * This method is used to read the value object from the node. The * value read from the node is resolved using the template filter. * If the value data can not be found according to the annotation * attributes then null is assumed and returned. * * @param node this is the node to read the value object from * * @return this returns the value deserialized from the node */ public Object read(InputNode node) throws Exception { InputNode next = node.getNext(); Class expect = type.getType(); if(next == null) { return null; } if(next.isEmpty()) { return null; } return root.read(next, expect); }
if( child.isEmpty() == true ) // child is an empty tag
/** * This method is used to read the value object from the node. The * value read from the node is resolved using the template filter. * If the value data can not be found according to the annotation * attributes then null is assumed and the node is valid. * * @param node this is the node to read the value object from * @param key this is the name of the value element * * @return this returns true if this represents a valid value */ private boolean validate(InputNode node, String key) throws Exception { String name = style.getElement(key); InputNode next = node.getNext(name); Class expect = type.getType(); if(next == null) { return true; } if(next.isEmpty()) { return true; } return root.validate(next, expect); }
/** * This method is used to read the key value from the node. The * value read from the node is resolved using the template filter. * If the key value can not be found according to the annotation * attributes then null is assumed and the node is valid. * * @param node this is the node to read the key value from * @param key this is the name of the key wrapper XML element * * @return this returns the value deserialized from the node */ private boolean validate(InputNode node, String key) throws Exception { String name = style.getElement(key); InputNode next = node.getNext(name); Class expect = type.getType(); if(next == null) { return true; } if(next.isEmpty()) { return true; } return root.validate(next, expect); }
/** * This method is used to read the key value from the node. The * value read from the node is resolved using the template filter. * If the key value can not be found according to the annotation * attributes then null is assumed and the node is valid. * * @param node this is the node to read the key value from * @param key this is the name of the key wrapper XML element * * @return this returns the value deserialized from the node */ private boolean validate(InputNode node, String key) throws Exception { String name = style.getElement(key); InputNode next = node.getNext(name); Class expect = type.getType(); if(next == null) { return true; } if(next.isEmpty()) { return true; } return root.validate(next, expect); }
/** * This method is used to read the value object from the node. The * value read from the node is resolved using the template filter. * If the value data can not be found according to the annotation * attributes then null is assumed and the node is valid. * * @param node this is the node to read the value object from * @param key this is the name of the value element * * @return this returns true if this represents a valid value */ private boolean validate(InputNode node, String key) throws Exception { String name = style.getElement(key); InputNode next = node.getNext(name); Class expect = type.getType(); if(next == null) { return true; } if(next.isEmpty()) { return true; } return root.validate(next, expect); }
/** * This method is used to read the key value from the node. The * value read from the node is resolved using the template filter. * If the key value can not be found according to the annotation * attributes then null is assumed and the node is valid. * * @param node this is the node to read the key value from * @param key this is the name of the key wrapper XML element * * @return this returns the value deserialized from the node */ private boolean validate(InputNode node, String key) throws Exception { String name = style.getElement(key); InputNode next = node.getNext(name); Class expect = type.getType(); if(next == null) { return true; } if(next.isEmpty()) { return true; } return root.validate(next, expect); }
/** * This method is used to read the key value from the node. The * value read from the node is resolved using the template filter. * If the key value can not be found according to the annotation * attributes then null is assumed and returned. * * @param node this is the node to read the key value from * @param key this is the name of the key wrapper XML element * * @return this returns the value deserialized from the node */ private Object read(InputNode node, String key) throws Exception { String name = style.getElement(key); Class expect = type.getType(); if(name != null) { node = node.getNext(name); } if(node == null) { return null; } if(node.isEmpty()) { return null; } return root.read(node, expect); }
/** * This method is used to read the value object from the node. The * value read from the node is resolved using the template filter. * If the value data can not be found according to the annotation * attributes then null is assumed and the node is valid. * * @param node this is the node to read the value object from * @param key this is the name of the value element * * @return this returns true if this represents a valid value */ private boolean validate(InputNode node, String key) throws Exception { String name = style.getElement(key); InputNode next = node.getNext(name); Class expect = type.getType(); if(next == null) { return true; } if(next.isEmpty()) { return true; } return root.validate(next, expect); }
/** * This method is used to read the key value from the node. The * value read from the node is resolved using the template filter. * If the key value can not be found according to the annotation * attributes then null is assumed and returned. * * @param node this is the node to read the key value from * @param key this is the name of the key wrapper XML element * * @return this returns the value deserialized from the node */ private Object read(InputNode node, String key) throws Exception { String name = style.getElement(key); Class expect = type.getType(); if(name != null) { node = node.getNext(name); } if(node == null) { return null; } if(node.isEmpty()) { return null; } return root.read(node, expect); }
/** * This method is used to read the key value from the node. The * value read from the node is resolved using the template filter. * If the key value can not be found according to the annotation * attributes then null is assumed and returned. * * @param node this is the node to read the key value from * @param key this is the name of the key wrapper XML element * * @return this returns the value deserialized from the node */ private Object read(InputNode node, String key) throws Exception { String name = style.getElement(key); Class expect = type.getType(); if(name != null) { node = node.getNext(name); } if(node == null) { return null; } if(node.isEmpty()) { return null; } return root.read(node, expect); }