@Test public void toDocument() { final RyaType ryaType = RdfToRyaConversions.convertLiteral( SimpleValueFactory.getInstance().createLiteral( 4.5 ) ); final Document document = new RyaTypeDocumentConverter().toDocument( ryaType ); final Document expected = new Document() .append(RyaTypeDocumentConverter.DATA_TYPE, XMLSchema.DOUBLE.toString()) .append(RyaTypeDocumentConverter.VALUE, "4.5"); assertEquals(expected, document); }
@Override public Document toDocument(final RyaType ryaType) { requireNonNull(ryaType); return new Document() .append(DATA_TYPE, ryaType.getDataType().toString()) .append(VALUE, ryaType.getData()); }
RyaTypeDocumentConverter implements DocumentConverter<RyaType> { @Override public Document toDocument(final RyaType ryaType) { requireNonNull(ryaType); return new Document() .append(DATA_TYPE, ryaType.getDataType().toString()) .append(VALUE, ryaType.getData()); } }
RyaTypeDocumentConverter implements DocumentConverter<RyaType> { @Override public Document toDocument(final RyaType ryaType) { requireNonNull(ryaType); return new Document() .append(DATA_TYPE, ryaType.getDataType().toString()) .append(VALUE, ryaType.getData()); }  }
RyaTypeDocumentConverter implements DocumentConverter<RyaType> { @Override public Document toDocument(final RyaType ryaType) { requireNonNull(ryaType); return new Document() .append(DATA_TYPE, ryaType.getDataType().toString()) .append(VALUE, ryaType.getData()); }  @Override Document toDocument(final RyaType ryaType); @Override RyaType fromDocument(final Document document); }
RyaTypeDocumentConverter implements DocumentConverter<RyaType> { @Override public Document toDocument(final RyaType ryaType) { requireNonNull(ryaType); return new Document() .append(DATA_TYPE, ryaType.getDataType().toString()) .append(VALUE, ryaType.getData()); }  @Override Document toDocument(final RyaType ryaType); @Override RyaType fromDocument(final Document document); static final String DATA_TYPE; static final String VALUE; }