|
@@ -1,550 +0,0 @@
|
|
|
-/*
|
|
|
- * To change this template, choose Tools | Templates
|
|
|
- * and open the template in the editor.
|
|
|
- */
|
|
|
-package de.nplusc.izc.iZpl.Utils;
|
|
|
-
|
|
|
-import de.nplusc.izc.iZpl.API.MultiPlayListItem;
|
|
|
-import de.nplusc.izc.iZpl.API.PlayListItem;
|
|
|
-import de.nplusc.izc.iZpl.API.SinglePlayListItem;
|
|
|
-import de.nplusc.izc.iZpl.Main;
|
|
|
-import de.nplusc.izc.tools.IOtools.FileTK;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Arrays;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.LinkedHashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Set;
|
|
|
-import org.apache.logging.log4j.LogManager;
|
|
|
-import org.apache.logging.log4j.Logger;
|
|
|
-import org.yaml.snakeyaml.Yaml;
|
|
|
-
|
|
|
-/**
|
|
|
- *
|
|
|
- * @author LH
|
|
|
- */
|
|
|
-public class PLReader
|
|
|
-{
|
|
|
-
|
|
|
- private static final Logger l = LogManager.getLogger();
|
|
|
-
|
|
|
- //Formatdefinition //basiert aufne verpackte #extm3u
|
|
|
- /*
|
|
|
- * #EXTM3U
|
|
|
- * #iZPl
|
|
|
- * #EXTINFO.......//Die VLC-Daten
|
|
|
- * #IZPL:PrioMultiplier|GroupID (IDS !=0 sind Verbunden. 0er immer einzeln)
|
|
|
- * /Pfad/zu/File1.mp3
|
|
|
- * //Defaultet zu 1,0 falls nicht gefunden
|
|
|
- * #IZPL:INCLUDE|PrioMultiplier|Expand//INCLUDE sagt dass hier ne referenzierte IZPL liegt Expand sagt Liste kann aufgeteilt werden
|
|
|
- * /Pfad/zu/andererListe.iZpl //prioMultiplier bei include mutipliziert Multiopliers des Includes
|
|
|
- * #IZPL:INCLUDE|PrioMultiplier|NoExpand //NoExpand sagt dass File Als ein Block behandelt werden muss (Includes innerhalb werden auch beachtet aber keine multiplizierungen eingebaut
|
|
|
- * /Pfad/zu/UnsplittbarerListe.iZpl
|
|
|
- */
|
|
|
- private static Yaml yp = new Yaml();
|
|
|
- public static List<String[]> readList(String path)
|
|
|
- {
|
|
|
- return (readList(path,0));
|
|
|
- }
|
|
|
-
|
|
|
- public static List<String[]> readList(String path,boolean priorityLess)
|
|
|
- {
|
|
|
- return readList(path, 0, priorityLess);
|
|
|
- }
|
|
|
-
|
|
|
- public static List<String[]> readList(String path,int rd)
|
|
|
- {
|
|
|
- return readList(path, rd, false);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- public static List<String[]> readList(String path,int rd,boolean priorityLess)
|
|
|
- {
|
|
|
-
|
|
|
- HashMap<Integer,List<String>> GroupStorage = new LinkedHashMap<>();
|
|
|
- List<String[]> BloxBuffr = new ArrayList<>();
|
|
|
- List<String[]> mergedLists = new ArrayList<>();
|
|
|
- String[] playListRaw = FileTK.fileload(path);//temporär ne bestimmte hardcoden
|
|
|
- GroupStorage.put(0,new ArrayList<>());//MUSS_EXISTIEREN!!!
|
|
|
- if(playListRaw.length<2)
|
|
|
- {
|
|
|
- Main.gotAIssue();
|
|
|
- return null;
|
|
|
- }
|
|
|
- if(playListRaw[0].equals("#EXTM3U"))//&&playListRaw[1].equals("#IZPL"))//HEaderValidate
|
|
|
- {
|
|
|
- if(!playListRaw[1].equals("#IZPL"))
|
|
|
- {
|
|
|
- String[] block = new String[]{"","",""};
|
|
|
- l.trace(">>EnterPlainPL");
|
|
|
- for (int i = 1; i < playListRaw.length-1; i++)
|
|
|
- {
|
|
|
- String line = playListRaw[i];
|
|
|
- //@blox: 0 ist die extinf;1 die #IZPL-Zone 2 der filename
|
|
|
- if(line.startsWith("EXTINF:"))
|
|
|
- {
|
|
|
- block[0]=line;
|
|
|
- block[1]="#IZPL:1|0";
|
|
|
- i++;
|
|
|
- line = playListRaw[i];
|
|
|
- block[2]=line;
|
|
|
- BloxBuffr.add(block);
|
|
|
- block=new String[3];
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- block[0]="";
|
|
|
- block[1]="#IZPL:1|0";
|
|
|
- block[2]=line;
|
|
|
- BloxBuffr.add(block);
|
|
|
- block=new String[3];
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- l.trace(">>EnteriIZinkedPL");
|
|
|
- int bstart=0;
|
|
|
- int bl=0;
|
|
|
- String[] block = new String[3];
|
|
|
- for (int i = 2; i < playListRaw.length-1; i++)
|
|
|
- {
|
|
|
-
|
|
|
- String line = playListRaw[i];
|
|
|
- if(line.startsWith("#EXTINF:"))
|
|
|
- {
|
|
|
- bl=3;
|
|
|
- bstart=i;
|
|
|
- block[0]=line;//EXTINF wird durchgepipe'd
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
-
|
|
|
- if(bl>0)//IN_BLOCK
|
|
|
- {
|
|
|
- int it=i-bstart;
|
|
|
- l.trace(it+"");
|
|
|
-
|
|
|
- block[it]=line;
|
|
|
- if(bstart+bl-1==i)
|
|
|
- {
|
|
|
- BloxBuffr.add(block);
|
|
|
- block=new String[3];
|
|
|
- bl=0;
|
|
|
- bstart=0;
|
|
|
- }
|
|
|
- }
|
|
|
- else//START_BLOCK
|
|
|
- {
|
|
|
- bl=0;
|
|
|
- block[0]="";
|
|
|
- if(playListRaw[i+1].startsWith("#EXTINF")||playListRaw[i+1].startsWith("#IZPL"))//erkennen von undefineds
|
|
|
- {
|
|
|
- block[2]=line;
|
|
|
- block[1]="#IZPL:1|0";
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- block[1]=line;
|
|
|
- i++;
|
|
|
- block[2]=playListRaw[i];
|
|
|
- }
|
|
|
- BloxBuffr.add(block);
|
|
|
- block=new String[3];
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- int sublistsFound = 0;
|
|
|
- for (String[] blox : BloxBuffr)//0 ist die extinf;1 die #IZPL-Zone 2 der filename
|
|
|
- {
|
|
|
- l.trace("|>"+blox[0]+"\n"+blox[1]+"\n"+blox[2]+"\n");
|
|
|
- String[] metadata = blox[1].substring(6).split("\\|");
|
|
|
- if(metadata[0].equalsIgnoreCase("INCLUDE"))//muss noch nen Detektor für NoExpand einbauen|erledigt
|
|
|
- {
|
|
|
- l.trace("<<< Include");
|
|
|
- if(metadata[2].equalsIgnoreCase("NOEXPAND"))
|
|
|
- {
|
|
|
- l.trace("<°())))<Include");
|
|
|
- int priomult=Integer.valueOf(metadata[1].trim());
|
|
|
- if(priorityLess)
|
|
|
- priomult=1;
|
|
|
- int runs = 0;
|
|
|
- while(runs<priomult)
|
|
|
- {
|
|
|
- sublistsFound++;
|
|
|
- String lfid = blox[2];
|
|
|
- if(!lfid.substring(1,2).equals(":"))//absoluterPfad
|
|
|
- {
|
|
|
- lfid=FileTK.getFilePath(path)+"\\"+lfid;
|
|
|
- }
|
|
|
- l.trace(lfid);
|
|
|
- List<String[]> subList = readList(lfid,rd+1,priorityLess);
|
|
|
- Main.gotAIssue(false);//überdeckt Sublisten-Errors bei Rekursion, da dann ja etwas zurückkommt
|
|
|
- List<String> target = new ArrayList<>();
|
|
|
- String[] group0 = subList.get(0);
|
|
|
- target.addAll(Arrays.asList(group0));//merged die Gruppe 0 die einzeleinträge enthält
|
|
|
- for (int i = 1; i < subList.size(); i++)
|
|
|
- {
|
|
|
- target.addAll(Arrays.asList(subList.get(i)));
|
|
|
- }
|
|
|
- GroupStorage.put((10000*sublistsFound)+1,target);
|
|
|
- runs++;
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- l.trace(">(((()°> Include");
|
|
|
- int priomult=Integer.valueOf(metadata[1].trim());
|
|
|
- if(priorityLess)
|
|
|
- priomult=1;
|
|
|
- int runs = 0;
|
|
|
- while(runs<priomult)
|
|
|
- {
|
|
|
- sublistsFound++;
|
|
|
- String lfid = blox[2];
|
|
|
- if(!lfid.substring(1,2).equals(":"))//absoluterPfad
|
|
|
- {
|
|
|
- lfid=FileTK.getFilePath(path)+"\\"+lfid;
|
|
|
- }
|
|
|
- l.trace(lfid);
|
|
|
- List<String[]> subList = readList(lfid,rd+1,priorityLess);
|
|
|
- Main.gotAIssue(false);//überdeckt Sublisten-Errors bei Rekursion, da dann ja etwas zurückkommt
|
|
|
- String[] group0 = subList.get(0);
|
|
|
- GroupStorage.get(0).addAll(Arrays.asList(group0));//merged die Gruppe 0 die einzeleinträge enthält
|
|
|
- for (int i = 1; i < subList.size(); i++)
|
|
|
- {
|
|
|
- List<String> target = Arrays.asList(subList.get(i));
|
|
|
- GroupStorage.put((10000*sublistsFound)+i,target);
|
|
|
- }
|
|
|
- runs++;
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- int priomult=Integer.valueOf(metadata[0].trim());
|
|
|
- if(priorityLess)
|
|
|
- priomult=1;
|
|
|
- int gid=Integer.valueOf(metadata[1].trim());
|
|
|
- if(!GroupStorage.containsKey(gid))
|
|
|
- {
|
|
|
- GroupStorage.put(gid,new ArrayList<String>());
|
|
|
- }
|
|
|
- List<String> ge = GroupStorage.get(gid);
|
|
|
- String entry = blox[0]+"\n"+blox[2];
|
|
|
- for (int i = 0; i < priomult; i++)//setzt die Priorität um durch mehrfacheintragung.....
|
|
|
- {
|
|
|
- l.trace(">>>"+entry);
|
|
|
- ge.add(entry);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- List<String> gid0 = GroupStorage.get(0);
|
|
|
- GroupStorage.remove(0);
|
|
|
- String[] gtmp = new String[gid0.size()];
|
|
|
- for (int i = 0; i < gid0.size(); i++)
|
|
|
- {
|
|
|
- gtmp[i]= gid0.get(i);
|
|
|
-
|
|
|
- }
|
|
|
- mergedLists.add(gtmp);
|
|
|
- Set<Integer> s = GroupStorage.keySet();
|
|
|
- for (Integer k : s)
|
|
|
- {
|
|
|
- List<String> temp = GroupStorage.get(k);
|
|
|
- gtmp = new String[temp.size()];
|
|
|
- for (int i = 0; i < gtmp.length; i++)
|
|
|
- {
|
|
|
- gtmp[i]=temp.get(i);
|
|
|
- }
|
|
|
- mergedLists.add(gtmp);
|
|
|
- }
|
|
|
- l.trace("NOP");
|
|
|
- l.trace("ArrayResult of reading in:"+path);
|
|
|
- l.trace("Depth:"+rd);
|
|
|
- l.trace("\n"+yp.dump(mergedLists));//macht das log leichter parsbar in NPP mit Ansicht=yaml
|
|
|
- l.trace("ENd of Block:"+path);
|
|
|
- l.trace("###########################################################################");
|
|
|
- l.trace("---------------------------------------------------------------------------");
|
|
|
- l.trace("###########################################################################");
|
|
|
-
|
|
|
- return mergedLists;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- private static List<String[]> readListAlternativeNoexpandAux(String path,int rd)
|
|
|
- {
|
|
|
- List<String[]> retval = new ArrayList<>();
|
|
|
- if(rd<0)//zählt runter um beliebigen startwert z erlauben :P
|
|
|
- {
|
|
|
- return retval;//leere hashmap :P
|
|
|
- }
|
|
|
- List<String[]> tempo = readListAlternativeAuxPrepare(path);
|
|
|
- if(tempo!=null)
|
|
|
- {
|
|
|
- for (String[] elements : tempo)
|
|
|
- {
|
|
|
- String lfid=elements[0];
|
|
|
- if(lfid==null||lfid.equals("null"))
|
|
|
- {
|
|
|
- continue;
|
|
|
- }
|
|
|
- if(!lfid.substring(1,2).equals(":"))//absoluterPfad
|
|
|
- {
|
|
|
- lfid=FileTK.getFilePath(path)+"\\"+lfid;
|
|
|
- }
|
|
|
- elements[0]=lfid;
|
|
|
-
|
|
|
-
|
|
|
- String[] metadata=elements[2].substring(6).split("\\|");
|
|
|
- if(metadata[0].equalsIgnoreCase("include"))
|
|
|
- {
|
|
|
- l.trace("incl;"+elements[0]);
|
|
|
- retval.addAll(readListAlternativeNoexpandAux(elements[0], rd-1));
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- retval.add(elements);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- l.trace("ArrayResult of reading in as NoExpa:"+path);
|
|
|
- l.trace("Depth:"+rd);
|
|
|
- l.trace("\n"+yp.dump(retval));//macht das log leichter parsbar in NPP mit Ansicht=yaml
|
|
|
- l.trace("ENd of Block:"+path);
|
|
|
- l.trace("###########################################################################");
|
|
|
- l.trace("---------------------------------------------------------------------------");
|
|
|
- l.trace("###########################################################################");
|
|
|
-
|
|
|
- return retval;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- private static List<String[]> readListAlternativeAuxPrepare(String path)
|
|
|
- {
|
|
|
- String[] playListRaw = FileTK.fileload(path);//temporär ne bestimmte hardcoden
|
|
|
- ArrayList<String> cleanup=new ArrayList<>();
|
|
|
- for (String line : playListRaw)
|
|
|
- {
|
|
|
- if(line!=null&&!line.equals("")&&line.length()>4)
|
|
|
- {
|
|
|
- cleanup.add(line);
|
|
|
- }
|
|
|
- }
|
|
|
- playListRaw=cleanup.toArray(playListRaw);
|
|
|
-
|
|
|
- ArrayList<String[]> tempo=new ArrayList<>();
|
|
|
- if(playListRaw.length>=2 && playListRaw[0].equalsIgnoreCase("#EXTM3U")&&playListRaw[1].equalsIgnoreCase("#IZPL"))
|
|
|
- {
|
|
|
- String[] buffer = new String[3]; //0 path; 1=extm3u,2=izpl-data
|
|
|
- int cntr=0;
|
|
|
- // erste zwo zeilen überspringen...
|
|
|
- // dann datei ummodeln...
|
|
|
- for (int i = 2; i < playListRaw.length; i++)
|
|
|
- {
|
|
|
- l.trace(i);
|
|
|
- String line = playListRaw[i];
|
|
|
- if(line!=null)
|
|
|
- {
|
|
|
- if(cntr==0&&line.startsWith("#EXTINF:"))
|
|
|
- {
|
|
|
- buffer[1]=line;
|
|
|
- cntr++;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- if((cntr==1||cntr==0)&&line.startsWith("#IZPL:"))
|
|
|
- {
|
|
|
- buffer[2]=line;cntr++;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- cntr=0;
|
|
|
- buffer[0]=line;
|
|
|
- tempo.add(buffer);
|
|
|
- buffer = new String[3];//<<ARSCHLOCH hatte dich vergessen ...
|
|
|
- buffer[0]="";
|
|
|
- buffer[1]="";
|
|
|
- buffer[2]="#IZPL:1|0";
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- tempo=null;
|
|
|
- }
|
|
|
- return tempo;
|
|
|
- }
|
|
|
- public static HashMap<String,PlayListItem> readListAlternative(String path, int rd,int prioritybase)
|
|
|
- {
|
|
|
- return readListAlternative(path, rd, prioritybase, false);
|
|
|
- }
|
|
|
-
|
|
|
- public static HashMap<String,PlayListItem> readListAlternative(String path, int rd,int prioritybase,boolean unexpandedIncludes)
|
|
|
- {
|
|
|
- HashMap<String,PlayListItem> retval = new LinkedHashMap<>();
|
|
|
- if(rd<0)//zählt runter um beliebigen startwert z erlauben :P
|
|
|
- {
|
|
|
- return retval;//leere hashmap :P
|
|
|
- }
|
|
|
-
|
|
|
- List<String[]> tempo = readListAlternativeAuxPrepare(path);
|
|
|
- l.trace("##########################Raw List input##############################################");
|
|
|
- l.trace(yp.dump(tempo));
|
|
|
- l.trace("#####################End Raw List input###############################################");
|
|
|
-
|
|
|
- if(tempo!=null)
|
|
|
- {
|
|
|
- //\\//\\//
|
|
|
- //0 pfad; 1=extinf;2=izpl;
|
|
|
- //verarbeiten.....
|
|
|
- HashMap<Integer,ArrayList<String[]>> groupprep = new LinkedHashMap<>();
|
|
|
- //groupprep.put(0,new ArrayList<String[]>());
|
|
|
- for (String[] elements : tempo)
|
|
|
- {
|
|
|
- String lfid=elements[0];
|
|
|
- if(lfid==null||lfid.equals("null"))
|
|
|
- {
|
|
|
- continue;
|
|
|
- }
|
|
|
- if(!lfid.substring(1,2).equals(":"))//absoluterPfad
|
|
|
- {
|
|
|
- lfid=FileTK.getFilePath(path)+"\\"+lfid;
|
|
|
- }
|
|
|
- elements[0]=lfid;
|
|
|
- String[] metadata=elements[2].substring(6).split("\\|");
|
|
|
- if(metadata[0].equalsIgnoreCase("include"))
|
|
|
- {
|
|
|
- l.trace("Includebranch");
|
|
|
- if(metadata[2].equalsIgnoreCase("EXPAND"))
|
|
|
- {
|
|
|
- if(!unexpandedIncludes)
|
|
|
- {
|
|
|
- HashMap<String,PlayListItem> recurseret = readListAlternative(elements[0], rd-1, Integer.valueOf(metadata[1].trim()));//nätig in beiden fällen
|
|
|
- Set<String> keys= recurseret.keySet();
|
|
|
- for (String itemkey : keys)
|
|
|
- {
|
|
|
- PlayListItem pli = recurseret.get(itemkey);
|
|
|
- if(pli instanceof SinglePlayListItem)//multiitems instapasthru
|
|
|
- {
|
|
|
- if(retval.containsKey(pli+""))
|
|
|
- {
|
|
|
- PlayListItem tpli = retval.get(pli+"");
|
|
|
- tpli.setTargetPlaycount(tpli.getTargetPlaycount()+prioritybase*pli.getTargetPlaycount());
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- retval.put(pli+"",pli);
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- retval.put(pli+"",pli);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- SinglePlayListItem includeList = new SinglePlayListItem(elements[0], FileTK.getFileName(elements[0]), Integer.valueOf(metadata[1].trim()), true,false);
|
|
|
- retval.put(includeList+"",includeList);
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- if(!unexpandedIncludes)
|
|
|
- {
|
|
|
- MultiPlayListItem pli = new MultiPlayListItem(new String[]{}, new String[]{}, Integer.valueOf(metadata[1].trim())*prioritybase);
|
|
|
- //target der liste :P
|
|
|
- List<String[]> listraw = readListAlternativeNoexpandAux(elements[0], rd-1);
|
|
|
- for (String[] item : listraw)
|
|
|
- {
|
|
|
- pli.addTitle(item[0], item[1]);
|
|
|
- }
|
|
|
- pli.setSrc("Block from: "+elements[0]);
|
|
|
- retval.put(pli+"", pli);//multiItems sind nicht mit pfad referenziert...
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- SinglePlayListItem includeList = new SinglePlayListItem(elements[0], FileTK.getFileName(elements[0]), Integer.valueOf(metadata[1].trim()), true,true);
|
|
|
- retval.put(includeList+"",includeList);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- //1,0=fefault :P
|
|
|
- int gid = Integer.valueOf(metadata[1].trim());
|
|
|
- if(gid>0)
|
|
|
- {
|
|
|
- if(unexpandedIncludes)
|
|
|
- throw new UnsupportedOperationException("Anordnungsrelevante daten, kann nicht pasrsen fpür editor");
|
|
|
- if(!groupprep.containsKey(gid))
|
|
|
- {
|
|
|
- groupprep.put(gid,new ArrayList<String[]>());
|
|
|
- }
|
|
|
- List<String[]> groupcontent = groupprep.get(gid);
|
|
|
- groupcontent.add(elements);//kein dupecheck da liste auch widerholungen enthalten kann; dupecheck nur bei einzel da dort aufsummiert wird :P
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- PlayListItem it = new SinglePlayListItem(elements[0], elements[1], Integer.valueOf(metadata[0].trim())*prioritybase);
|
|
|
- if(retval.containsKey(it+""))//summieren...
|
|
|
- {
|
|
|
- it = retval.get(it+"");
|
|
|
- int cpc = it.getTargetPlaycount();
|
|
|
- it.setTargetPlaycount(cpc+(prioritybase*Integer.valueOf(metadata[0].trim())));//zusammenaddieren da unter dem =en path nur das selbe lied liegen kann also de-dupe
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
-
|
|
|
- retval.put(it+"",it);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- Set<Integer> keys = groupprep.keySet();
|
|
|
- for (Integer i:keys)
|
|
|
- {
|
|
|
- tempo=groupprep.get(i); //HAXX
|
|
|
- MultiPlayListItem pli = new MultiPlayListItem(new String[]{}, new String[]{}, prioritybase*Integer.valueOf(tempo.get(0)[2].substring(6).split("\\|")[1].trim()));
|
|
|
-
|
|
|
- for (String[] elem : tempo)
|
|
|
- {
|
|
|
- String lfid=elem[0];
|
|
|
- if(!lfid.substring(1,2).equals(":"))//absoluterPfad
|
|
|
- {
|
|
|
- lfid=FileTK.getFilePath(path)+"\\"+lfid;
|
|
|
- }
|
|
|
- elem[0]=lfid;
|
|
|
- pli.addTitle(elem[0], elem[1]);
|
|
|
- }
|
|
|
- pli.setSrc("Group No "+i+" from file:"+path);
|
|
|
- retval.put(pli+"", pli);//multiItems sind nicht mit pfad referenziert... außer NoexpandIncludes
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- l.trace("ArrayResult of reading in:"+path);
|
|
|
- l.trace("Depth:"+rd);
|
|
|
- l.trace("\n"+yp.dump(retval));//macht das log leichter parsbar in NPP mit Ansicht=yaml
|
|
|
- l.trace("ENd of Block:"+path);
|
|
|
- l.trace("###########################################################################");
|
|
|
- l.trace("---------------------------------------------------------------------------");
|
|
|
- l.trace("###########################################################################");
|
|
|
-
|
|
|
- return retval;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-}
|