2018-06-04 22:54:01 +02:00
|
|
|
from typing import Dict
|
2018-03-31 15:46:50 +02:00
|
|
|
from . import abstract
|
|
|
|
|
2018-04-04 23:21:48 +02:00
|
|
|
|
2018-03-31 15:46:50 +02:00
|
|
|
class HarmlessParser(abstract.AbstractParser):
|
2018-04-02 23:40:08 +02:00
|
|
|
""" This is the parser for filetypes that do not contain metadata. """
|
2018-06-04 22:54:01 +02:00
|
|
|
mimetypes = {'application/xml', 'text/plain', 'application/rdf+xml'}
|
2018-03-31 15:46:50 +02:00
|
|
|
|
2018-06-04 20:39:27 +02:00
|
|
|
def __init__(self, filename: str) -> None:
|
2018-05-16 22:36:59 +02:00
|
|
|
super().__init__(filename)
|
2018-03-31 15:46:50 +02:00
|
|
|
self.filename = filename
|
|
|
|
self.output_filename = filename
|
|
|
|
|
2018-06-04 22:54:01 +02:00
|
|
|
def get_meta(self) -> Dict[str, str]:
|
2018-03-31 15:46:50 +02:00
|
|
|
return dict()
|
|
|
|
|
2018-06-04 22:54:01 +02:00
|
|
|
def remove_all(self) -> bool:
|
2018-03-31 15:46:50 +02:00
|
|
|
return True
|