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


Java Source.setContent方法代码示例

本文整理汇总了Java中org.LexGrid.commonTypes.Source.setContent方法的典型用法代码示例。如果您正苦于以下问题:Java Source.setContent方法的具体用法?Java Source.setContent怎么用?Java Source.setContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.LexGrid.commonTypes.Source的用法示例。


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

示例1: createProperty

import org.LexGrid.commonTypes.Source; //导入方法依赖的package包/类
public Property createProperty(String t) {
	Vector u = StringUtils.parseData(t, "$");
	String t0 = (String) u.elementAt(0);
	u = StringUtils.parseData(t0);
	String type = (String) u.elementAt(0);
	Property property = new Property();
	type = type.toUpperCase();
	property.setPropertyType(type);
	String property_name = (String) u.elementAt(1);
	property.setPropertyName(property_name);
	Text text = new Text();
	String property_value = (String) u.elementAt(2);
	text.setContent(property_value);
	property.setValue(text);
	if (t.indexOf("=") != -1) {
	    Vector w = StringUtils.parseData(t, "$");
	    String qualifier_str = (String) w.elementAt(1);
	    w = StringUtils.parseData(qualifier_str);
	    PropertyQualifier[] qualifiers = new PropertyQualifier[w.size()];
	    for (int i=0; i<w.size(); i++) {
			String s = (String) w.elementAt(i);
			Vector w2 = StringUtils.parseData(s, "=");
			String prop_qual_type = null;//???
			String prop_qual_name = (String) w2.elementAt(0);
			String prop_qual_value = (String) w2.elementAt(1);

               PropertyQualifier qualifier = new PropertyQualifier();
			text = new Text();
			text.setContent(prop_qual_value);
			qualifier.setPropertyQualifierName(prop_qual_name);
			qualifier.setPropertyQualifierType(prop_qual_type);
			qualifier.setValue(text);
			qualifiers[i] = qualifier;
		}
		property.setPropertyQualifier(qualifiers);
	}
	if (t.indexOf("$Source") != -1) {
	    int n = t.lastIndexOf("|");
		String src = t.substring(n+1, t.length());
		Source[] sources = new Source[1];
		Source source = new Source();//src, null, null, true);
		source.setContent(src);
		sources[0] = source;
		property.setSource(sources);
	}
	return property;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:48,代码来源:EntityExporter.java

示例2: createDefinitionProperty

import org.LexGrid.commonTypes.Source; //导入方法依赖的package包/类
public Definition createDefinitionProperty(String t) {
	Vector u = StringUtils.parseData(t, "$");
	String t0 = (String) u.elementAt(0);
	u = StringUtils.parseData(t0);
	String type = (String) u.elementAt(0);
	Definition property = new Definition();
	type = type.toUpperCase();
	property.setPropertyType(type);
	String property_name = (String) u.elementAt(1);
	property.setPropertyName(property_name);
	Text text = new Text();
	String property_value = (String) u.elementAt(2);
	text.setContent(property_value);
	property.setValue(text);
	if (t.indexOf("=") != -1) {
	    Vector w = StringUtils.parseData(t, "$");
	    String qualifier_str = (String) w.elementAt(1);
	    w = StringUtils.parseData(qualifier_str);
	    PropertyQualifier[] qualifiers = new PropertyQualifier[w.size()];
	    for (int i=0; i<w.size(); i++) {
			String s = (String) w.elementAt(i);
			Vector w2 = StringUtils.parseData(s, "=");
			String prop_qual_type = null;//???
			String prop_qual_name = (String) w2.elementAt(0);
			String prop_qual_value = (String) w2.elementAt(1);
               PropertyQualifier qualifier = new PropertyQualifier();
			text = new Text();
			text.setContent(prop_qual_value);
			qualifier.setPropertyQualifierName(prop_qual_name);
			qualifier.setPropertyQualifierType(prop_qual_type);
			qualifier.setValue(text);
			qualifiers[i] = qualifier;
		}
		property.setPropertyQualifier(qualifiers);
	}
	if (t.indexOf("$Source") != -1) {
	    int n = t.lastIndexOf("|");
		String src = t.substring(n+1, t.length());
		Source[] sources = new Source[1];
		Source source = new Source();//src, null, null, true);
		source.setContent(src);
		sources[0] = source;
		property.setSource(sources);
	}
	return property;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:47,代码来源:EntityExporter.java

示例3: createCommentProperty

import org.LexGrid.commonTypes.Source; //导入方法依赖的package包/类
public Comment createCommentProperty(String t) {
	Vector u = StringUtils.parseData(t, "$");
	String t0 = (String) u.elementAt(0);
	u = StringUtils.parseData(t0);
	String type = (String) u.elementAt(0);
	Comment property = new Comment();
	type = type.toUpperCase();
	property.setPropertyType(type);
	String property_name = (String) u.elementAt(1);
	property.setPropertyName(property_name);
	Text text = new Text();
	String property_value = (String) u.elementAt(2);
	text.setContent(property_value);
	property.setValue(text);
	if (t.indexOf("=") != -1) {
	    Vector w = StringUtils.parseData(t, "$");
	    String qualifier_str = (String) w.elementAt(1);
	    w = StringUtils.parseData(qualifier_str);
	    PropertyQualifier[] qualifiers = new PropertyQualifier[w.size()];
	    for (int i=0; i<w.size(); i++) {
			String s = (String) w.elementAt(i);
			Vector w2 = StringUtils.parseData(s, "=");
			String prop_qual_type = null;//???
			String prop_qual_name = (String) w2.elementAt(0);
			String prop_qual_value = (String) w2.elementAt(1);

               PropertyQualifier qualifier = new PropertyQualifier();
			text = new Text();
			text.setContent(prop_qual_value);
			qualifier.setPropertyQualifierName(prop_qual_name);
			qualifier.setPropertyQualifierType(prop_qual_type);
			qualifier.setValue(text);
			qualifiers[i] = qualifier;
		}
		property.setPropertyQualifier(qualifiers);
	}
	if (t.indexOf("$Source") != -1) {
	    int n = t.lastIndexOf("|");
		String src = t.substring(n+1, t.length());
		Source[] sources = new Source[1];
		Source source = new Source();//src, null, null, true);
		source.setContent(src);
		sources[0] = source;
		property.setSource(sources);
	}
	return property;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:48,代码来源:EntityExporter.java


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