From 76c36820a7023261c031e6bdc691e997c0e6fae2 Mon Sep 17 00:00:00 2001 From: esoe Date: Wed, 19 Oct 2022 15:50:20 +0300 Subject: [PATCH] qq --- files/src/main/docs/diagrams/src/Files.puml | 15 +++++++++++++++ files/src/main/{doc => docs}/j110-lab2.pdf | Bin files/src/main/java/ru/molokoin/Extension.java | 8 ++++++++ files/src/main/java/ru/molokoin/File.java | 9 +++++++++ files/src/main/java/ru/molokoin/Format.java | 8 ++++++++ files/src/main/java/ru/molokoin/files.java | 3 --- 6 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 files/src/main/docs/diagrams/src/Files.puml rename files/src/main/{doc => docs}/j110-lab2.pdf (100%) create mode 100644 files/src/main/java/ru/molokoin/Extension.java create mode 100644 files/src/main/java/ru/molokoin/File.java create mode 100644 files/src/main/java/ru/molokoin/Format.java delete mode 100644 files/src/main/java/ru/molokoin/files.java diff --git a/files/src/main/docs/diagrams/src/Files.puml b/files/src/main/docs/diagrams/src/Files.puml new file mode 100644 index 0000000..2df3767 --- /dev/null +++ b/files/src/main/docs/diagrams/src/Files.puml @@ -0,0 +1,15 @@ +@startuml Files +title Files class diagram +class File { + String name + byte size +} +enum Format{ + DOCUMENT + IMAGE + AUDIO + VIDEO + OTHER +} + +@enduml \ No newline at end of file diff --git a/files/src/main/doc/j110-lab2.pdf b/files/src/main/docs/j110-lab2.pdf similarity index 100% rename from files/src/main/doc/j110-lab2.pdf rename to files/src/main/docs/j110-lab2.pdf diff --git a/files/src/main/java/ru/molokoin/Extension.java b/files/src/main/java/ru/molokoin/Extension.java new file mode 100644 index 0000000..9e4b683 --- /dev/null +++ b/files/src/main/java/ru/molokoin/Extension.java @@ -0,0 +1,8 @@ +public enum Extension { + DOCUMENT, + IMAGE, + AUDIO, + VIDEO, + OTHER; + +} diff --git a/files/src/main/java/ru/molokoin/File.java b/files/src/main/java/ru/molokoin/File.java new file mode 100644 index 0000000..8cc0d3c --- /dev/null +++ b/files/src/main/java/ru/molokoin/File.java @@ -0,0 +1,9 @@ +import annota +Format (name=noname; size=0; extension=Extension.OTHER) +public class File { + private String name; + private byte size; + + //читаем днные аннотации + +} diff --git a/files/src/main/java/ru/molokoin/Format.java b/files/src/main/java/ru/molokoin/Format.java new file mode 100644 index 0000000..daf6f36 --- /dev/null +++ b/files/src/main/java/ru/molokoin/Format.java @@ -0,0 +1,8 @@ +@Inherited +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) +public @interface Format { + String name() default "noname"; + byte size() default "0"; + Extension extension () default Extension.OTHER; +} diff --git a/files/src/main/java/ru/molokoin/files.java b/files/src/main/java/ru/molokoin/files.java deleted file mode 100644 index 0828fe6..0000000 --- a/files/src/main/java/ru/molokoin/files.java +++ /dev/null @@ -1,3 +0,0 @@ -public class files { - -}