X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Fjvcard%2FCard.java;h=547535804b8f37fa80fb5dc3ca22f89afc22857e;hb=08fbe0fb5e86bc7f1bec0a0b9e2d06290a70b212;hp=52eec8c6e4af0d5ac3ae67dbb94f7d63b93f0f37;hpb=cf77cb3542f2aefbebdb9aa00b358dbeb4489a73;p=jvcard.git diff --git a/src/be/nikiroo/jvcard/Card.java b/src/be/nikiroo/jvcard/Card.java index 52eec8c..5475358 100644 --- a/src/be/nikiroo/jvcard/Card.java +++ b/src/be/nikiroo/jvcard/Card.java @@ -22,7 +22,6 @@ public class Card extends BaseClass { private String name; private Format format; private long lastModified; - private boolean remote; /** * Create a new {@link Card} from the given {@link File} and {@link Format}. @@ -40,7 +39,7 @@ public class Card extends BaseClass { * if format is NULL */ public Card(File file, Format format) throws IOException { - this(Parser.parse(file, format)); + this(Parser.parseContact(file, format)); if (file != null && file.exists()) { lastModified = file.lastModified(); @@ -73,7 +72,7 @@ public class Card extends BaseClass { * @throws InvalidParameterException * if format is NULL */ - public Card(List contacts) throws IOException { + public Card(List contacts) { super(contacts); lastModified = -1; @@ -103,6 +102,7 @@ public class Card extends BaseClass { if (this.file != null && file.getCanonicalPath().equals(this.file.getCanonicalPath())) { + lastModified = file.lastModified(); setPristine(); } @@ -133,7 +133,7 @@ public class Card extends BaseClass { if (file == null) return false; - this.replaceListContent(Parser.parse(file, format)); + this.replaceListContent(Parser.parseContact(file, format)); lastModified = file.lastModified(); setPristine(); @@ -196,25 +196,6 @@ public class Card extends BaseClass { return lastModified; } - /** - * Check if this {@link Card} is remote. - * - * @return TRUE if this {@link Card} is remote - */ - public boolean isRemote() { - return remote; - } - - /** - * Set the remote option on this {@link Card}. - * - * @param remote - * TRUE if this {@link Card} is remote - */ - public void setRemote(boolean remote) { - this.remote = remote; - } - @Override public String toString() { return toString(Format.VCard21); @@ -227,6 +208,6 @@ public class Card extends BaseClass { @Override public String getState() { - return "" + name + format; + return ("" + name + format).replace(' ', '_'); } }