Skip to content

Commit

Permalink
Make final attempt to compress
Browse files Browse the repository at this point in the history
  • Loading branch information
LeowWB committed Nov 11, 2019
1 parent dd642b5 commit d974e96
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 33 deletions.
29 changes: 5 additions & 24 deletions docs/DeveloperGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,7 @@ Once created, an `ExportPath` will expose the following relevant methods:
* `export(List<FlashCard> list)` -- Exports the given `List` of `FlashCards` to the file path embodied by this `ExportPath`
* `importFrom()` -- Attempts to import `FlashCards` from the file path represented by this `ExportPath`

CAUTION: Not all `ExportPath` subclasses will implement the `importFrom()` method. `DocumentPath`, for example, does not - this is because documents are
relatively unstructured and impractical to import from, and there are other reasons for exporting to a document (e.g. to use as cheat sheet).
CAUTION: Not all `ExportPath` subclasses will implement the `importFrom()` method. `DocumentPath`, for example, does not.

Because `ExportPath` follows the factory pattern, any class that deals with `ExportPath` or its subclasses need not know which particular subclass it is
dealing with exactly. Each `ExportPath` subclass will implement its own `export` and `import` methods, which, when called, will perform the required operations
Expand All @@ -327,23 +326,7 @@ NOTE: You can find all relevant classes in the `seedu.address.model.export` pack

The following table shows the classes and methods that you may have to deal with when exporting to or importing from each format:

[width="59%",cols="20%,35%,35%",options="header",]
|====

|**File format** |Document ('.docx') |JSON ('.json')

|**`ExportPath` subclass** |`DocumentPath` |`JsonExportPath`

a|**Export utility**
a|`DocumentExportUtil#exportFlashCardsToDocument( List<FlashCard>, DocumentPath)`
a|`JsonExportUtil#exportFlashCardsToJson( List<FlashCard>, JsonExportPath)`

a|**Import utility**
a|_None - importing not supported_
a|`JsonImportUtil#importFlashCardsFromJson( JsonExportPath)`

|**External library** |Apache POI |Jackson
|====
image::ExportDgTable.png[width="75%"]

_Table 1: Overview of classes and methods involved in the Export/Import feature_

Expand All @@ -358,16 +341,14 @@ _Figure 1: Class diagram of the classes directly relevant to importing and expor
The following sequence diagram shows the classes, methods, and interactions involved
when the user tries to `export` to a document file:

image::ExportSequenceDiagram.png[width = "600"]
image::ExportSequenceDiagram.png[]

_Figure 2: Sequence diagram showing the process of exporting to a document file_

NOTE: Due to a limitation of PlantUML, object lifelines in the diagram extend beyond the destroy markers. Of course, you should ignore this.

The following activity diagrams provide a general overview of the events that occur when a user executes an `export` or `import` command:

image:ExportActivityDiagram.png[width=430,height=518]
image:ImportActivityDiagram.png[width=373,height=513]
image:ExportActivityDiagram.png[width=440,height=518]
image:ImportActivityDiagram.png[width=383,height=513]

_Left - Figure 3: Activity diagram of the execution of an `export` command_ +
_Right - Figure 4: Activity diagram of the execution of an `import` command_
Expand Down
5 changes: 2 additions & 3 deletions docs/UserGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -367,15 +367,14 @@ image::ExportDemo1.png[width="600"]
+
image::ExportDemo2.png[width="600"]

. Navigate to the directory that you specified in the command (in this case, it would be `C:\Documents`). Sure enough, your exported file is there!
. Using your file explorer, navigate to the directory that you specified in the command (in this case, it would be `C:\Documents`). Sure enough, your exported file is there!
+
image::ExportDemo3.png[width="600"]

Please refer to the table below for a summary of the file formats that we support exporting to:

|====
|**Format**|Document|JSON
|**Extension**|'.docx'|'.json'
|**Format**|Document ('.docx')|JSON ('.json')
|**Intended purpose**|For use as a cheat sheet|For sharing
|**What is copied from each FlashCard**|Question and answer only|Question, answer, and the category which you specified in the export command
|====
Expand Down
Binary file modified docs/images/ExportDemo3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/ExportDgTable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/ExportSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/leowwbPppAdmonitions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 1 addition & 6 deletions docs/team/leowwb.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ _Figure 1. The graphical user interface of **KeyboardFlashCards**_

Please note the following symbols and formatting, which will appear throughout the rest of the document:

NOTE: A point of information to take note of

TIP: A tip or suggestion

CAUTION: A cautionary warning
image::leowwbPppAdmonitions.png[width="80%"]

== Summary of contributions

Expand Down Expand Up @@ -80,7 +76,6 @@ https://nus-cs2103-ay1920s1.github.io/tp-dashboard/#search=LeowWB&sort=totalComm
https://github.com/AY1920S1-CS2103T-T12-4/main/pull/19[#19],
https://github.com/AY1920S1-CS2103T-T12-4/main/pull/24[#24]
)
*** Created issue labels on GitHub for better issue management
** Documentation
*** Created an early framework for the User Guide (
https://github.com/AY1920S1-CS2103T-T12-4/main/pull/19[#19]
Expand Down

0 comments on commit d974e96

Please sign in to comment.