X-Git-Url: http://git.nikiroo.be/?p=jvcard.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Fjvcard%2FCard.java;h=986f81d17c0932cba2081d7586b0ce115ad25547;hp=e714b5633a9b5047d4a08df36463bbda05bab2f4;hb=e253bd50bb05519f4a16fed4fb95d5b3340128ea;hpb=7f82bf682ab5747b2d4ccdccae9ea3fcdb013cee diff --git a/src/be/nikiroo/jvcard/Card.java b/src/be/nikiroo/jvcard/Card.java index e714b56..986f81d 100644 --- a/src/be/nikiroo/jvcard/Card.java +++ b/src/be/nikiroo/jvcard/Card.java @@ -58,8 +58,7 @@ public class Card extends BaseClass { this.file = file; switch (format) { case VCard21: - this.name = file.getName().replaceAll( - ".[vV][cC][fF]$", ""); + this.name = file.getName().replaceAll(".[vV][cC][fF]$", ""); break; case Abook: default: @@ -177,11 +176,11 @@ public class Card extends BaseClass { } /** - * Return the input which was used to open this {@link Card}. + * Return the {@link File} which was used to open this {@link Card}. * * @return the input */ - public File getInput() { + public File getFile() { return file; } @@ -219,6 +218,16 @@ public class Card extends BaseClass { return toString(Format.VCard21); } + @Override + public String getId() { + return "" + name; + } + + @Override + public String getState() { + return "" + name + format; + } + /** * Load the data from the given {@link File} under the given {@link Format}. *