| 1 | 4 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | package File::ArchivableFormats::Plugin::DANS; | ||
| 3 | 4 | our $VERSION = '1.8'; | |
| 4 | 4 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 4 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | # ABSTRACT: DANS module for archivable formats | ||
| 8 | |||
| 9 | 4 | with 'File::ArchivableFormats::Plugin'; | |
| 10 | |||
| 11 | 4 | has '+name' => (default => 'DANS'); | |
| 12 | |||
| 13 | 2 | ▶ | sub _build_preferred_formats { |
|
Subroutine
_build_preferred_formats: called CC=1 SCAR=0.0
| |||
| 14 | 2 | my $self = shift; | |
| 15 | |||
| 16 | 2 | my %preferred = ( | |
| 17 | '.7bdat' => { | ||
| 18 | allowed_extensions => ['.7bdat'], | ||
| 19 | types => ['Statistical data (SAS)'], | ||
| 20 | }, | ||
| 21 | 'audio/x-aac' => { | ||
| 22 | allowed_extensions => ['.aac'], | ||
| 23 | types => ['Audio (AAC)'], | ||
| 24 | }, | ||
| 25 | 'model/vnd.collada+xml' => { | ||
| 26 | allowed_extensions => ['.dae'], | ||
| 27 | types => ['3D (COLLADA)'], | ||
| 28 | }, | ||
| 29 | '.dta' => { | ||
| 30 | allowed_extensions => ['.dta'], | ||
| 31 | types => ['Statistical data (STATA)'], | ||
| 32 | }, | ||
| 33 | 'image/vnd.dwg' => { | ||
| 34 | allowed_extensions => ['.dwg'], | ||
| 35 | types => ['Computer Aided Design (CAD) (AutoCAD, other versions)'], | ||
| 36 | }, | ||
| 37 | 'image/vnd.dxf' => { | ||
| 38 | allowed_extensions => ['.dxf'], | ||
| 39 | types => [ | ||
| 40 | 'Computer Aided Design (CAD) (AutoCAD DXF v. R12)', | ||
| 41 | 'Computer Aided Design (CAD) (AutoCAD, other versions)', | ||
| 42 | ], | ||
| 43 | }, | ||
| 44 | '.fbx' => { | ||
| 45 | allowed_extensions => ['.fbx'], | ||
| 46 | types => ['3D (Autodesk FBX)'], | ||
| 47 | }, | ||
| 48 | 'application/x-gml+xml' => { | ||
| 49 | allowed_extensions => ['.gml'], | ||
| 50 | types => ['Geographical Information (GIS) (GML)'], | ||
| 51 | }, | ||
| 52 | '.grd' => { | ||
| 53 | allowed_extensions => ['.grd '], | ||
| 54 | types => ['Raspter GIS (ESRI GRID)'], | ||
| 55 | }, | ||
| 56 | 'application/x-hdf' => { | ||
| 57 | allowed_extensions => ['.h5', '.hdf5', '.he5'], | ||
| 58 | types => ['HDF5'], | ||
| 59 | }, | ||
| 60 | 'application/x-tgifapplication/x-tgif' => { | ||
| 61 | allowed_extensions => ['.obj'], | ||
| 62 | types => ['3D (WaveFront Object)'], | ||
| 63 | }, | ||
| 64 | 'application/x-spss-por' => { | ||
| 65 | allowed_extensions => ['.por'], | ||
| 66 | types => ['Statistical data (SPSS Portable)'], | ||
| 67 | }, | ||
| 68 | 'application/x-spss' => { | ||
| 69 | allowed_extensions => ['.sav'], | ||
| 70 | types => ['Statistical data (SPSS)'], | ||
| 71 | }, | ||
| 72 | 'text/x-sgml' => { | ||
| 73 | allowed_extensions => ['.sgml'], | ||
| 74 | types => ['Markup language (SGML)'], | ||
| 75 | }, | ||
| 76 | 'application/x-qgis' => { | ||
| 77 | allowed_extensions => ['.shp'], | ||
| 78 | types => ['Geographical Information (GIS) (ESRI Shapefiles)'], | ||
| 79 | }, | ||
| 80 | '.siard' => { | ||
| 81 | allowed_extensions => ['.siard'], | ||
| 82 | types => ['Databases (SIARD)'], | ||
| 83 | }, | ||
| 84 | '.tab' => { | ||
| 85 | allowed_extensions => ['.tab '], | ||
| 86 | types => ['Geographical Information (GIS) (MapInfo)'], | ||
| 87 | }, | ||
| 88 | '.tfw' => { | ||
| 89 | allowed_extensions => ['.tfw '], | ||
| 90 | types => ['Images (geo reference) (TIFF World File)'], | ||
| 91 | }, | ||
| 92 | 'application/vnd.trid.tpt' => { | ||
| 93 | allowed_extensions => ['.tpt'], | ||
| 94 | types => ['Statistical data (SAS)'], | ||
| 95 | }, | ||
| 96 | 'application/xslt+xml' => { | ||
| 97 | allowed_extensions => ['.xslt'], | ||
| 98 | types => ['Markup language (Related files)'], | ||
| 99 | }, | ||
| 100 | 'ATLAS.TI copy bundle' => { | ||
| 101 | allowed_extensions => [], | ||
| 102 | types => [ | ||
| 103 | 'Computer Assisted Qualitative Data Analysis (CAQDAS) (Application’s export formats)' | ||
| 104 | ], | ||
| 105 | }, | ||
| 106 | 'NVIVO export project' => { | ||
| 107 | allowed_extensions => [], | ||
| 108 | types => [ | ||
| 109 | 'Computer Assisted Qualitative Data Analysis (CAQDAS) (Application’s export formats)' | ||
| 110 | ], | ||
| 111 | }, | ||
| 112 | 'application/ecmascript' => { | ||
| 113 | allowed_extensions => ['.es'], | ||
| 114 | types => ['Markup language (Related files)'], | ||
| 115 | }, | ||
| 116 | 'application/javascript' => { | ||
| 117 | allowed_extensions => ['.js'], | ||
| 118 | types => ['Markup language (Related files)'], | ||
| 119 | }, | ||
| 120 | 'application/msword' => { | ||
| 121 | allowed_extensions => ['.doc'], | ||
| 122 | types => ['Text documents (MS Word)'], | ||
| 123 | }, | ||
| 124 | 'application/pdf' => { | ||
| 125 | allowed_extensions => ['.pdf'], | ||
| 126 | types => [ | ||
| 127 | 'Text documents (PDF/A)', | ||
| 128 | 'Text documents (PDF)', | ||
| 129 | 'Spreadsheets (PDF/A)', | ||
| 130 | ], | ||
| 131 | }, | ||
| 132 | 'application/postscript' => { | ||
| 133 | allowed_extensions => ['.ai', '.eps'], | ||
| 134 | types => | ||
| 135 | ['Images (vector) (Illustrator)', 'Images (vector) (EPS)'], | ||
| 136 | }, | ||
| 137 | 'application/rtf' => { | ||
| 138 | allowed_extensions => ['.rtf'], | ||
| 139 | types => ['Text documents (RTF)'], | ||
| 140 | }, | ||
| 141 | 'text/rtf' => { | ||
| 142 | allowed_extensions => ['.rtf'], | ||
| 143 | types => ['Text documents (RTF)'], | ||
| 144 | }, | ||
| 145 | 'application/vnd.google-earth.kml+xml' => { | ||
| 146 | allowed_extensions => ['.kml'], | ||
| 147 | types => ['Geographical Information (GIS) (KML)'], | ||
| 148 | }, | ||
| 149 | 'application/vnd.ms-excel' => { | ||
| 150 | allowed_extensions => ['.xls'], | ||
| 151 | types => ['Spreadsheets (MS Excel)'], | ||
| 152 | }, | ||
| 153 | 'application/vnd.ms-word.document.macroEnabled.12' => { | ||
| 154 | allowed_extensions => ['.docm'], | ||
| 155 | types => ['Spreadsheets (OOXML)'], | ||
| 156 | }, | ||
| 157 | 'application/vnd.oasis.opendocument.spreadsheet' => { | ||
| 158 | allowed_extensions => ['.ods'], | ||
| 159 | types => ['Spreadsheets (ODS)'], | ||
| 160 | }, | ||
| 161 | 'application/vnd.oasis.opendocument.text' => { | ||
| 162 | allowed_extensions => ['.odt'], | ||
| 163 | types => ['Text documents (ODT)'], | ||
| 164 | }, | ||
| 165 | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => | ||
| 166 | { | ||
| 167 | allowed_extensions => ['.xlsx'], | ||
| 168 | types => ['Spreadsheets (MS Excel)'], | ||
| 169 | }, | ||
| 170 | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | ||
| 171 | => { | ||
| 172 | allowed_extensions => ['.docx'], | ||
| 173 | types => ['Text documents (MS Word)', 'Spreadsheets (OOXML)'], | ||
| 174 | }, | ||
| 175 | 'application/x-mif' => { | ||
| 176 | allowed_extensions => ['.mif'], | ||
| 177 | types => ['Geographical Information (GIS) (MIF/MID)'], | ||
| 178 | }, | ||
| 179 | 'application/vnd.mif' => { | ||
| 180 | allowed_extensions => ['.mif'], | ||
| 181 | types => ['Geographical Information (GIS) (MIF/MID)'], | ||
| 182 | }, | ||
| 183 | 'application/vnd.mid' => { | ||
| 184 | allowed_extensions => ['.mid'], | ||
| 185 | types => ['Geographical Information (GIS) (MIF/MID)'] | ||
| 186 | }, | ||
| 187 | 'application/x-mid' => { | ||
| 188 | allowed_extensions => ['.mid'], | ||
| 189 | types => ['Geographical Information (GIS) (MIF/MID)'] | ||
| 190 | }, | ||
| 191 | 'application/x-sql' => { | ||
| 192 | allowed_extensions => ['.sql'], | ||
| 193 | types => ['Databases (SQL)'], | ||
| 194 | }, | ||
| 195 | 'application/xhtml+xml' => { | ||
| 196 | allowed_extensions => ['.xhtml'], | ||
| 197 | types => ['Markup language (HTML)'], | ||
| 198 | }, | ||
| 199 | 'application/xml' => { | ||
| 200 | allowed_extensions => ['.xml'], | ||
| 201 | types => ['Markup language (XML)', 'Statistical data (DDI)'], | ||
| 202 | }, | ||
| 203 | 'audio/flac' => { | ||
| 204 | allowed_extensions => ['.flac'], | ||
| 205 | types => ['Audio (FLAC)'], | ||
| 206 | }, | ||
| 207 | 'audio/midi' => { | ||
| 208 | allowed_extensions => ['.mid'], | ||
| 209 | types => ['Geographical Information (GIS) (MIF/MID)'], | ||
| 210 | }, | ||
| 211 | 'audio/mpeg' => { | ||
| 212 | allowed_extensions => ['.mp3', '.m4a'], | ||
| 213 | types => ['Audio (MP3)', 'Audio (AAC)'], | ||
| 214 | }, | ||
| 215 | 'audio/x-aiff' => { | ||
| 216 | allowed_extensions => ['.aiff', '.aif'], | ||
| 217 | types => ['Audio (AIFF)', 'Audio (AIFF)'], | ||
| 218 | }, | ||
| 219 | 'audio/x-sd2' => { | ||
| 220 | allowed_extensions => ['.sd2'], | ||
| 221 | types => ['Statistical data (SAS)'], | ||
| 222 | }, | ||
| 223 | 'audio/x-wav' => { | ||
| 224 | allowed_extensions => ['.wav'], | ||
| 225 | types => ['Audio (WAVE; BWF)'], | ||
| 226 | }, | ||
| 227 | 'by mutual agreement' => { | ||
| 228 | allowed_extensions => ['.jp2', '.dcm'], | ||
| 229 | types => ['(.jp2) (DICOM (.dcm))'], | ||
| 230 | }, | ||
| 231 | 'image/jpeg' => { | ||
| 232 | allowed_extensions => ['.jpeg', '.jpg'], | ||
| 233 | types => ['Raster Images (JPEG)', 'Raster Images (JPG)'], | ||
| 234 | }, | ||
| 235 | 'image/png' => { | ||
| 236 | allowed_extensions => ['.png'], | ||
| 237 | types => ['Raster Images (PNG)'], | ||
| 238 | }, | ||
| 239 | 'image/svg+xml' => { | ||
| 240 | allowed_extensions => ['.svg'], | ||
| 241 | types => ['Images (vector) (SVG)'], | ||
| 242 | }, | ||
| 243 | 'image/tiff' => { | ||
| 244 | allowed_extensions => ['.tif', '.tiff'], | ||
| 245 | types => [ | ||
| 246 | 'Raster Images (TIFF)', | ||
| 247 | 'Images (geo reference) (GeoTIFF)', | ||
| 248 | 'Images (geo reference) (TIFF World File)' | ||
| 249 | ], | ||
| 250 | }, | ||
| 251 | 'model/x3d+xml' => { | ||
| 252 | allowed_extensions => ['.x3d'], | ||
| 253 | types => ['3D (X3D)'], | ||
| 254 | }, | ||
| 255 | 'related files' => { | ||
| 256 | allowed_extensions => [], | ||
| 257 | types => [ | ||
| 258 | 'Geographical Information (GIS) (ESRI Shapefiles)', | ||
| 259 | 'Raspter GIS (ESRI GRID)', | ||
| 260 | 'Geographical Information (GIS) (MapInfo)' | ||
| 261 | ], | ||
| 262 | }, | ||
| 263 | 'text/css' => { | ||
| 264 | allowed_extensions => ['.css'], | ||
| 265 | types => ['Markup language (Related files)'], | ||
| 266 | }, | ||
| 267 | 'text/csv' => { | ||
| 268 | allowed_extensions => ['.csv'], | ||
| 269 | types => ['Spreadsheets (CSV)', 'Databases (DB tables)'], | ||
| 270 | }, | ||
| 271 | 'text/html' => { | ||
| 272 | allowed_extensions => ['.html'], | ||
| 273 | types => ['Markup language (HTML)'], | ||
| 274 | }, | ||
| 275 | 'text/plain' => { | ||
| 276 | preferred_extension => '.txt', | ||
| 277 | allowed_extensions => ['.asc', '.txt'], | ||
| 278 | types => [ | ||
| 279 | 'Plain text (Unicode)', | ||
| 280 | 'Plain text (Non-Unicode)', | ||
| 281 | 'Statistical data (data (.csv) + setup)', | ||
| 282 | 'Raspter GIS (ASCII GRID)', | ||
| 283 | ], | ||
| 284 | }, | ||
| 285 | 'text/markdown' => { | ||
| 286 | allowed_extensions => ['.md'], | ||
| 287 | types => [ | ||
| 288 | 'Plain text (markdown)', | ||
| 289 | ], | ||
| 290 | }, | ||
| 291 | 'text/x-readme' => { | ||
| 292 | preferred_extension => '.txt', | ||
| 293 | allowed_extensions => [], | ||
| 294 | types => [ | ||
| 295 | 'Plain text (README)', | ||
| 296 | ], | ||
| 297 | }, | ||
| 298 | 'application/x-dbf' => { | ||
| 299 | allowed_extensions => ['.dbf'], | ||
| 300 | types => ['dBase'], | ||
| 301 | }, | ||
| 302 | 'video/mpeg' => { | ||
| 303 | allowed_extensions => ['.mpg', '.mpeg'], | ||
| 304 | types => ['Video (MPEG-2)', 'Video (MPEG-2)'], | ||
| 305 | }, | ||
| 306 | 'video/mp4' => { | ||
| 307 | allowed_extensions => ['.mp4'], | ||
| 308 | types => ['MPEG-4'], | ||
| 309 | }, | ||
| 310 | 'video/quicktime' => { | ||
| 311 | allowed_extensions => ['.mov'], | ||
| 312 | types => ['QuickTime'], | ||
| 313 | }, | ||
| 314 | 'video/x-matroska' => { | ||
| 315 | allowed_extensions => ['.mkv'], | ||
| 316 | types => ['MKV'], | ||
| 317 | }, | ||
| 318 | 'video/x-msvideo' => { | ||
| 319 | allowed_extensions => ['.avi'], | ||
| 320 | types => ['Lossless AVI'], | ||
| 321 | }, | ||
| 322 | # Unknown | ||
| 323 | '.caqdas' => { | ||
| 324 | allowed_extensions => ['.caqdas'], | ||
| 325 | types => [ | ||
| 326 | 'Computer Assisted Qualitative Data Analysis (CAQDAS) (Application’s export formats)' | ||
| 327 | ], | ||
| 328 | } | ||
| 329 | ); | ||
| 330 | 2 | return \%preferred; | |
| 331 | } | ||
| 332 | |||
| 333 | 4 | __PACKAGE__->meta->make_immutable; | |
| 334 | |||
| 335 | __END__ | ||