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


Java Element类代码示例

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


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

示例1: createBasicInteractionMessage

import org.apache.abdera.model.Element; //导入依赖的package包/类
private Entry createBasicInteractionMessage(final String id,
		final String runId) {
	final Entry interactionNotificationMessage = ABDERA.newEntry();

	interactionNotificationMessage.setId(id);
	final Date timestamp = new Date();
	interactionNotificationMessage.setPublished(timestamp);
	interactionNotificationMessage.setUpdated(timestamp);

	interactionNotificationMessage.addAuthor("Taverna");
	interactionNotificationMessage.setTitle("Interaction from Taverna for "
			+ this.requestor.generateId());

	final Element runIdElement = interactionNotificationMessage
			.addExtension(AtomUtils.getRunIdQName());
	runIdElement.setText(StringEscapeUtils.escapeJavaScript(runId));
	
	final Element pathIdElement = interactionNotificationMessage.addExtension(AtomUtils.getPathIdQName());
	pathIdElement.setText(StringEscapeUtils.escapeJavaScript(this.requestor.getPath()));
	
	final Element countElement = interactionNotificationMessage.addExtension(AtomUtils.getCountQName());
	countElement.setText(StringEscapeUtils.escapeJavaScript(this.requestor.getInvocationCount().toString()));
	
	if (this.requestor.getInteractionType().equals(
			InteractionType.Notification)) {
		interactionNotificationMessage.addExtension(AtomUtils
				.getProgressQName());
	}
	final Element idElement = interactionNotificationMessage
			.addExtension(AtomUtils.getIdQName());
	idElement.setText(id);

	return interactionNotificationMessage;
}
 
开发者ID:apache,项目名称:incubator-taverna-common-activities,代码行数:35,代码来源:InteractionActivityRunnable.java

示例2: getReplyTo

import org.apache.abdera.model.Element; //导入依赖的package包/类
private static String getReplyTo(final Entry entry) {
	final Element replyTo = entry.getFirstChild(AtomUtils
			.getInReplyToQName());
	if (replyTo == null) {
		return null;
	}
	return replyTo.getText();
}
 
开发者ID:apache,项目名称:incubator-taverna-common-activities,代码行数:9,代码来源:ResponseFeedListener.java

示例3: getRunId

import org.apache.abdera.model.Element; //导入依赖的package包/类
private static String getRunId(final Entry entry) {
	final Element runIdElement = entry.getFirstChild(AtomUtils
			.getRunIdQName());
	if (runIdElement == null) {
		return null;
	}
	return runIdElement.getText();
}
 
开发者ID:apache,项目名称:incubator-taverna-common-activities,代码行数:9,代码来源:ResponseFeedListener.java

示例4: _expandCurie

import org.apache.abdera.model.Element; //导入依赖的package包/类
private static String _expandCurie(String curie, Element e) {
	String[] arr = curie.split(":");
	if (arr.length > 1) {
		String ns = e.getNamespaces().get(arr[0]);
		if (ns != null) {
			return ns + arr[1];
		} else return curie;
	} else return e.getNamespaces().get("") + curie;
}
 
开发者ID:tetherless-world,项目名称:s2s,代码行数:10,代码来源:OpenSearchServiceEngine.java

示例5: readFrom

import org.apache.abdera.model.Element; //导入依赖的package包/类
@Override
public Object readFrom(Class<Object> feedOrEntry, Type arg1, Annotation[] arg2, MediaType arg3, MultivaluedMap<String, String> arg4,
        InputStream inputStream) throws IOException, WebApplicationException {
    Document<Element> doc = getAbdera().getParser().parse(inputStream);
    Element el = doc.getRoot();
    if (feedOrEntry.isAssignableFrom(el.getClass())) {
        return el;
    } else {
        throw new IOException("Unexpected payload, expected " + feedOrEntry.getName() + ", received " + el.getClass().getName());
    }
}
 
开发者ID:fraunhoferfokus,项目名称:odp-rss-servlet,代码行数:12,代码来源:AbderaSupport.java

示例6: handle

import org.apache.abdera.model.Element; //导入依赖的package包/类
@Override
public void handle(Content content) {
    for (Element contentElement : content.getElements()) {
        System.out.println(contentElement);
    }
}
 
开发者ID:SoftwareSandbox,项目名称:eventstorepoc,代码行数:7,代码来源:ConsoleOutputEventHandler.java

示例7: getElementWrapper

import org.apache.abdera.model.Element; //导入依赖的package包/类
@Override
public <T extends Element> T getElementWrapper(Element element) {
    return null;  //To change body of implemented methods use File | Settings | File Templates.
}
 
开发者ID:citrixsystems,项目名称:pathweaver,代码行数:5,代码来源:ElementFactory.java


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