Package com.ximpleware

Examples of com.ximpleware.AutoPilot.iterate()


        List<AgigaToken> agigaTokens = new ArrayList<AgigaToken>();
       
        // Loop through each token
        AutoPilot tokAp = new AutoPilot(vn);
        tokAp.selectElement(AgigaConstants.TOKEN);
        while (tokAp.iterate()) {
            // Just double check that the tokens are in order
            if (tokId < 0) {
                tokId = vn.parseInt(vn.getAttrVal(AgigaConstants.TOKEN_ID));
            }
            require (vn.parseInt(vn.getAttrVal(AgigaConstants.TOKEN_ID)) == tokId);
View Full Code Here


        List<AgigaTypedDependency> agigaDeps = new ArrayList<AgigaTypedDependency>();
       
        // Loop through the dep tags
        AutoPilot basicDepRelAp = new AutoPilot(vn);
        basicDepRelAp.selectElement(AgigaConstants.DEP);
        while (basicDepRelAp.iterate()) {
            // Read the type, governor, and dependent
            String type = vn.toString(vn.getAttrVal(AgigaConstants.DEP_TYPE));
            require (vn.toElement(VTDNav.FC, AgigaConstants.GOVERNOR));
            int governorId = vn.parseInt(vn.getText());
            require (vn.toElement(VTDNav.NS, AgigaConstants.DEPENDENT));
View Full Code Here

        }

        // Loop through each token
        AutoPilot corefAp = new AutoPilot(vn);
        corefAp.selectElement(AgigaConstants.COREFERENCE);
        while (corefAp.iterate()) {
            AgigaCoref coref = parseCoref(vn.cloneNav());
            agigaCorefs.add(coref);
        }
        return agigaCorefs;
    }
View Full Code Here

        require (vn.matchElement(AgigaConstants.COREFERENCE));
        AgigaCoref coref = new AgigaCoref();
       
        AutoPilot mentionAp = new AutoPilot(vn);
        mentionAp.selectElement(AgigaConstants.MENTION);
        while (mentionAp.iterate()) {
            int repInt = vn.getAttrVal(AgigaConstants.MENTION_REPRESENTATIVE);
            boolean isRepresentative = false;
            if (repInt != -1) {
                isRepresentative = Boolean.parseBoolean(vn.toString(repInt));
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.