Skip to content

Commit

Permalink
Better method comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco De Salvo committed Jan 22, 2025
1 parent 7f53b9a commit dfd462d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions RDFSharp/Store/RDFContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ limitations under the License.
namespace RDFSharp.Store
{
/// <summary>
/// RDFContext represents an object which can act as C-token of a pattern.
/// It cannot start with "bnode:" because blank contexts are not supported.
/// RDFContext is an Uri representing the "provenance" of a triple in the worldwide LinkedData network.<br/>
/// It cannot be a blank resource, since its meaning is to answer "where does this triple come from?".
/// </summary>
public class RDFContext : RDFPatternMember
{
Expand Down Expand Up @@ -66,8 +66,7 @@ public RDFContext(Uri ctxUri) : this(ctxUri?.ToString()) { }
/// <summary>
/// Gives the string representation of the store context
/// </summary>
public override string ToString()
=> Context.ToString();
public override string ToString() => Context.ToString();
#endregion
}
}
4 changes: 2 additions & 2 deletions RDFSharp/Store/RDFQuadruple.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ limitations under the License.
namespace RDFSharp.Store
{
/// <summary>
/// RDFQuadruple represents a quadruple in the RDF store.
/// RDFQuadruple represents a quadruple (context-aware triple) in the RDF store.
/// </summary>
public class RDFQuadruple : IEquatable<RDFQuadruple>
{
Expand Down Expand Up @@ -177,7 +177,7 @@ public RDFMemoryStore ReifyQuadruple()
}

/// <summary>
/// RDFIndexedQuadruple represents the internal hashed representation of a quadruple in the library
/// RDFIndexedQuadruple represents the internal hashed representation of a quadruple
/// </summary>
internal class RDFIndexedQuadruple : IEquatable<RDFIndexedQuadruple>
{
Expand Down
4 changes: 2 additions & 2 deletions RDFSharp/Store/RDFStoreUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ public static RDFQuadruple ParseQuadruple(IDataReader fetchedQuadruples)
{
if (fetchedQuadruples == null)
throw new RDFStoreException("Cannot parse quadruple because given \"fetchedQuadruples\" parameter is null.");

RDFContext qContext = new RDFContext(fetchedQuadruples["Context"].ToString());
RDFResource qSubject = new RDFResource(fetchedQuadruples["Subject"].ToString());
RDFResource qPredicate = new RDFResource(fetchedQuadruples["Predicate"].ToString());

//SPO-flavour quadruple
if (fetchedQuadruples["TripleFlavor"].ToString().Equals("1"))
if (string.Equals(fetchedQuadruples["TripleFlavor"].ToString(), "1"))
{
RDFResource qObject = new RDFResource(fetchedQuadruples["Object"].ToString());
return new RDFQuadruple(qContext, qSubject, qPredicate, qObject);
Expand Down

0 comments on commit dfd462d

Please sign in to comment.