Creates a resource element. @param path path to resource @param mdate modified date @param size size @param type resource type @return resource node
(final String path, final long mdate, final long size,
final ResourceType type)
| 83 | * @return resource node |
| 84 | */ |
| 85 | static FNode resource(final String path, final long mdate, final long size, |
| 86 | final ResourceType type) { |
| 87 | |
| 88 | final FBuilder elem = FElem.build(Q_RESOURCE).text(path); |
| 89 | elem.attr(Q_TYPE, type); |
| 90 | elem.attr(Q_CONTENT_TYPE, type.contentType(path)); |
| 91 | elem.attr(Q_MODIFIED_DATE, DateTime.format(new Date(mdate))); |
| 92 | elem.attr(Q_SIZE, size); |
| 93 | return elem.finish(); |
| 94 | } |
| 95 | } |