本文整理了Java中com.bigdata.rdf.internal.impl.literal.XSDNumericIV.<init>()
方法的一些代码示例,展示了XSDNumericIV.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSDNumericIV.<init>()
方法的具体详情如下:
包路径:com.bigdata.rdf.internal.impl.literal.XSDNumericIV
类名称:XSDNumericIV
方法名:<init>
暂无
代码示例来源:origin: blazegraph/database
@Override
@SuppressWarnings("rawtypes")
public IV<?,?> serializeTime(final BigdataValueFactory vf, final Object time) {
return new XSDNumericIV((Long)time);
}
代码示例来源:origin: com.blazegraph/bigdata-core
@Override
@SuppressWarnings("rawtypes")
public IV<?,?> serializeTime(final BigdataValueFactory vf, final Object time) {
return new XSDNumericIV((Long)time);
}
代码示例来源:origin: blazegraph/database
@Override
@SuppressWarnings("rawtypes")
public IV<?,?> serializeDistance(final BigdataValueFactory vf, final Double distance, final UNITS unit) {
return new XSDNumericIV(Math.round(distance*100)/100.0);
}
代码示例来源:origin: com.blazegraph/bigdata-core
@Override
@SuppressWarnings("rawtypes")
public IV<?,?> serializeDistance(final BigdataValueFactory vf, final Double distance, final UNITS unit) {
return new XSDNumericIV(Math.round(distance*100)/100.0);
}
代码示例来源:origin: blazegraph/database
public IV get(IBindingSet bindingSet) {
return new XSDNumericIV(rand.nextDouble());
}
代码示例来源:origin: blazegraph/database
@Override
@SuppressWarnings("rawtypes")
public IV<?,?> serializeLatitude(final BigdataValueFactory vf, final Object latitude) {
if (latitude instanceof Double) {
return new XSDNumericIV((Double)latitude);
} else if (latitude instanceof Long) {
return new XSDNumericIV(((Long)latitude).doubleValue());
} else {
throw new GeoSpatialSearchException("Latitude value expected to be either Double or Long");
}
}
代码示例来源:origin: blazegraph/database
@Override
@SuppressWarnings("rawtypes")
public IV<?,?> serializeLongitude(final BigdataValueFactory vf, final Object longitude) {
if (longitude instanceof Double) {
return new XSDNumericIV((Double)longitude);
} else if (longitude instanceof Long) {
return new XSDNumericIV(((Long)longitude).doubleValue());
} else {
throw new GeoSpatialSearchException("Longitude value expected to be either Double or Long");
}
}
代码示例来源:origin: com.blazegraph/bigdata-core
@Override
@SuppressWarnings("rawtypes")
public IV<?,?> serializeLongitude(final BigdataValueFactory vf, final Object longitude) {
if (longitude instanceof Double) {
return new XSDNumericIV((Double)longitude);
} else if (longitude instanceof Long) {
return new XSDNumericIV(((Long)longitude).doubleValue());
} else {
throw new GeoSpatialSearchException("Longitude value expected to be either Double or Long");
}
}
代码示例来源:origin: com.blazegraph/bigdata-core
@Override
@SuppressWarnings("rawtypes")
public IV<?,?> serializeLatitude(final BigdataValueFactory vf, final Object latitude) {
if (latitude instanceof Double) {
return new XSDNumericIV((Double)latitude);
} else if (latitude instanceof Long) {
return new XSDNumericIV(((Long)latitude).doubleValue());
} else {
throw new GeoSpatialSearchException("Latitude value expected to be either Double or Long");
}
}
代码示例来源:origin: com.blazegraph/bigdata-core
synchronized public IV done() {
if (firstCause != null) {
throw new RuntimeException(firstCause);
}
if(n == 0)
return ZERO;
return MathUtility.literalMath(aggregated,
new XSDNumericIV<BigdataLiteral>(n), MathBOp.MathOp.DIVIDE);
}
代码示例来源:origin: blazegraph/database
synchronized public IV done() {
if (firstCause != null) {
throw new RuntimeException(firstCause);
}
if(n == 0)
return ZERO;
return MathUtility.literalMath(aggregated,
new XSDNumericIV<BigdataLiteral>(n), MathBOp.MathOp.DIVIDE);
}
代码示例来源:origin: blazegraph/database
@SuppressWarnings("rawtypes")
public void test_encodeNonEmpty() {
final IBindingSet expected = new ListBindingSet();
expected.set(Var.var("x"), new Constant<IV>(
new XSDNumericIV<BigdataLiteral>(12)));
doEncodeDecodeTest(expected);
}
代码示例来源:origin: com.blazegraph/bigdata-rdf-test
@SuppressWarnings("rawtypes")
public void test_encodeNonEmpty() {
final IBindingSet expected = new ListBindingSet();
expected.set(Var.var("x"), new Constant<IV>(
new XSDNumericIV<BigdataLiteral>(12)));
doEncodeDecodeTest(expected);
}
代码示例来源:origin: blazegraph/database
public IV<V, Number> clone(final boolean clearCache) {
final XSDNumericIV<V> tmp = new XSDNumericIV<V>(number, getDTE());
if (!clearCache) {
tmp.setValue(getValueCache());
}
return tmp;
}
代码示例来源:origin: com.blazegraph/bigdata-core
public IV<V, Number> clone(final boolean clearCache) {
final XSDNumericIV<V> tmp = new XSDNumericIV<V>(number, getDTE());
if (!clearCache) {
tmp.setValue(getValueCache());
}
return tmp;
}
代码示例来源:origin: blazegraph/database
/**
* Attempts to convert the supplied value into an internal representation
* using BigInteger.
*/
@SuppressWarnings("unchecked")
public LiteralExtensionIV createIV(final Value value) {
if (value instanceof Literal == false)
throw new IllegalArgumentException();
final Literal lit = (Literal) value;
final AbstractLiteralIV delegate = new XSDNumericIV<BigdataLiteral>(
XMLDatatypeUtil.parseFloat(lit.getLabel()));
return new LiteralExtensionIV(delegate, datatype.getIV());
}
代码示例来源:origin: blazegraph/database
@SuppressWarnings("rawtypes")
public void test_encodeNonEmpty() {
final IBindingSet expected = new ListBindingSet();
expected.set(Var.var("x"), new Constant<IV>(
new XSDNumericIV<BigdataLiteral>(12)));
doEncodeDecodeTest(expected);
}
代码示例来源:origin: blazegraph/database
@SuppressWarnings("rawtypes")
public void test_encodeNonEmpty2() {
final IBindingSet expected = new ListBindingSet();
expected.set(Var.var("x"), new Constant<IV>(
new XSDNumericIV<BigdataLiteral>(12)));
expected.set(Var.var("y"), new Constant<IV>(
new FullyInlineURIIV<BigdataURI>(new URIImpl(
"http://www.bigdata.com"))));
doEncodeDecodeTest(expected);
}
代码示例来源:origin: com.blazegraph/bigdata-rdf-test
@SuppressWarnings("rawtypes")
public void test_encodeNonEmpty2() {
final IBindingSet expected = new ListBindingSet();
expected.set(Var.var("x"), new Constant<IV>(
new XSDNumericIV<BigdataLiteral>(12)));
expected.set(Var.var("y"), new Constant<IV>(
new FullyInlineURIIV<BigdataURI>(new URIImpl(
"http://www.bigdata.com"))));
doEncodeDecodeTest(expected);
}
代码示例来源:origin: blazegraph/database
@SuppressWarnings("rawtypes")
public void test_encodeNonEmpty2() {
final IBindingSet expected = new ListBindingSet();
expected.set(Var.var("x"), new Constant<IV>(
new XSDNumericIV<BigdataLiteral>(12)));
expected.set(Var.var("y"), new Constant<IV>(
new FullyInlineURIIV<BigdataURI>(new URIImpl(
"http://www.bigdata.com"))));
doEncodeDecodeTest(expected);
}
内容来源于网络,如有侵权,请联系作者删除!