rdf4j-python 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,9 +7,9 @@ from ._base_model import _BaseModel
7
7
 
8
8
 
9
9
  @dataclass
10
- class RepositoryInfo(_BaseModel):
10
+ class RepositoryMetadata(_BaseModel):
11
11
  """
12
- Represents a repository information RDF4J.
12
+ Represents a repository metadata RDF4J.
13
13
  """
14
14
 
15
15
  id: str # The repository identifier
@@ -19,16 +19,27 @@ class RepositoryInfo(_BaseModel):
19
19
  writable: bool # Whether the repository is writable
20
20
 
21
21
  def __str__(self):
22
- # Custom string representation for easy printing
22
+ """
23
+ Returns a string representation of the RepositoryMetadata.
24
+
25
+ Returns:
26
+ str: A string representation of the RepositoryMetadata.
27
+ """
23
28
  return f"Repository(id={self.id}, title={self.title}, uri={self.uri})"
24
29
 
25
30
  @classmethod
26
31
  def from_rdflib_binding(
27
32
  cls, result: Mapping[Variable, Identifier]
28
- ) -> "RepositoryInfo":
33
+ ) -> "RepositoryMetadata":
29
34
  """
30
35
  Create a Repository instance from a SPARQL query result
31
36
  represented as a Mapping from rdflib Variables to Identifiers.
37
+
38
+ Args:
39
+ result (Mapping[Variable, Identifier]): The SPARQL query result.
40
+
41
+ Returns:
42
+ RepositoryMetadata: The RepositoryMetadata instance.
32
43
  """
33
44
 
34
45
  # Construct and return the Repository object