<p>Query loader.</p>
@param pFileName File Name
@return String
@throws Exception - an exception
356773
public final String lazyGetQuery(final String pFileName) throws Exception {
    if (this.queries.get(pFileName) == null) {
      String flName = "/" + "accounting" + "/" + "trade"
          + "/" + pFileName + ".sql";
      this.queries.put(pFileName, loadString(flName));
    }
    return this.queries.get(pFileName);
  }
197783
public function getConfigByFilename(string $filename)
    {
        if (!isset($this->config[$filename])) {
            throw new Exception(
                'The file '.$filename.' has not been found',
                $this::ERR_FILE_NOT_FOUND
            );
        }
        
        return $this->config[$filename];
    }
558751
private static String getFileExtension(final String filename) {

		String extension = "";
		int i = filename.lastIndexOf('.');
		int p = Math.max(filename.lastIndexOf('/'), filename.lastIndexOf('\\'));
		if (i > p)
			extension = filename.substring(i+1);

		return extension;
	}
737006
public static String getFilename(final String pPath, final char pSeparator) {
        int index = pPath.lastIndexOf(pSeparator);

        if (index < 0) {
            return pPath; // Assume only filename
        }

        return pPath.substring(index + 1);
    }
687951
private File getFile(String xmlFilename) {

        File file = new File(m_basePath + xmlFilename);
        if (!file.exists() || !file.canRead()) {
            file = new File(xmlFilename);
        }
        return file;
    }
1038861
private static void query(String filename) throws Exception
   {
      ProjectFile mpx = new UniversalProjectReader().read(filename);

      listProjectProperties(mpx);

      listResources(mpx);

      listTasks(mpx);

      listAssignments(mpx);

      listAssignmentsByTask(mpx);

      listAssignmentsByResource(mpx);

      listHierarchy(mpx);

      listTaskNotes(mpx);

      listResourceNotes(mpx);

      listRelationships(mpx);

      listSlack(mpx);

      listCalendars(mpx);

   }
19911
protected function _openFile($pFilename)
	{
		// Check if file exists
		if (!file_exists($pFilename) || !is_readable($pFilename)) {
			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist.");
		}

		// Open file
		$this->_fileHandle = fopen($pFilename, 'r');
		if ($this->_fileHandle === FALSE) {
			throw new PHPExcel_Reader_Exception("Could not open file " . $pFilename . " for reading.");
		}
	}
348304
private int retrieveIndexValueFromFileName(String fileName) {
        int index = 0;
        if (fileName != null && !fileName.trim().isEmpty()) {
            index = Integer.parseInt(fileName.substring(fileName.lastIndexOf('-') + 1,
                    fileName.length() - EXTENSION.length()));
        }
        return index;
    }
945605
public function listWorksheetNames($pFilename)
    {
        // Check if file exists
        if (!file_exists($pFilename)) {
            throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist.");
        }
        if (!$this->canRead($pFilename)) {
            throw new PHPExcel_Reader_Exception($pFilename . " is an Invalid Spreadsheet file.");
        }

        $worksheetNames = array();

        $xml = simplexml_load_string($this->securityScan(file_get_contents($pFilename)), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions());
        $namespaces = $xml->getNamespaces(true);

        $xml_ss = $xml->children($namespaces['ss']);
        foreach ($xml_ss->Worksheet as $worksheet) {
            $worksheet_ss = $worksheet->attributes($namespaces['ss']);
            $worksheetNames[] = self::convertStringEncoding((string) $worksheet_ss['Name'], $this->charSet);
        }

        return $worksheetNames;
    }
495449
public static void loadViPersonalNames(String filename) {
		try {
			FileInputStream in = new FileInputStream(filename);
			if (hsViFamilyNames == null) {

				hsViFamilyNames = new HashSet();
				hsViLastNames = new HashSet();
				hsViMiddleNames = new HashSet();

				BufferedReader reader = new BufferedReader(
						new InputStreamReader(in, "UTF-8"));
				String line;
				while ((line = reader.readLine()) != null) {
					line = line.trim();
					if (line.equals(""))
						continue;

					//line = line.toLowerCase();
					int idxSpace = line.indexOf(' ');
					int lastIdxSpace = line.lastIndexOf(' ');

					if (idxSpace != -1) {
						String strFamilyName = line.substring(0, idxSpace);
						hsViFamilyNames.add(strFamilyName);
					}

					if ((idxSpace != -1) && (lastIdxSpace > idxSpace + 1)) {
						String strMiddleName = line.substring(idxSpace + 1,
								lastIdxSpace - 1);
						hsViMiddleNames.add(strMiddleName);
					}

					if (lastIdxSpace != -1) {
						String strLastName = line.substring(lastIdxSpace + 1,
								line.length());
						hsViLastNames.add(strLastName);
					}
				}
				in.close();
			}
		} catch (Exception e) {
			e.printStackTrace();
			System.err.print(e.getMessage());
		}
	}
1203419
private static List<String> loadRenameFile(URL url) throws IOException {
        try (BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream(), UTF_8))) {
            return reader.lines()
                    .filter(line -> !line.isEmpty() && !line.startsWith("#"))
                    .collect(toList());
        }
    }
