Remote: jdoc + description + some fixes:
[jvcard.git] / src / be / nikiroo / jvcard / Card.java
index 52eec8c6e4af0d5ac3ae67dbb94f7d63b93f0f37..d2567a496237c159546fa40f46015cebc241223b 100644 (file)
@@ -40,7 +40,7 @@ public class Card extends BaseClass<Contact> {
         *             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();
@@ -103,6 +103,7 @@ public class Card extends BaseClass<Contact> {
 
                if (this.file != null
                                && file.getCanonicalPath().equals(this.file.getCanonicalPath())) {
+                       lastModified = file.lastModified();
                        setPristine();
                }
 
@@ -133,7 +134,7 @@ public class Card extends BaseClass<Contact> {
                if (file == null)
                        return false;
 
-               this.replaceListContent(Parser.parse(file, format));
+               this.replaceListContent(Parser.parseContact(file, format));
                lastModified = file.lastModified();
                setPristine();
 
@@ -227,6 +228,6 @@ public class Card extends BaseClass<Contact> {
 
        @Override
        public String getState() {
-               return "" + name + format;
+               return ("" + name + format).replace(' ', '_');
        }
 }