我有这段代码:
var permissionCheck : File;
permissionCheck = new File(pdfFile.nativePath);
permissionCheck.addEventListener(PermissionEvent.PERMISSION_STATUS , function permissionStatusHandler( e : PermissionEvent ) :void
{
permissionCheck.removeEventListener(PermissionEvent.PERMISSION_STATUS , permissionStatusHandler);
if(e.status == PermissionStatus.GRANTED)
{
// save your file
pdfFolder = File.userDirectory.resolvePath(".Folder");
if(!pdfFolder.exists)
pdfFolder.createDirectory();
trace(pdfFolder.nativePath);
//pdfFile = File.applicationStorageDirectory.resolvePath("pdf/" +file);
var targetFile:File = File.userDirectory.resolvePath(".Folder/" +file);
trace(targetFile.nativePath);
if(targetFile.exists)
targetFile.deleteFile();
if(!targetFile.exists && pdfFile.exists)
{
try
{
pdfFile.copyTo(targetFile);
Template.showFile(targetFile.nativePath);
}
catch(error:Error)
{
Popup.showMessage("PDF Viewer", "Unable to open " + file + ". File does not exists. " + error.message);
trace("Error:" + error.message);
}
}
else
{
Popup.showMessage("PDF Viewer", "Unable to find " + file + ". File does not exists.");
}
}
else
{
//showPermissionError();
trace("Error"+ pdfFolder.nativePath);
}
});
try
{
permissionCheck.requestPermission();
}
catch(error : Error)
{
trace("Error:" + error.message);
}
}
我得到了这个输出:
如何从上面的输出中获取特定字符串, 谢谢您的帮助 最好的考虑
答案 0 :(得分:0)
您可以使用str
函数获取RDF文字的词法形式:
PREFIX : <http://www.semanticweb.org/user/ontologies/2016/karya_ilmiah#>
SELECT (str(?judulNaskahLit) AS ?judulNaskah) (str(?linkNaskahLit) AS ?linkNaskah)
WHERE {
?naskah :judulNaskah ?judulNaskahLit
FILTER regex(str(?judulNaskahLit), "Sistem Informasi Manajemen")
?naskah :linkNaskah ?linkNaskahLit
}
ORDER BY ?judulNaskah