/** * This is used to determine if the structure is empty. To check * to see if the structure is empty all models within the tree * must be examined. Also, if there is a text annotation then it * is not considered to be empty. * * @return true if the structure represents an empty schema */ private boolean isEmpty() { if(text != null) { return false; } return root.isEmpty(); } }
/** * This is used to determine if the structure is empty. To check * to see if the structure is empty all models within the tree * must be examined. Also, if there is a text annotation then it * is not considered to be empty. * * @return true if the structure represents an empty schema */ private boolean isEmpty() { if(text != null) { return false; } return root.isEmpty(); } }
/** * This is used to determine if the structure is empty. To check * to see if the structure is empty all models within the tree * must be examined. Also, if there is a text annotation then it * is not considered to be empty. * * @return true if the structure represents an empty schema */ private boolean isEmpty() { if(text != null) { return false; } return root.isEmpty(); } }
/** * This is used to determine if the model list is empty. The * model list is considered empty if it does not contain any * models with element or attribute registrations. This does * not mean that the list itself does not contain models. * * @return this returns true if there are no registrations */ public boolean isEmpty() { for(Model model : this) { if(model != null) { if(!model.isEmpty()) { return false; } } } return true; }
/** * This is used to determine if the model list is empty. The * model list is considered empty if it does not contain any * models with element or attribute registrations. This does * not mean that the list itself does not contain models. * * @return this returns true if there are no registrations */ public boolean isEmpty() { for(Model model : this) { if(model != null) { if(!model.isEmpty()) { return false; } } } return true; }
/** * This is used to determine if the model list is empty. The * model list is considered empty if it does not contain any * models with element or attribute registrations. This does * not mean that the list itself does not contain models. * * @return this returns true if there are no registrations */ public boolean isEmpty() { for(Model model : this) { if(model != null) { if(!model.isEmpty()) { return false; } } } return true; }
/** * This is used to validate the model to ensure all elements and * attributes are valid. Validation also ensures that any order * specified by an annotated class did not contain invalid XPath * values, or redundant elements and attributes. * * @param type this is the object type representing the schema */ private void validateModel(Class type) throws Exception { if(!root.isEmpty()) { root.validate(type); } }
/** * This is used to validate the model to ensure all elements and * attributes are valid. Validation also ensures that any order * specified by an annotated class did not contain invalid XPath * values, or redundant elements and attributes. * * @param type this is the object type representing the schema */ private void validateModel(Class type) throws Exception { if(!root.isEmpty()) { root.validate(type); } }
/** * This is used to validate the model to ensure all elements and * attributes are valid. Validation also ensures that any order * specified by an annotated class did not contain invalid XPath * values, or redundant elements and attributes. * * @param type this is the object type representing the schema */ private void validateModel(Class type) throws Exception { if(!root.isEmpty()) { root.validate(type); } }
/** * This is used to perform a recursive search of the models that * have been registered, if a model has elements or attributes * then this returns true. If however no other model contains * any attributes or elements then this will return false. * * @return true if any model has elements or attributes */ public boolean isComposite() { for(ModelList list : models) { for(Model model : list) { if(model != null) { if(!model.isEmpty()) { return true; } } } } return !models.isEmpty(); }
/** * This is used to perform a recursive search of the models that * have been registered, if a model has elements or attributes * then this returns true. If however no other model contains * any attributes or elements then this will return false. * * @return true if any model has elements or attributes */ public boolean isComposite() { for(ModelList list : models) { for(Model model : list) { if(model != null) { if(!model.isEmpty()) { return true; } } } } return !models.isEmpty(); }
/** * This is used to perform a recursive search of the models that * have been registered, if a model has elements or attributes * then this returns true. If however no other model contains * any attributes or elements then this will return false. * * @return true if any model has elements or attributes */ public boolean isComposite() { for(ModelList list : models) { for(Model model : list) { if(model != null) { if(!model.isEmpty()) { return true; } } } } return !models.isEmpty(); }
/** * This is used to take the models from the model list at the * first index. This is used when iterating over the models * to ensure there is only ever one visit of a specific model * * @return this returns the next model in the sequence */ public Model take() { while(!isEmpty()) { Model model = remove(0); if(!model.isEmpty()) { return model; } } return null; } }
/** * This is used to take the models from the model list at the * first index. This is used when iterating over the models * to ensure there is only ever one visit of a specific model * * @return this returns the next model in the sequence */ public Model take() { while(!isEmpty()) { Model model = remove(0); if(!model.isEmpty()) { return model; } } return null; } }
/** * This is used to take the models from the model list at the * first index. This is used when iterating over the models * to ensure there is only ever one visit of a specific model * * @return this returns the next model in the sequence */ public Model take() { while(!isEmpty()) { Model model = remove(0); if(!model.isEmpty()) { return model; } } return null; } }
Model element = model.lookup(name, index); if(element.isEmpty()) { return false;
Model element = model.lookup(name, index); if(element.isEmpty()) { return false;
Model element = model.lookup(name, index); if(element.isEmpty()) { return false;