plugin/src/java/org/pm4knime/node/io/petrinet/writer/MarkingReaderWriter.java
public List<String[]> readMarking(String fileName) throws IOException {
		// the first is init and then final marking
		File mFile = new File(fileName);
		if(!mFile.exists()) {
			throw new IOException("file not exist!");
		}
		
		FileReader reader = new FileReader(mFile);
		BufferedReader bReader = new BufferedReader(reader);
		String line = bReader.readLine();
		// we can only get the id for one place
		List<String[]> mList = new ArrayList<>();
		int idx = 0;
		while(line != null) {
			
			// get the init marking
			String[] mPlaceId = line.split(";");
			// split the string with : and then 
			
			mList.add(idx++, mPlaceId);
			line = bReader.readLine();
		}
		reader.close();
		bReader.close();
		return mList;
	}
// we need post precoess it with the net and build the markings on it
we need post precoess it with the net and build the markings on it
we need post precoess it with the net and build the markings on it
public List<String[]> readMarking(String fileName) throws IOException {
		File mFile = new File(fileName);
		if(!mFile.exists()) {
			throw new IOException("file not exist!");
		}
		FileReader reader = new FileReader(mFile);
		BufferedReader bReader = new BufferedReader(reader);
		String line = bReader.readLine();
		List<String[]> mList = new ArrayList<>();
		int idx = 0;
		while(line != null) {
			String[] mPlaceId = line.split(";");
			mList.add(idx++, mPlaceId);
			line = bReader.readLine();
		}
		reader.close();
		bReader.close();
		return mList;
	}
public List < String [ ] > readMarking ( String fileName ) throws IOException { File mFile = new File ( fileName ) ; if ( ! mFile . exists ( ) ) { throw new IOException ( "file not exist!" ) ; } FileReader reader = new FileReader ( mFile ) ; BufferedReader bReader = new BufferedReader ( reader ) ; String line = bReader . readLine ( ) ; List < String [ ] > mList = new ArrayList < > ( ) ; int idx = 0 ; while ( line != null ) { String [ ] mPlaceId = line . split ( ";" ) ; mList . add ( idx ++ , mPlaceId ) ; line = bReader . readLine ( ) ; } reader . close ( ) ; bReader . close ( ) ; return mList ; }
we need post precoess it with the net and build the markings on it
we need post precoess it with the net and build the markings on it
// the first is init and then final marking // we can only get the id for one place // get the init marking // split the string with : and then 