public class ExtendedClientApplicationParser extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ATRIBUTE_OP |
static String |
DELETE_MANAGER_OP |
static String |
DELETE_OP |
static String |
FORM_ATRIBUTE |
static String |
ID_ATRIBUTE |
static String |
INSERT_MANAGER_OP |
static String |
INSERT_OP |
static String |
MODIFY_MANAGER_OP |
static String |
MODIFY_OP |
static String |
NAME_ATRIBUTE |
static String |
PARENT_ATRIBUTE |
static String |
REPLACE_OP |
static String |
TAGNAME |
static String |
VALUE_ATRIBUTE |
| Constructor and Description |
|---|
ExtendedClientApplicationParser() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
executeOperation(Document originalForm,
ExtendedClientApplicationOperation operation) |
protected ArrayList |
extractOperationNodes(Document extendDocument)
This method iterate along the extend document extracting all nodes of
operations
|
Document |
getDocumentModel(File f) |
protected InnerExtendedClientApplicationOperation |
getInternalNodeOperation(Node node) |
protected ExtendedClientApplicationOperation |
getNodeOperation(Node node)
This method processes a node that contains an operaton and returns an
instance of class XmlExtendsOperation with necessary information to apply
this operation in original xml document
|
protected boolean |
isExtendNode(Node node)
Returns true or false if the node parameter is a operation node
|
protected boolean |
isInternalOperationNode(Node node) |
protected Document |
parse(Document originalForm,
Document extendDocument)
Executes all operations in extendDocument to modify the xml code in
originalDocument
|
Document |
parseExtendedXml(Document originalForm,
Document extendDocument) |
String |
printDocument(Document document) |
protected Node |
searchNodeByAttr(Node node,
String attrName,
String attrValue)
Thes method makes a deep search of a node the by attr atribute.
|
protected Node |
searchNodeByElementName(Node node,
String name)
Thes method makes a deep search of a node the by element Name.
|
public static final String INSERT_OP
public static final String MODIFY_OP
public static final String REPLACE_OP
public static final String DELETE_OP
public static final String INSERT_MANAGER_OP
public static final String DELETE_MANAGER_OP
public static final String MODIFY_MANAGER_OP
public static final String ATRIBUTE_OP
public static final String PARENT_ATRIBUTE
public static final String NAME_ATRIBUTE
public static final String VALUE_ATRIBUTE
public static final String FORM_ATRIBUTE
public static final String ID_ATRIBUTE
public static final String TAGNAME
protected void executeOperation(Document originalForm, ExtendedClientApplicationOperation operation) throws Exception
Exceptionprotected Node searchNodeByAttr(Node node, String attrName, String attrValue)
node - The node in that the search is madeattrName - name of attribute of node searchedattrValue - value of attribute of node searchedprotected Node searchNodeByElementName(Node node, String name)
node - The node in that the search is madename - element name of node searchedprotected Document parse(Document originalForm, Document extendDocument)
originalForm - - The xml of the original fileextendDocument - - The xml containing the operations to apply in
originalDocumentprotected ArrayList extractOperationNodes(Document extendDocument)
extendDocument - protected ExtendedClientApplicationOperation getNodeOperation(Node node) throws Exception
node - The node of operationExceptionprotected InnerExtendedClientApplicationOperation getInternalNodeOperation(Node node) throws Exception
Exceptionprotected boolean isExtendNode(Node node)
node - the node to checlprotected boolean isInternalOperationNode(Node node)
Copyright © 2016 Imatia Innovation S.L.. All rights reserved.