Java Code Examples for org.eclipse.rdf4j.model.vocabulary.XMLSchema#SHORT
The following examples show how to use
org.eclipse.rdf4j.model.vocabulary.XMLSchema#SHORT .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SmartUriAdapter.java From rya with Apache License 2.0 | 6 votes |
private static IRI determineType(final String data) { if (Ints.tryParse(data) != null) { return XMLSchema.INTEGER; } else if (Doubles.tryParse(data) != null) { return XMLSchema.DOUBLE; } else if (Floats.tryParse(data) != null) { return XMLSchema.FLOAT; } else if (isShort(data)) { return XMLSchema.SHORT; } else if (Longs.tryParse(data) != null) { return XMLSchema.LONG; } if (Boolean.parseBoolean(data)) { return XMLSchema.BOOLEAN; } else if (isByte(data)) { return XMLSchema.BYTE; } else if (isDate(data)) { return XMLSchema.DATETIME; } else if (isUri(data)) { return XMLSchema.ANYURI; } return XMLSchema.STRING; }
Example 2
Source File: NumericMemLiteral.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 4 votes |
public NumericMemLiteral(Object creator, short number) { this(creator, number, XMLSchema.SHORT); }
Example 3
Source File: ShortCast.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override protected IRI getXsdDatatype() { return XMLSchema.SHORT; }
Example 4
Source File: NumericLiteral.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 4 votes |
/** * Creates an xsd:short typed litral with the specified value. */ protected NumericLiteral(short number) { this(number, XMLSchema.SHORT); }
Example 5
Source File: ShortRyaTypeResolver.java From rya with Apache License 2.0 | 4 votes |
public ShortRyaTypeResolver() { super((byte) INTEGER_LITERAL_MARKER, XMLSchema.SHORT); }
Example 6
Source File: DuplicateDataDetector.java From rya with Apache License 2.0 | 4 votes |
@Override public IRI getXmlSchemaUri() { return XMLSchema.SHORT; }
Example 7
Source File: RyaTypeUtils.java From rya with Apache License 2.0 | 2 votes |
/** * Creates a short {@link RyaType} object. * @param value the {@link Short} object. * @return the {@link RyaType} with the data type set to * {@link XMLSchema#SHORT} and the data set to the specified {@code value}. */ public static RyaType shortRyaType(final Short value) { return new RyaType(XMLSchema.SHORT, Short.toString(value)); }