summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Beckett <dave@dajobe.org>2001-07-22 20:49:35 +0000
committerDave Beckett <dave@dajobe.org>2001-07-22 20:49:35 +0000
commit765e6dff76ec02b47dabb74805bacad8c3a8497e (patch)
treee0d11b8e72ff86e8213ac26c2f456b153e529767
parent595c7bae0194395cba1ab36899b4a86c2fab2ee9 (diff)
downloadraptor-765e6dff76ec02b47dabb74805bacad8c3a8497e.tar.gz
(raptor_print_statement_detailed): Handle _:name subject, object
stored as strings, not URIs.
-rw-r--r--src/raptor_general.c10
-rw-r--r--src/raptor_parse.c10
-rw-r--r--src/raptor_rdfxml.c10
3 files changed, 21 insertions, 9 deletions
diff --git a/src/raptor_general.c b/src/raptor_general.c
index e786a66b..c9e1ddb1 100644
--- a/src/raptor_general.c
+++ b/src/raptor_general.c
@@ -2499,8 +2499,11 @@ static void
raptor_print_statement_detailed(const raptor_statement * statement,
int detailed, FILE *stream)
{
- fprintf(stream, "[%s, ",
- RAPTOR_URI_AS_STRING((raptor_uri*)statement->subject));
+ if(statement->subject_type == RAPTOR_SUBJECT_TYPE_ANONYMOUS)
+ fprintf(stream, "[%s, ", (const char*)statement->subject);
+ else
+ fprintf(stream, "[%s, ",
+ RAPTOR_URI_AS_STRING((raptor_uri*)statement->subject));
if(statement->predicate_type == RAPTOR_PREDICATE_TYPE_ORDINAL)
fprintf(stream, "[rdf:_%d]", *((int*)statement->predicate));
@@ -2512,7 +2515,8 @@ raptor_print_statement_detailed(const raptor_statement * statement,
if(statement->object_type == RAPTOR_OBJECT_TYPE_LITERAL ||
statement->object_type == RAPTOR_OBJECT_TYPE_XML_LITERAL)
fprintf(stream, ", \"%s\"]", (const char*)statement->object);
- else if(statement->object_type == RAPTOR_OBJECT_TYPE_XML_NAME)
+ else if(statement->object_type == RAPTOR_OBJECT_TYPE_XML_NAME ||
+ statement->object_type == RAPTOR_OBJECT_TYPE_ANONYMOUS)
fprintf(stream, ", %s]", (const char*)statement->object);
else
fprintf(stream, ", %s]",
diff --git a/src/raptor_parse.c b/src/raptor_parse.c
index e786a66b..c9e1ddb1 100644
--- a/src/raptor_parse.c
+++ b/src/raptor_parse.c
@@ -2499,8 +2499,11 @@ static void
raptor_print_statement_detailed(const raptor_statement * statement,
int detailed, FILE *stream)
{
- fprintf(stream, "[%s, ",
- RAPTOR_URI_AS_STRING((raptor_uri*)statement->subject));
+ if(statement->subject_type == RAPTOR_SUBJECT_TYPE_ANONYMOUS)
+ fprintf(stream, "[%s, ", (const char*)statement->subject);
+ else
+ fprintf(stream, "[%s, ",
+ RAPTOR_URI_AS_STRING((raptor_uri*)statement->subject));
if(statement->predicate_type == RAPTOR_PREDICATE_TYPE_ORDINAL)
fprintf(stream, "[rdf:_%d]", *((int*)statement->predicate));
@@ -2512,7 +2515,8 @@ raptor_print_statement_detailed(const raptor_statement * statement,
if(statement->object_type == RAPTOR_OBJECT_TYPE_LITERAL ||
statement->object_type == RAPTOR_OBJECT_TYPE_XML_LITERAL)
fprintf(stream, ", \"%s\"]", (const char*)statement->object);
- else if(statement->object_type == RAPTOR_OBJECT_TYPE_XML_NAME)
+ else if(statement->object_type == RAPTOR_OBJECT_TYPE_XML_NAME ||
+ statement->object_type == RAPTOR_OBJECT_TYPE_ANONYMOUS)
fprintf(stream, ", %s]", (const char*)statement->object);
else
fprintf(stream, ", %s]",
diff --git a/src/raptor_rdfxml.c b/src/raptor_rdfxml.c
index e786a66b..c9e1ddb1 100644
--- a/src/raptor_rdfxml.c
+++ b/src/raptor_rdfxml.c
@@ -2499,8 +2499,11 @@ static void
raptor_print_statement_detailed(const raptor_statement * statement,
int detailed, FILE *stream)
{
- fprintf(stream, "[%s, ",
- RAPTOR_URI_AS_STRING((raptor_uri*)statement->subject));
+ if(statement->subject_type == RAPTOR_SUBJECT_TYPE_ANONYMOUS)
+ fprintf(stream, "[%s, ", (const char*)statement->subject);
+ else
+ fprintf(stream, "[%s, ",
+ RAPTOR_URI_AS_STRING((raptor_uri*)statement->subject));
if(statement->predicate_type == RAPTOR_PREDICATE_TYPE_ORDINAL)
fprintf(stream, "[rdf:_%d]", *((int*)statement->predicate));
@@ -2512,7 +2515,8 @@ raptor_print_statement_detailed(const raptor_statement * statement,
if(statement->object_type == RAPTOR_OBJECT_TYPE_LITERAL ||
statement->object_type == RAPTOR_OBJECT_TYPE_XML_LITERAL)
fprintf(stream, ", \"%s\"]", (const char*)statement->object);
- else if(statement->object_type == RAPTOR_OBJECT_TYPE_XML_NAME)
+ else if(statement->object_type == RAPTOR_OBJECT_TYPE_XML_NAME ||
+ statement->object_type == RAPTOR_OBJECT_TYPE_ANONYMOUS)
fprintf(stream, ", %s]", (const char*)statement->object);
else
fprintf(stream, ", %s]",