本文整理了Java中com.bigdata.rdf.internal.impl.literal.XSDNumericIV.getDTE()
方法的一些代码示例,展示了XSDNumericIV.getDTE()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSDNumericIV.getDTE()
方法的具体详情如下:
包路径:com.bigdata.rdf.internal.impl.literal.XSDNumericIV
类名称:XSDNumericIV
方法名:getDTE
暂无
代码示例来源:origin: blazegraph/database
@Override
public boolean equals(final Object o) {
if (o == this)
return true;
if(o instanceof XSDNumericIV<?>) {
final XSDNumericIV<?> n = (XSDNumericIV<?>) o;
return this.getDTE() == n.getDTE() && this.number.equals(n.number);
}
return false;
}
代码示例来源:origin: com.blazegraph/bigdata-core
@Override
public boolean equals(final Object o) {
if (o == this)
return true;
if(o instanceof XSDNumericIV<?>) {
final XSDNumericIV<?> n = (XSDNumericIV<?>) o;
return this.getDTE() == n.getDTE() && this.number.equals(n.number);
}
return false;
}
代码示例来源:origin: blazegraph/database
@Override
public BigDecimal decimalValue() {
switch (getDTE()) {
case XSDByte:
case XSDShort:
case XSDInt:
case XSDLong:
return BigDecimal.valueOf(longValue());
case XSDFloat:
case XSDDouble:
return BigDecimal.valueOf(doubleValue());
default:
throw new RuntimeException("unknown DTE");
}
}
代码示例来源:origin: com.blazegraph/bigdata-core
@Override
public BigDecimal decimalValue() {
switch (getDTE()) {
case XSDByte:
case XSDShort:
case XSDInt:
case XSDLong:
return BigDecimal.valueOf(longValue());
case XSDFloat:
case XSDDouble:
return BigDecimal.valueOf(doubleValue());
default:
throw new RuntimeException("unknown DTE");
}
}
代码示例来源: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
@SuppressWarnings({ "rawtypes", "unchecked" })
@Test
public void testPrefixedIntegerURIHandler() {
final String nameSpace = "http://blazegraph.com/";
final String localName = "DB1234";
final String fixture = "DB";
final int intValue = 1234;
InlinePrefixedIntegerURIHandler handler = new InlinePrefixedIntegerURIHandler(nameSpace, fixture);
XSDNumericIV iv = (XSDNumericIV) handler.createInlineIV(localName);
if(log.isDebugEnabled()) {
log.debug(iv.getDTE().name());
}
assertTrue (intValue == iv.getInlineValue().intValue());
assertTrue (localName.equals(handler.getLocalNameFromDelegate(iv)));
}
代码示例来源:origin: blazegraph/database
@SuppressWarnings({ "rawtypes", "unchecked" })
@Test
public void testSuffixedIntegerURIHandler() {
final String nameSpace = "http://blazegraph.com/";
final String localName = "1234DB";
final String fixture = "DB";
final int intValue = 1234;
InlineSuffixedIntegerURIHandler handler = new InlineSuffixedIntegerURIHandler(nameSpace, fixture);
XSDNumericIV iv = (XSDNumericIV) handler.createInlineIV(localName);
if(log.isDebugEnabled()) {
log.debug(iv.getDTE().name());
}
assertTrue (intValue == iv.getInlineValue().intValue());
assertTrue (localName.equals(handler.getLocalNameFromDelegate(iv)));
}
代码示例来源:origin: blazegraph/database
@SuppressWarnings({ "rawtypes", "unchecked" })
@Test
public void testFixedWidthIntegerURIHandler() {
final String nameSpace = "http://blazegraph.com/";
final String localName = "001234";
final int intValue = 1234;
final int width = 6;
InlineFixedWidthIntegerURIHandler handler = new InlineFixedWidthIntegerURIHandler(nameSpace, width);
XSDNumericIV iv = (XSDNumericIV) handler.createInlineIV(localName);
if(log.isDebugEnabled()) {
log.debug(iv.getDTE().name());
}
assertTrue (intValue == iv.getInlineValue().intValue());
assertTrue (localName.equals(handler.getLocalNameFromDelegate(iv)));
}
代码示例来源:origin: com.blazegraph/bigdata-rdf-test
@SuppressWarnings({ "rawtypes", "unchecked" })
@Test
public void testPrefixedIntegerURIHandler() {
final String nameSpace = "http://blazegraph.com/";
final String localName = "DB1234";
final String fixture = "DB";
final int intValue = 1234;
InlinePrefixedIntegerURIHandler handler = new InlinePrefixedIntegerURIHandler(nameSpace, fixture);
XSDNumericIV iv = (XSDNumericIV) handler.createInlineIV(localName);
if(log.isDebugEnabled()) {
log.debug(iv.getDTE().name());
}
assertTrue (intValue == iv.getInlineValue().intValue());
assertTrue (localName.equals(handler.getLocalNameFromDelegate(iv)));
}
代码示例来源:origin: com.blazegraph/bigdata-rdf-test
@SuppressWarnings({ "rawtypes", "unchecked" })
@Test
public void testFixedWidthIntegerURIHandler() {
final String nameSpace = "http://blazegraph.com/";
final String localName = "001234";
final int intValue = 1234;
final int width = 6;
InlineFixedWidthIntegerURIHandler handler = new InlineFixedWidthIntegerURIHandler(nameSpace, width);
XSDNumericIV iv = (XSDNumericIV) handler.createInlineIV(localName);
if(log.isDebugEnabled()) {
log.debug(iv.getDTE().name());
}
assertTrue (intValue == iv.getInlineValue().intValue());
assertTrue (localName.equals(handler.getLocalNameFromDelegate(iv)));
}
代码示例来源:origin: com.blazegraph/bigdata-rdf-test
@SuppressWarnings({ "rawtypes", "unchecked" })
@Test
public void testSuffixedIntegerURIHandler() {
final String nameSpace = "http://blazegraph.com/";
final String localName = "1234DB";
final String fixture = "DB";
final int intValue = 1234;
InlineSuffixedIntegerURIHandler handler = new InlineSuffixedIntegerURIHandler(nameSpace, fixture);
XSDNumericIV iv = (XSDNumericIV) handler.createInlineIV(localName);
if(log.isDebugEnabled()) {
log.debug(iv.getDTE().name());
}
assertTrue (intValue == iv.getInlineValue().intValue());
assertTrue (localName.equals(handler.getLocalNameFromDelegate(iv)));
}
代码示例来源:origin: blazegraph/database
@SuppressWarnings({ "rawtypes", "unchecked" })
@Test
public void testPrefixFixedWidthIntegerURIHandler() {
final String nameSpace = "http://blazegraph.com/";
final String localName = "PREFIX_001234";
final String fixture = "PREFIX_";
final int intValue = 1234;
final int width = 6;
InlinePrefixedFixedWidthIntegerURIHandler handler = new InlinePrefixedFixedWidthIntegerURIHandler(nameSpace, fixture, width);
XSDNumericIV iv = (XSDNumericIV) handler.createInlineIV(localName);
if(log.isDebugEnabled()) {
log.debug(iv.getDTE().name());
}
assertTrue (intValue == iv.getInlineValue().intValue());
assertTrue (localName.equals(handler.getLocalNameFromDelegate(iv)));
}
代码示例来源:origin: blazegraph/database
@SuppressWarnings({ "rawtypes", "unchecked" })
@Test
public void testSuffixFixedWidthIntegerURIHandler() {
final String nameSpace = "http://blazegraph.com/";
final String localName = "001234_SUFFIX";
final String fixture = "_SUFFIX";
final int intValue = 1234;
final int width = 6;
InlineSuffixedFixedWidthIntegerURIHandler handler = new InlineSuffixedFixedWidthIntegerURIHandler(nameSpace, fixture, width);
XSDNumericIV iv = (XSDNumericIV) handler.createInlineIV(localName);
if(log.isDebugEnabled()) {
log.debug(iv.getDTE().name());
}
assertTrue (iv != null);
assertTrue (intValue == iv.getInlineValue().intValue());
assertTrue (localName.equals(handler.getLocalNameFromDelegate(iv)));
}
代码示例来源:origin: blazegraph/database
@Override
public boolean booleanValue() {
switch (getDTE()) {
case XSDByte:
return byteValue() != 0;
case XSDShort:
return shortValue() != 0;
case XSDInt:
return intValue() != 0;
case XSDLong:
return longValue() != 0;
default:
return super.booleanValue();
}
}
代码示例来源:origin: com.blazegraph/bigdata-core
@Override
public boolean booleanValue() {
switch (getDTE()) {
case XSDByte:
return byteValue() != 0;
case XSDShort:
return shortValue() != 0;
case XSDInt:
return intValue() != 0;
case XSDLong:
return longValue() != 0;
default:
return super.booleanValue();
}
}
代码示例来源:origin: blazegraph/database
@SuppressWarnings({ "rawtypes", "unchecked" })
@Test
public void testSuffixedIntegerURIHandler() {
final String nameSpace = "http://blazegraph.com/";
final String localName = "1234DB";
final String fixture = "DB";
final int intValue = 1234;
InlineSuffixedIntegerURIHandler handler = new InlineSuffixedIntegerURIHandler(nameSpace, fixture);
XSDNumericIV iv = (XSDNumericIV) handler.createInlineIV(localName);
if(log.isDebugEnabled()) {
log.debug(iv.getDTE().name());
}
assertTrue (intValue == iv.getInlineValue().intValue());
assertTrue (localName.equals(handler.getLocalNameFromDelegate(iv)));
}
代码示例来源:origin: blazegraph/database
@SuppressWarnings({ "rawtypes", "unchecked" })
@Test
public void testPrefixedIntegerURIHandler() {
final String nameSpace = "http://blazegraph.com/";
final String localName = "DB1234";
final String fixture = "DB";
final int intValue = 1234;
InlinePrefixedIntegerURIHandler handler = new InlinePrefixedIntegerURIHandler(nameSpace, fixture);
XSDNumericIV iv = (XSDNumericIV) handler.createInlineIV(localName);
if(log.isDebugEnabled()) {
log.debug(iv.getDTE().name());
}
assertTrue (intValue == iv.getInlineValue().intValue());
assertTrue (localName.equals(handler.getLocalNameFromDelegate(iv)));
}
代码示例来源:origin: blazegraph/database
@SuppressWarnings({ "rawtypes", "unchecked" })
@Test
public void testFixedWidthIntegerURIHandler() {
final String nameSpace = "http://blazegraph.com/";
final String localName = "001234";
final int intValue = 1234;
final int width = 6;
InlineFixedWidthIntegerURIHandler handler = new InlineFixedWidthIntegerURIHandler(nameSpace, width);
XSDNumericIV iv = (XSDNumericIV) handler.createInlineIV(localName);
if(log.isDebugEnabled()) {
log.debug(iv.getDTE().name());
}
assertTrue (intValue == iv.getInlineValue().intValue());
assertTrue (localName.equals(handler.getLocalNameFromDelegate(iv)));
}
代码示例来源:origin: blazegraph/database
@SuppressWarnings({ "rawtypes", "unchecked" })
@Test
public void testPrefixFixedWidthIntegerURIHandler() {
final String nameSpace = "http://blazegraph.com/";
final String localName = "PREFIX_001234";
final String fixture = "PREFIX_";
final int intValue = 1234;
final int width = 6;
InlinePrefixedFixedWidthIntegerURIHandler handler = new InlinePrefixedFixedWidthIntegerURIHandler(nameSpace, fixture, width);
XSDNumericIV iv = (XSDNumericIV) handler.createInlineIV(localName);
if(log.isDebugEnabled()) {
log.debug(iv.getDTE().name());
}
assertTrue (intValue == iv.getInlineValue().intValue());
assertTrue (localName.equals(handler.getLocalNameFromDelegate(iv)));
}
内容来源于网络,如有侵权,请联系作者删除!