Package org.dom4j

Examples of org.dom4j.Element.elementText()


    public static String determineMinimumWGAVersion(InputStream in) {
        String version = "(unknown)";
        try {
            Document doc = (new SAXReader()).read(in);
            Element wgaVersionElement = (Element) doc.selectSingleNode("//minimumWGAVersion");
            version = wgaVersionElement.elementText("majorVersion") + "." + wgaVersionElement.elementText("minorVersion") + "." + wgaVersionElement.elementText("maintenanceVersion");
        }
        catch (Exception ee) {
        }
        return version;
    }
View Full Code Here


    public static String determineMinimumWGAVersion(InputStream in) {
        String version = "(unknown)";
        try {
            Document doc = (new SAXReader()).read(in);
            Element wgaVersionElement = (Element) doc.selectSingleNode("//minimumWGAVersion");
            version = wgaVersionElement.elementText("majorVersion") + "." + wgaVersionElement.elementText("minorVersion") + "." + wgaVersionElement.elementText("maintenanceVersion");
        }
        catch (Exception ee) {
        }
        return version;
    }
View Full Code Here

   
    List<Element> nodes = doc.selectNodes("//Season[@no='"+show.getNextEpisode().getSeason()+"']/episode[seasonnum="+show.getNextEpisode().getEpisode()+"]");
    if (nodes.size() == 0) return;
    Element node = nodes.get(0);
   
    show.setNextEpisode(new Episode(show.getNextEpisode().toString(), node.elementText("title")));
   
    Calendar cal = Calendar.getInstance();
    cal.setTime(dateFormat.parse(node.elementText("airdate")));
    cal.add(Calendar.DAY_OF_MONTH, 1);
    show.setNextAirDate(cal.getTime());
View Full Code Here

    Element node = nodes.get(0);
   
    show.setNextEpisode(new Episode(show.getNextEpisode().toString(), node.elementText("title")));
   
    Calendar cal = Calendar.getInstance();
    cal.setTime(dateFormat.parse(node.elementText("airdate")));
    cal.add(Calendar.DAY_OF_MONTH, 1);
    show.setNextAirDate(cal.getTime());
   
    WatchListController.showInfoCompleted(show);
    DownloadTrigger.trigger(show);
View Full Code Here

            {
                // Not a 'fileType' element. skip.
                return;
            }

            String id = elem.elementText( "id" );
            Element patternsElem = elem.element( "patterns" );
            if ( patternsElem == null )
            {
                // No patterns. skip.
                return;
View Full Code Here

            {
                // Not a 'fileType' element. skip.
                return;
            }

            String id = elem.elementText( "id" );
            Element patternsElem = elem.element( "patterns" );
            if ( patternsElem == null )
            {
                // No patterns. skip.
                return;
View Full Code Here

        Document document = saxReader.read(in);
        Element root = document.getRootElement();
        Element eTileCacheInfo = root.element("TileCacheInfo");

        Element eTileOrigin = eTileCacheInfo.element("TileOrigin");
        this.jTextFieldOriginX.setText(eTileOrigin.elementText("X"));
        this.jTextFieldOriginY.setText(eTileOrigin.elementText("Y"));

        this.jTextFieldWidth.setText(eTileCacheInfo
            .elementText("TileCols"));
        this.jTextFieldHeight.setText(eTileCacheInfo
View Full Code Here

        Element root = document.getRootElement();
        Element eTileCacheInfo = root.element("TileCacheInfo");

        Element eTileOrigin = eTileCacheInfo.element("TileOrigin");
        this.jTextFieldOriginX.setText(eTileOrigin.elementText("X"));
        this.jTextFieldOriginY.setText(eTileOrigin.elementText("Y"));

        this.jTextFieldWidth.setText(eTileCacheInfo
            .elementText("TileCols"));
        this.jTextFieldHeight.setText(eTileCacheInfo
            .elementText("TileRows"));
View Full Code Here

        Element eLODInfos = eTileCacheInfo.element("LODInfos");
        for (Iterator iLODInfos = eLODInfos.elementIterator(); iLODInfos
            .hasNext();) {
          Element eLODInfo = (Element) iLODInfos.next();
          TileLodInfo tileLodInfo = new TileLodInfo();
          tileLodInfo.setLevel(Integer.valueOf(eLODInfo
              .elementText("LevelID")));
          tileLodInfo.setScale(Double.valueOf(eLODInfo
              .elementText("Scale")));
          tileLodInfo.setResolution(Double.valueOf(eLODInfo
              .elementText("Resolution")));
View Full Code Here

            .hasNext();) {
          Element eLODInfo = (Element) iLODInfos.next();
          TileLodInfo tileLodInfo = new TileLodInfo();
          tileLodInfo.setLevel(Integer.valueOf(eLODInfo
              .elementText("LevelID")));
          tileLodInfo.setScale(Double.valueOf(eLODInfo
              .elementText("Scale")));
          tileLodInfo.setResolution(Double.valueOf(eLODInfo
              .elementText("Resolution")));

          LodItem item = new LodItem();
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.