本文整理汇总了Java中org.apache.clerezza.commons.rdf.Language类的典型用法代码示例。如果您正苦于以下问题:Java Language类的具体用法?Java Language怎么用?Java Language使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Language类属于org.apache.clerezza.commons.rdf包,在下文中一共展示了Language类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addRelevantDescription
import org.apache.clerezza.commons.rdf.Language; //导入依赖的package包/类
private void addRelevantDescription(GraphNode cgContent, Graph resultGraph, boolean withContent) {
Lock l = cgContent.readLock();
l.lock();
try {
Iterator<Literal> valueIter = cgContent.getLiterals(SIOC.content);
//if (!withContent) {
while (valueIter.hasNext()) {
final Literal valueLit = valueIter.next();
final String textualContent = valueLit.getLexicalForm();
final String preview = textualContent.substring(
0, Math.min(PREVIEW_LENGTH, textualContent.length()))
.replace('\n', ' ')
.replace("\r", "");
Language language = valueLit.getLanguage();
resultGraph.add(new TripleImpl((BlankNodeOrIRI) cgContent.getNode(), ECS.textPreview,
new PlainLiteralImpl(preview, language)));
}
//}
copyProperties(cgContent, resultGraph, DCTERMS.title, DCTERMS.abstract_,
RDFS.comment, DC.description, MEDIA_TITLE);
if (withContent) {
copyProperties(cgContent, resultGraph, SIOC.content);
}
} finally {
l.unlock();
}
}