Package com.dtrules.xmlparser.XMLTree

Examples of com.dtrules.xmlparser.XMLTree.Node


   
    @Override
    public Label createLabel(AutoDataMap autoDataMap, Group group,
            String labelName, String key, boolean singular, Object object) {
       
        Node xmlnode = (Node)object;
       
        if(!xmlnode.getAttributes().containsKey("node"))return null;
       
        Label labelObj = group.findLabel(labelName,"xml",labelName);
       
        if(labelObj == null ){
            labelObj = Label.newLabel(group,labelName,labelName,key,singular);
        }
        if(labelObj.isCached())return labelObj;
        labelObj.setCached(true);
       
        for(Node xmltag : xmlnode.getTags()){
            String node    = xmltag.getAttributes().get("node");
            String type    = xmltag.getAttributes().get("type");
            String subType = xmltag.getAttributes().get("subType");
            // First check if this is just a tag wrapping the dataload file.  If so,
            // just claim it is a List.
View Full Code Here


        }
    }
   
    public void LoadXML(InputStream in){
        try {
            Node root = XMLTree.BuildTree(in, false, false);
            loadObjects(null,root);           
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

    *
    */
   public static ArrayList<Node> findMissingNodes(String attribs[], ArrayList<Node> dts1, ArrayList<Node> dts2){
       ArrayList<Node> missing = new ArrayList<Node>();
       for(int i = dts1.size()-1; i>=0; i--){
           Node t1 = dts1.get(i);
           Node match = null;
           for(Node t2: dts2){
              
               boolean allmatch = true;
               for(String attrib : attribs){
                   if(!t1.getAttributes().get(attrib).equals(t2.getAttributes().get(attrib))){
View Full Code Here

    *
    */
   public static ArrayList<Node> findMissingNodes(String attrib, String tag, ArrayList<Node> dts1, ArrayList<Node> dts2){
       ArrayList<Node> missing = new ArrayList<Node>();
       for(int i = dts1.size()-1; i>=0; i--){
           Node t1 = dts1.get(i);
           String t1name = getName(t1,attrib);
           Node match = null;
           for(Node t2: dts2){
               String t2name = getName(t2,attrib);
              
               if(t1name.equals(t2name)){
                   match = t2;
View Full Code Here

       if(rules1.dts == null || rules2.dts == null){
           report.closetag();
           return;
       }

       Node root1 = rules1.getDtsRoot();
       Node root2 = rules2.getDtsRoot();


       ArrayList<Node> decisionTables1 = findtables(root1);
       ArrayList<Node> decisionTables2 = findtables(root2);
View Full Code Here

           }      
           report.closetag();
           return;
       }
      
       Node root1 = rules1.getEddRoot();
       Node root2 = rules2.getEddRoot();
      
       ArrayList<Node> entities1 = findentities(root1);
       ArrayList<Node> entities2 = findentities(root2);
      
       if(entities1.size()==0){
View Full Code Here

       if(rules1.mapping == null || rules2.mapping == null){
           report.closetag();
           return differences;
       }
  
       Node root1 = rules1.getMappingRoot();
       Node root2 = rules2.getMappingRoot();
       {       
           ArrayList<Node> attributes1 = findnodes("setattribute",root1,null);
           ArrayList<Node> attributes2 = findnodes("setattribute",root2,null);
          
           if(attributes1.size()==0){
View Full Code Here

        protected Node         mappingRoot   = null;
       
       
        private Node loadTree(InputStream s){
            try {
                Node root = XMLTree.BuildTree(s,false,false);
                return root;
            } catch (Exception e) {
                return null;
            }
           
View Full Code Here

            System.out.println("'"+getOutputDirectory()+"' does not exist or is not a directory");
        }
        File files[] = outputs.listFiles();
        for(File file : files){
            if(file.getName().endsWith("_results.xml")){
                Node result1=null, result2=null;
                try{
                    result1 = XMLTree.BuildTree(new FileInputStream(file),false,false);
                    result2 = XMLTree.BuildTree(new FileInputStream(getResultDirectory()+file.getName()),false, false);
                    if(result1 != null && result2 != null){
                        if(compareNodes(result1,result2)){
View Full Code Here

   
    @Override
    public Label createLabel(AutoDataMap autoDataMap, Group group,
            String labelName, String key, boolean singular, Object object) {
       
        Node xmlnode = (Node)object;
       
        if(!xmlnode.getAttributes().containsKey("node"))return null;
       
        Label labelObj = group.findLabel(labelName,"xml",labelName);
       
        if(labelObj == null ){
            labelObj = Label.newLabel(group,labelName,labelName,key,singular);
        }
        if(labelObj.isCached())return labelObj;
        labelObj.setCached(true);
       
        for(Node xmltag : xmlnode.getTags()){
            String node    = xmltag.getAttributes().get("node");
            String type    = xmltag.getAttributes().get("type");
            String subType = xmltag.getAttributes().get("subType");
            // First check if this is just a tag wrapping the dataload file.  If so,
            // just claim it is a List.
View Full Code Here

TOP

Related Classes of com.dtrules.xmlparser.XMLTree.Node

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.