当前位置: 首页>>代码示例>>Java>>正文


Java HandleManager类代码示例

本文整理汇总了Java中org.dspace.handle.HandleManager的典型用法代码示例。如果您正苦于以下问题:Java HandleManager类的具体用法?Java HandleManager怎么用?Java HandleManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


HandleManager类属于org.dspace.handle包,在下文中一共展示了HandleManager类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: disseminateList

import org.dspace.handle.HandleManager; //导入依赖的package包/类
@Override
public void disseminateList(Context context, List<Item> items, OutputStream out) throws CrosswalkException, IOException, SQLException, AuthorizeException {
    XWPFDocument document = new XWPFDocument();

    for (Item item : items) {
        if (canDisseminate(context, item)) {
            String citationText = getFirstNonBlankValue(item, "dc", "identifier", "citation");
            String abstractText = getFirstNonBlankValue(item, "dc", "description", "abstract");
            String handleUrl = HandleManager.getCanonicalForm(item.getHandle());

            processSingleItem(document, citationText, abstractText, handleUrl);
        } else {
            log.warn("Cannot disseminate " + item.getTypeText() + " id=" + item.getID() + ", skipping");
        }
    }

    document.write(out);
    out.flush();
}
 
开发者ID:UoW-IRRs,项目名称:API-Extras,代码行数:20,代码来源:WordCitationExportCrosswalk.java

示例2: findCollections

import org.dspace.handle.HandleManager; //导入依赖的package包/类
private static List<Collection> findCollections(Context context, String identifierString) throws SQLException {
	List<Collection> result = new ArrayList<>();
	if (identifierString.matches("^\\d+$")) {
		int collectionId = Integer.parseInt(identifierString);
		Collection collection = Collection.find(context, collectionId);
		if (collection != null) {
			result.add(collection);
		}
	}
	if (identifierString.matches("^\\d+/\\d+$")) {
		DSpaceObject dso = HandleManager.resolveToObject(context, identifierString);
		if (dso != null) {
			if (dso instanceof Collection) {
				result.add((Collection) dso);
			} else if (dso instanceof Community) {
				Community parent = (Community) dso;
				Collections.addAll(result, parent.getAllCollections());
			}
		}
	}
	return result;
}
 
开发者ID:UoW-IRRs,项目名称:DSpace-Scripts,代码行数:23,代码来源:CopyCollectionConfiguration.java

示例3: setup

import org.dspace.handle.HandleManager; //导入依赖的package包/类
@Override
public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) throws ProcessingException, SAXException, IOException {
	super.setup(resolver, objectModel, src, par);

	try {
		this.request = ObjectModelHelper.getRequest(objectModel);
		this.response = ObjectModelHelper.getResponse(objectModel);
		context = ContextUtil.obtainContext(objectModel);

		String handle = par.getParameter("handle");
		DSpaceObject dso = HandleManager.resolveToObject(context, handle);
		item = (Item) dso;

		filename = "cite-" + handle.replaceAll("/", "-") + ".ris";
	} catch (SQLException | ParameterException e) {
		throw new ProcessingException("Unable to export citation.", e);
	}
}
 
开发者ID:UoW-IRRs,项目名称:XMLUI-Extras,代码行数:19,代码来源:ItemCitationExporter.java

示例4: disseminate

import org.dspace.handle.HandleManager; //导入依赖的package包/类
@Override
public void disseminate(Context context, Item item, OutputStream out) throws CrosswalkException, IOException, SQLException, AuthorizeException {
    XWPFDocument document = new XWPFDocument();

    String citationText = getFirstNonBlankValue(item, "dc", "identifier", "citation");
    String abstractText = getFirstNonBlankValue(item, "dc", "description", "abstract");
    String handleUrl = HandleManager.getCanonicalForm(item.getHandle());

    processSingleItem(document, citationText, abstractText, handleUrl);

    document.write(out);
    out.flush();
}
 
开发者ID:UoW-IRRs,项目名称:API-Extras,代码行数:14,代码来源:WordCitationExportCrosswalk.java

示例5: processLine

import org.dspace.handle.HandleManager; //导入依赖的package包/类
@Override
public String[] processLine(String[] inputLine, int index) throws ConfigurationException, PostProcessingException {
    String[] result = inputLine.clone();
    result[index] = HandleManager.getCanonicalForm(inputLine[index]);
    return result;
}
 
开发者ID:UoW-IRRs,项目名称:API-Extras,代码行数:7,代码来源:HandleToCanonicalForm.java


注:本文中的org.dspace.handle.HandleManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。