Bläddra i källkod

Move get() to Ldpr.

Stefano Cossu 7 år sedan
förälder
incheckning
37fa8e5f2e
3 ändrade filer med 7 tillägg och 13 borttagningar
  1. 1 4
      lakesuperior/model/ldp_nr.py
  2. 0 7
      lakesuperior/model/ldp_rs.py
  3. 6 2
      lakesuperior/model/ldpr.py

+ 1 - 4
lakesuperior/model/ldp_nr.py

@@ -31,6 +31,7 @@ class LdpNr(Ldpr):
             self.workflow = self.WRKF_INBOUND
             self.stream = stream
         else:
+            self._imr_options = {}
             self.workflow = self.WRKF_OUTBOUND
 
         self.mimetype = mimetype
@@ -51,10 +52,6 @@ class LdpNr(Ldpr):
 
     ## LDP METHODS ##
 
-    def get(self, **kwargs):
-        return LdpRs(self.uuid).get(**kwargs)
-
-
     @atomic
     def _create_or_replace_rsrc(self, create_only=False):
         '''

+ 0 - 7
lakesuperior/model/ldp_rs.py

@@ -37,13 +37,6 @@ class LdpRs(Ldpr):
 
     ## LDP METHODS ##
 
-    def get(self):
-        '''
-        https://www.w3.org/TR/ldp/#ldpr-HTTP_GET
-        '''
-        return self.out_graph.serialize(format='turtle')
-
-
     @atomic
     def patch(self, update_str):
         '''

+ 6 - 2
lakesuperior/model/ldpr.py

@@ -434,8 +434,12 @@ class Ldpr(metaclass=ABCMeta):
         return out_headers
 
 
-    def get(self, *args, **kwargs):
-        raise NotImplementedError()
+    def get(self):
+        '''
+        This gets the RDF metadata. The binary retrieval is handled directly
+        by the route.
+        '''
+        return self.out_graph.serialize(format='turtle')
 
 
     @atomic