Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding properties to Statement #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/franz/openrdf/model/statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ def getSubject(self):

def setSubject(self, subject):
self.subject = subject


subject = property(getSubject, setSubject)

def getPredicate(self):
"""
Get the predicate (the second element of the statement).
Expand All @@ -124,7 +126,9 @@ def getPredicate(self):

def setPredicate(self, predicate):
self.predicate = predicate


predicate = property(getPredicate, setPredicate)

def getObject(self):
"""
Get the object (the third element of the statement).
Expand All @@ -139,7 +143,9 @@ def getObject(self):

def setObject(self, object):
self.object = object


object = property(getObject, setObject)

def getContext(self):
"""
Get the graph (the fourth, optional element of the statement).
Expand All @@ -155,6 +161,8 @@ def getContext(self):
def setContext(self, context):
self.context = context

context = property(getContext, setContext)

def getTripleID(self):
"""
Get the statement id.
Expand Down