本文整理汇总了Java中org.apache.jena.vocabulary.XSD.xstring方法的典型用法代码示例。如果您正苦于以下问题:Java XSD.xstring方法的具体用法?Java XSD.xstring怎么用?Java XSD.xstring使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.jena.vocabulary.XSD
的用法示例。
在下文中一共展示了XSD.xstring方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getBaseTypeForBooleans
import org.apache.jena.vocabulary.XSD; //导入方法依赖的package包/类
/**
* Returns the equivalent XSD datatype for IFC types: BOOLEAN and LOGICAL
* @return
*/
public Resource getBaseTypeForBooleans() {
if (baseTypeForBooleans == null) {
String convertBooleanValuesTo = context.getConversionParams().convertBooleansTo();
switch (convertBooleanValuesTo) {
case StringParam.VALUE_AUTO:
case Ifc2RdfConversionParams.VALUE_NAMED_INDIVIDUAL:
baseTypeForBooleans = OWL2.NamedIndividual;
break;
case Ifc2RdfConversionParams.VALUE_XSD_STRING:
baseTypeForBooleans = XSD.xstring;
break;
case Ifc2RdfConversionParams.VALUE_XSD_BOOLEAN:
baseTypeForBooleans = XSD.xboolean;
break;
default:
throw new IllegalArgumentException("Invalid value of option " + Ifc2RdfConversionParams.PARAM_CONVERT_BOOLEANS_TO);
}
}
return baseTypeForBooleans;
}
示例2: getBaseTypeForEnums
import org.apache.jena.vocabulary.XSD; //导入方法依赖的package包/类
/**
* Returns the equivalent XSD datatype for IFC types: ENUM and LOGICAL
* @return
*/
private Resource getBaseTypeForEnums() {
if (baseTypeForEnums == null) {
String convertEnumValuesTo = (String)context.getConversionParams().getParamValue(Ifc2RdfConversionParams.PARAM_CONVERT_ENUMS_TO);
switch (convertEnumValuesTo) {
case StringParam.VALUE_AUTO:
case Ifc2RdfConversionParams.VALUE_NAMED_INDIVIDUAL:
baseTypeForEnums = OWL2.NamedIndividual;
break;
case Ifc2RdfConversionParams.VALUE_XSD_STRING:
baseTypeForEnums = XSD.xstring;
break;
default:
throw new IllegalArgumentException("Invalid value of option " + Ifc2RdfConversionParams.PARAM_CONVERT_ENUMS_TO);
}
}
return baseTypeForEnums;
}
示例3: getBaseTypeForLiterals
import org.apache.jena.vocabulary.XSD; //导入方法依赖的package包/类
/**
* Returns the equivalent XSD datatype of an IFC literal type
* @param typeInfo
* @return
*/
public Resource getBaseTypeForLiterals(IfcLiteralTypeInfo typeInfo) {
switch (typeInfo.getName()) {
case IfcVocabulary.TypeNames.BINARY:
// return XSD.nonNegativeInteger;
return XSD.hexBinary;
case IfcVocabulary.TypeNames.INTEGER:
return XSD.integer;
case IfcVocabulary.TypeNames.NUMBER:
case IfcVocabulary.TypeNames.REAL:
return getBaseTypeForDoubles();
case IfcVocabulary.TypeNames.DATETIME:
return XSD.dateTime;
// TODO: Remove GUID
case IfcVocabulary.TypeNames.GUID:
// return XSD.NMTOKEN;
return XSD.xstring;
case IfcVocabulary.TypeNames.STRING:
return XSD.xstring;
default:
throw new IllegalArgumentException(String.format("Unknown literal type info '%s'", typeInfo.getName()));
}
}
示例4: getBaseTypeForDoubles
import org.apache.jena.vocabulary.XSD; //导入方法依赖的package包/类
/**
* Returns the equivalent XSD datatype for IFC types: REAL and NUMBER
* @return
*/
private Resource getBaseTypeForDoubles() {
if (baseTypeForDoubles == null) {
String convertDoubleValuesTo = (String)context.getConversionParams().getParamValue(Ifc2RdfConversionParams.PARAM_CONVERT_DOUBLES_TO);
switch (convertDoubleValuesTo) {
case StringParam.VALUE_AUTO:
case Ifc2RdfConversionParams.VALUE_AUTO_MOST_SUPPORTED:
case Ifc2RdfConversionParams.VALUE_XSD_DECIMAL:
baseTypeForDoubles = XSD.decimal;
break;
case Ifc2RdfConversionParams.VALUE_XSD_DOUBLE:
baseTypeForDoubles = XSD.xdouble;
break;
case Ifc2RdfConversionParams.VALUE_OWL_REAL:
baseTypeForDoubles = RdfVocabulary.OWL.real;
break;
case Ifc2RdfConversionParams.VALUE_XSD_STRING:
baseTypeForDoubles = XSD.xstring;
break;
case Ifc2RdfConversionParams.VALUE_AUTO_MOST_EFFICIENT:
List<Resource> preferredTypes = Arrays.asList(XSD.xdouble, RdfVocabulary.OWL.real, XSD.decimal);
baseTypeForDoubles = context.getOwlProfileList().getFirstSupportedDatatype(preferredTypes);
break;
default:
throw new IllegalArgumentException("Invalid value of option " + Ifc2RdfConversionParams.PARAM_CONVERT_DOUBLES_TO);
}
}
return baseTypeForDoubles;
}
示例5: getBaseTypeForDoubles
import org.apache.jena.vocabulary.XSD; //导入方法依赖的package包/类
/**
* Returns the equivalent XSD datatype for IFC types: REAL and NUMBER
* @return
*/
Resource getBaseTypeForDoubles() {
if (baseTypeForDoubles == null) {
String convertDoubleValuesTo = (String)context.getConversionParams().getParamValue(Ifc2RdfConversionParams.PARAM_CONVERT_DOUBLES_TO);
switch (convertDoubleValuesTo) {
case StringParam.VALUE_AUTO:
case Ifc2RdfConversionParams.VALUE_AUTO_MOST_SUPPORTED:
case Ifc2RdfConversionParams.VALUE_XSD_DECIMAL:
baseTypeForDoubles = XSD.decimal;
break;
case Ifc2RdfConversionParams.VALUE_XSD_DOUBLE:
baseTypeForDoubles = XSD.xdouble;
break;
case Ifc2RdfConversionParams.VALUE_OWL_REAL:
baseTypeForDoubles = RdfVocabulary.OWL.real;
break;
case Ifc2RdfConversionParams.VALUE_XSD_STRING:
baseTypeForDoubles = XSD.xstring;
break;
case Ifc2RdfConversionParams.VALUE_AUTO_MOST_EFFICIENT:
List<Resource> preferredTypes = Arrays.asList(XSD.xdouble, RdfVocabulary.OWL.real, XSD.decimal);
baseTypeForDoubles = context.getOwlProfileList().getFirstSupportedDatatype(preferredTypes);
break;
default:
throw new IllegalArgumentException("Invalid value of option " + Ifc2RdfConversionParams.PARAM_CONVERT_DOUBLES_TO);
}
}
return baseTypeForDoubles;
}