Hi, I have written some prototype/template code that doesn't function yet, but it is a basic attempt at RDF/XML processor output. I am attaching it to this email so people who know about the way Biomart works a little better can improve it and hopefully distribute it with Biomart. It is designed to allow users to generate RDF/XML output using the current XML Query format as long as some property URIs are defined in the configuration to provide mappings based on property names/dataset/mart contexts.
It doesn't currently depend on any information from a SPARQL query,
but it could be connected with that infrastructure as an alternative
output for SPARQL queries that is being constructed using
org.biomart.api.rest.SPARQLResource and org.biomart.processors.RDF.
RDF/XML allows you to process SPARQL Construct queries in addition to
Select queries. The only difference with Construct compared to Select
is that you find out what result variables are required based on the
"CONSTRUCT { ?resultObject <property:xyz> ?xyz ...}" BasicGraphPattern
instead of from the "SELECT ?xyz ?abc" list
Is it possible to extend the Processor definitions to include the
processor name as an annotation in a similar way to @ContentType? If I
understand it correctly, the current way maps the output name, for
example TSV or RDFXML, directly to the class name, which isn't ideal
given that annotations are used for the other major extensions. I
included an example of this in the attached file using the example
annotation @ProcessorName.
In future versions, 0.9 maybe, is there any possibility that
Processors can use an alternative method of receiving information? The
TSV stream works well for TSV, but it makes it a little difficult to
implement alternative output methods. In looking around, it seems like
QueryRunner is the last place that results are handled as List/Arrays
of String's before they are written as bytes to the OutputStream that
is then filtered by Processors. It may be possible to extend
QueryRunner to provide an alternative output method using List<String>
or even using an overall results set encapsulated in a
Collection<List<String>> so clients can directly handle entire rows of
results without having to restore them into List<String> based on
bytes that are written to the stream between NEWLINE characters.
Cheers,
Peter
RDFXML.java
Description: Binary data
_______________________________________________ Users mailing list [email protected] https://lists.biomart.org/mailman/listinfo/users
