Examples of SimpleParser


Examples of smilehouse.util.SimpleParser

        InputStream in = null;
        SimpleParser.Record[] menus = null;
        LabelResource labelResource = null;
        try {
            in = getClass().getResourceAsStream(menuDirectory + menuName + ".menu");
            SimpleParser parser = new SimpleParser(KEYWORDS, in);
            SimpleParser.Record all = parser.readAll();

            // --------------
            // Custom labels?
            // --------------
            SimpleParser.Entity labelEntity = all.getEntityByKeyword(LABELRESOURCE, false);
View Full Code Here

Examples of smilehouse.util.SimpleParser

        // ----------------------------
        InputStream in = null;
        SimpleParser.Record[] menus = null;
        try {
            in = getClass().getResourceAsStream(menuDirectory + menuName + ".menu");
            SimpleParser parser = new SimpleParser(KEYWORDS, in);
            menus = parser.readAll().getRecords(MENU);
        } finally {
            if(in != null)
                in.close();
        }
View Full Code Here

Examples of smilehouse.util.SimpleParser

        try {
            // -------------------------------------------------------
            // Get the menu definition file and create a parser for it
            // -------------------------------------------------------
            in = getClass().getResourceAsStream(menuFile);
            SimpleParser parser = new SimpleParser(words, in);

            // ----------------------------------------------------------
            // Go recursively through the menus searching the desired one
            // ----------------------------------------------------------
            SimpleParser.Entity entity;
            while((entity = parser.readEntity()) != null) {
                if(entity.getKeyword() == MENU) {
                    // Get the next main menu and push it to the stack
                    SimpleParser.Record mainMenu = entity.getRecord();
                    menus.push(mainMenu);
                    if(searchMenuPath(menus, upItems, tabSetId)) {
View Full Code Here

Examples of tigase.xml.SimpleParser

    try {
      // It is now time to load all VHost settings from the database:
      String vhosts_list = repo.getData(vhost_user, vhost_list_pkey);
      if (vhosts_list != null && !vhosts_list.isEmpty()) {
        DomBuilderHandler domHandler = new DomBuilderHandler();
        SimpleParser parser = SingletonFactory.getParserInstance();
        parser.parse(domHandler, vhosts_list.toCharArray(), 0,
                vhosts_list.length());
        Queue<Element> elems = domHandler.getParsedElements();
        if (elems != null && elems.size() > 0) {
          for (Element elem : elems) {
            VHostItem item = new VHostItem(elem);
View Full Code Here

Examples of tigase.xml.SimpleParser

          throws NotAuthorizedException, TigaseDBException {
    log.finest("Loading privacy list: " + list);
    String lNode = listNode(list);
    String list_str = session.getData(lNode, PRIVACY_LIST, null);
    if (list_str != null && !list_str.isEmpty()) {
      SimpleParser parser = SingletonFactory.getParserInstance();
      DomBuilderHandler domHandler = new DomBuilderHandler();
      parser.parse(domHandler, list_str.toCharArray(), 0, list_str.length());
      Queue<Element> elems = domHandler.getParsedElements();
      Element result = elems.poll();
      log.finest("Loaded privacy list: " + result.toString());
      return result;
    } else {
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.