本文整理汇总了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;
}
示例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;
}
示例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;
}