114251
public function listWorksheetNames($pFilename)
	{
		// Check if file exists
		if (!file_exists($pFilename)) {
			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist.");
		}
		if (!$this->canRead($pFilename)) {
			throw new PHPExcel_Reader_Exception($pFilename . " is an Invalid Spreadsheet file.");
		}

		$worksheetNames = array();

		$xml = simplexml_load_file($pFilename);
		$namespaces = $xml->getNamespaces(true);

		$xml_ss = $xml->children($namespaces['ss']);
		foreach($xml_ss->Worksheet as $worksheet) {
			$worksheet_ss = $worksheet->attributes($namespaces['ss']);
			$worksheetNames[] = self::_convertStringEncoding((string) $worksheet_ss['Name'],$this->_charSet);
		}

		return $worksheetNames;
	}
827488
public function listWorksheetNames($pFilename)
	{
		// Check if file exists
		if (!file_exists($pFilename)) {
			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist.");
		}

		$worksheetNames = array();

		$zip = new ZipArchive;
		$zip->open($pFilename);

		//	The files we're looking at here are small enough that simpleXML is more efficient than XMLReader
		$rels = simplexml_load_string(
		    $this->_getFromZipArchive($zip, "_rels/.rels")
		); //~ http://schemas.openxmlformats.org/package/2006/relationships");
		foreach ($rels->Relationship as $rel) {
			switch ($rel["Type"]) {
				case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument":
					$xmlWorkbook = simplexml_load_string(
					    $this->_getFromZipArchive($zip, "{$rel['Target']}")
					);  //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main");

					if ($xmlWorkbook->sheets) {
						foreach ($xmlWorkbook->sheets->sheet as $eleSheet) {
							// Check if sheet should be skipped
							$worksheetNames[] = (string) $eleSheet["name"];
						}
					}
			}
		}

		$zip->close();

		return $worksheetNames;
	}
536177
public function listWorksheetInfo($pFilename)
	{
		// Check if file exists
		if (!file_exists($pFilename)) {
			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist.");
		}

		$worksheetInfo = array();

		$xml = simplexml_load_file($pFilename);
		$namespaces = $xml->getNamespaces(true);

		$worksheetID = 1;
		$xml_ss = $xml->children($namespaces['ss']);
		foreach($xml_ss->Worksheet as $worksheet) {
			$worksheet_ss = $worksheet->attributes($namespaces['ss']);

			$tmpInfo = array();
			$tmpInfo['worksheetName'] = '';
			$tmpInfo['lastColumnLetter'] = 'A';
			$tmpInfo['lastColumnIndex'] = 0;
			$tmpInfo['totalRows'] = 0;
			$tmpInfo['totalColumns'] = 0;

			if (isset($worksheet_ss['Name'])) {
				$tmpInfo['worksheetName'] = (string) $worksheet_ss['Name'];
			} else {
				$tmpInfo['worksheetName'] = "Worksheet_{$worksheetID}";
			}

			if (isset($worksheet->Table->Row)) {
				$rowIndex = 0;

				foreach($worksheet->Table->Row as $rowData) {
					$columnIndex = 0;
					$rowHasData = false;

					foreach($rowData->Cell as $cell) {
						if (isset($cell->Data)) {
							$tmpInfo['lastColumnIndex'] = max($tmpInfo['lastColumnIndex'], $columnIndex);
							$rowHasData = true;
						}

						++$columnIndex;
					}

					++$rowIndex;

					if ($rowHasData) {
						$tmpInfo['totalRows'] = max($tmpInfo['totalRows'], $rowIndex);
					}
				}
			}

			$tmpInfo['lastColumnLetter'] = PHPExcel_Cell::stringFromColumnIndex($tmpInfo['lastColumnIndex']);
			$tmpInfo['totalColumns'] = $tmpInfo['lastColumnIndex'] + 1;

			$worksheetInfo[] = $tmpInfo;
			++$worksheetID;
		}

		return $worksheetInfo;
	}
889202
public function load($pFilename)
    {
        // Create new PHPExcel
        $objPHPExcel = new PHPExcel();
        $objPHPExcel->removeSheetByIndex(0);

        // Load into this instance
        return $this->loadIntoExisting($pFilename, $objPHPExcel);
    }
19263
public static PCM loadPCM(String filename) throws IOException {

        PCMContainer pcmContainer = loadPCMContainer(filename);
        // Get the PCM
        PCM pcm = pcmContainer.getPcm();

        return pcm ;
    }
1037092
public function listWorksheetNames($pFilename)
	{
		// Check if file exists
		if (!file_exists($pFilename)) {
			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist.");
		}

		$zip = new ZipArchive;
		if (!$zip->open($pFilename)) {
			throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! Error opening file.");
		}

		$worksheetNames = array();

		$xml = new XMLReader();
		$res = $xml->open('zip://'.realpath($pFilename).'#content.xml');
		$xml->setParserProperty(2,true);

		//	Step into the first level of content of the XML
		$xml->read();
		while ($xml->read()) {
			//	Quickly jump through to the office:body node
			while ($xml->name !== 'office:body') {
				if ($xml->isEmptyElement)
					$xml->read();
				else
					$xml->next();
			}
			//	Now read each node until we find our first table:table node
			while ($xml->read()) {
				if ($xml->name == 'table:table' && $xml->nodeType == XMLReader::ELEMENT) {
					//	Loop through each table:table node reading the table:name attribute for each worksheet name
					do {
						$worksheetNames[] = $xml->getAttribute('table:name');
						$xml->next();
					} while ($xml->name == 'table:table' && $xml->nodeType == XMLReader::ELEMENT);
				}
			}
		}

		return $worksheetNames;
	}