Skip to content

Commit

Permalink
Merge pull request #12 from DigitalPlatform/master
Browse files Browse the repository at this point in the history
同步源
  • Loading branch information
renyh1013 committed Apr 17, 2016
2 parents 3c6dae5 + 3cb2dc9 commit 079e128
Show file tree
Hide file tree
Showing 37 changed files with 1,625 additions and 506 deletions.
8 changes: 3 additions & 5 deletions DigitalPlatform.KernelService/KernelService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static class GlobalVars
* */

[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple,
Namespace="http://dp2003.com/dp2kernel/")]
Namespace = "http://dp2003.com/dp2kernel/")]
public class KernelService : IKernelService, IDisposable
{
KernelApplication app = null;
Expand Down Expand Up @@ -1381,8 +1381,7 @@ public Result GetRecords(
// result:
// Result对象,
// value == -1 出错
// >= 1 结果集的总数
// == 0 0条
// == 0 成功
public Result GetBrowse(
string[] paths,
string strStyle,
Expand All @@ -1396,7 +1395,6 @@ public Result GetBrowse(

try
{

if (this.sessioninfo.UserName == "")
{
result.Value = -1;
Expand Down Expand Up @@ -2824,7 +2822,7 @@ public Result BatchTask(
string strName,
string strAction,
TaskInfo info,
out TaskInfo [] results)
out TaskInfo[] results)
{
string strError = "";
results = null;
Expand Down
23 changes: 18 additions & 5 deletions DigitalPlatform.LibraryServer/AppBiblio.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,20 @@ int BatchGetBiblioSummary(
}

// 获得书目信息
// 可以用多种格式:xml html text @??? summary outputpath
//
// TODO: 将来可以增加在strBiblioRecPath中允许多种检索入口的能力,比方说允许使用itembarcode和itemconfirmpath(甚至和excludebibliopath)结合起来定位种。这样就完全可以取代原有GetBiblioSummary API的功能
// parameters:
// strBiblioRecPath 种记录路径。如果在最后接续"$prev" "$next",表示前一条或后一条。
// formats 希望获得信息的若干格式。如果 == null,表示希望只返回timestamp (results返回空)
// 可以用多种格式:xml html text @??? summary outputpath
// Result.Value -1出错 0没有找到 1找到
// 附注:
// 1)
// 如果 strBiblioRecPath 为 @path-list: 引导的成批检索式,并且 formats 为唯一一个 "summary" 元素,则表示希望批获取摘要
// 批检索式,为逗号间隔的元素列表,每个元素为 @itemBarcode: 或 @bibliorecpath 引导的内容
// results 中每个元素为一个 summary 内容
// 2)
// 如果 strBiblioRecPath 为 @path-list: 引导的成批检索式,format 为多种格式,则 results 中会返回 格式个数 X 检索词数量 这么多的元素
public LibraryServerResult GetBiblioInfos(
SessionInfo sessioninfo,
string strBiblioRecPath,
Expand All @@ -197,6 +205,7 @@ public LibraryServerResult GetBiblioInfos(
}

if (formats != null && formats.Length == 1 && formats[0] == "summary"
&& strBiblioRecPath.StartsWith("@path-list:") // 2016/4/15 增加
&& string.IsNullOrEmpty(strBiblioXmlParam) == true)
{
List<String> temp_results = null;
Expand Down Expand Up @@ -236,9 +245,13 @@ public LibraryServerResult GetBiblioInfos(
List<string> commands = new List<string>();
List<string> biblio_records = new List<string>();

if (StringUtil.HasHead(strBiblioRecPath, "@path-list:") == true)
if (StringUtil.HasHead(strBiblioRecPath, "@path-list:") == true
|| strBiblioRecPath.IndexOf(",") != -1) // 2016/4/15 增加
{
string strText = strBiblioRecPath.Substring("@path-list:".Length);
string strText = strBiblioRecPath;
if (StringUtil.HasHead(strBiblioRecPath, "@path-list:") == true)
strText = strBiblioRecPath.Substring("@path-list:".Length);

commands = StringUtil.SplitList(strText);

// 如果前端发来记录,需要切割为独立的字符串
Expand Down Expand Up @@ -3324,9 +3337,9 @@ public int MessageNotify(
return -1;
}
}
strReaderEmailAddress = DomUtil.GetElementText(readerdom.DocumentElement,
string strValue = DomUtil.GetElementText(readerdom.DocumentElement,
"email");

strReaderEmailAddress = LibraryApplication.GetEmailAddress(strValue);
if (String.IsNullOrEmpty(strReaderEmailAddress) == true)
continue;
}
Expand Down
Loading

0 comments on commit 079e128

Please sign in to comment.