aboutsummaryrefslogtreecommitdiffstats
path: root/bsie/extractor/generic/stat.py
diff options
context:
space:
mode:
Diffstat (limited to 'bsie/extractor/generic/stat.py')
-rw-r--r--bsie/extractor/generic/stat.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/bsie/extractor/generic/stat.py b/bsie/extractor/generic/stat.py
index 0b9ce29..92b51f3 100644
--- a/bsie/extractor/generic/stat.py
+++ b/bsie/extractor/generic/stat.py
@@ -1,17 +1,15 @@
"""Extract information from the file system, such as filesize.
-
-Part of the bsie module.
-A copy of the license is provided with the project.
-Author: Matthias Baumgartner, 2022
"""
-# imports
+# standard imports
import os
import typing
# bsie imports
-from bsie.base import extractor
from bsie.utils import bsfs, node, ns
+# inner-module imports
+from .. import base
+
# exports
__all__: typing.Sequence[str] = (
'Stat',
@@ -20,7 +18,7 @@ __all__: typing.Sequence[str] = (
## code ##
-class Stat(extractor.Extractor):
+class Stat(base.Extractor):
"""Extract information from the file system."""
CONTENT_READER = 'bsie.reader.stat.Stat'
@@ -29,13 +27,13 @@ class Stat(extractor.Extractor):
_callmap: typing.Dict[bsfs.schema.Predicate, typing.Callable[[os.stat_result], typing.Any]]
def __init__(self):
- super().__init__(bsfs.schema.Schema.from_string(extractor.SCHEMA_PREAMBLE + '''
+ super().__init__(bsfs.schema.from_string(base.SCHEMA_PREAMBLE + '''
bse:filesize rdfs:subClassOf bsfs:Predicate ;
- rdfs:domain bsfs:File ;
+ rdfs:domain bsn:Entity ;
rdfs:range xsd:integer ;
rdfs:label "File size"^^xsd:string ;
schema:description "File size of entity in some filesystem."^^xsd:string ;
- bsfs:unique "false"^^xsd:boolean .
+ bsfs:unique "true"^^xsd:boolean .
'''))
self._callmap = {
self.schema.predicate(ns.bse.filesize): self.__filesize,