Java Doc for BinaryQueryResultConstants.java in  » RSS-RDF » sesame » org » openrdf » query » resultio » binary » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » RSS RDF » sesame » org.openrdf.query.resultio.binary 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.openrdf.query.resultio.binary.BinaryQueryResultConstants

BinaryQueryResultConstants
public interface BinaryQueryResultConstants (Code)
Interface defining constants for the binary table result format. Files in this format consist of a header followed by zero or more records. Data fields are encoded as specified in the interfaces DataInput and DataOutput , except for the encoding of string values. String values are encoded in UTF-8 and are preceeded by a 32-bit integer specifying the length in bytes of this UTF-8 encoded string.

The file header is 13 bytes long:

  • Bytes 1-4 contain the ASCII codes for the string "BRTR", which stands for Binary RDF Table Result.
  • Bytes 5-8 specify the format version (an integer).
  • Byte 9 specifies some flags, specifically 'distinct' and 'ordered'.
  • Bytes 10-13 specify the number of columns of the query result that will follow (an integer).
Following this are the column headers, which are encoded as UTF-8 strings. There are as many column headers as the number of columns that has been specified in the header.

Zero or more records follow after the column headers. This can be a mixture of records describing a result and supporting records. The results table is described by the result records which are written from left to right, from top to bottom. Each record starts with a record type marker (a single byte). The following records are defined in the current format:

  • NULL (byte value: 0):
    This indicates a NULL value in the table and consists of nothing more than the record type marker.
  • REPEAT (byte value: 1):
    This indicates that the next value is identical to the value in the same column in the previous row. The REPEAT record consists of nothing more than the record type marker.
  • NAMESPACE (byte value: 2):
    This is a supporting record that assigns an ID (non-negative integer) to a namespace. This ID can later be used in in a QNAME record to combine it with a local name to form a full URI. The record type marker is followed by a non-negative integer for the ID and an UTF-8 encoded string for the namespace.
  • QNAME (byte value: 3):
    This indicates a URI value, the value of which is encoded as a namespace ID and a local name. The namespace ID is required to be mapped to a namespace in a previous NAMESPACE record. The record type marker is followed by a non-negative integer (the namespace ID) and an UTF-8 encoded string for the local name.
  • URI (byte value: 4):
    This also indicates a URI value, but one that does not use a namespace ID. This record type marker is simply followed by an UTF-8 encoded string for the full URI.
  • BNODE (byte value: 5):
    This indicates a blank node. The record type marker is followed by an UTF-8 encoded string for the bnode ID.
  • PLAIN_LITERAL (byte value: 6):
    This indicates a plain literal value. The record type marker is followed by an UTF-8 encoded string for the literal's label.
  • LANG_LITERAL (byte value: 7):
    This indicates a literal value with a language attribute. The record type marker is followed by an UTF-8 encoded string for the literal's label, followed by an UTF-8 encoded string for the language attribute.
  • DATATYPE_LITERAL (byte value: 8):
    This indicates a datatyped literal. The record type marker is followed by an UTF-8 encoded string for the literal's label. Following this label is either a QNAME or URI record for the literal's datatype.
  • ERROR (byte value: 126):
    This record indicates a error. The type of error is indicates by the byte directly following the record type marker: 1 for a malformed query error, 2 for a query evaluation error. The error type byte is followed by an UTF-8 string for the error message.
  • TABLE_END (byte value: 127):
    This is a special record that indicates the end of the results table and consists of nothing more than the record type marker. Any data following this record should be ignored.

author:
   Arjohn Kampman


Field Summary
final public static  intBNODE_RECORD_MARKER
    
final public static  intDATATYPE_LITERAL_RECORD_MARKER
    
final public static  intERROR_RECORD_MARKER
    
final public static  intFORMAT_VERSION
     The version number of the current format.
final public static  intLANG_LITERAL_RECORD_MARKER
    
final public static  byte[]MAGIC_NUMBER
     Magic number for Binary RDF Table Result files.
final public static  intMALFORMED_QUERY_ERROR
    
final public static  intNAMESPACE_RECORD_MARKER
    
final public static  intNULL_RECORD_MARKER
    
final public static  intPLAIN_LITERAL_RECORD_MARKER
    
final public static  intQNAME_RECORD_MARKER
    
final public static  intQUERY_EVALUATION_ERROR
    
final public static  intREPEAT_RECORD_MARKER
    
final public static  intTABLE_END_RECORD_MARKER
    
final public static  intURI_RECORD_MARKER
    



Field Detail
BNODE_RECORD_MARKER
final public static int BNODE_RECORD_MARKER(Code)



DATATYPE_LITERAL_RECORD_MARKER
final public static int DATATYPE_LITERAL_RECORD_MARKER(Code)



ERROR_RECORD_MARKER
final public static int ERROR_RECORD_MARKER(Code)



FORMAT_VERSION
final public static int FORMAT_VERSION(Code)
The version number of the current format.



LANG_LITERAL_RECORD_MARKER
final public static int LANG_LITERAL_RECORD_MARKER(Code)



MAGIC_NUMBER
final public static byte[] MAGIC_NUMBER(Code)
Magic number for Binary RDF Table Result files.



MALFORMED_QUERY_ERROR
final public static int MALFORMED_QUERY_ERROR(Code)



NAMESPACE_RECORD_MARKER
final public static int NAMESPACE_RECORD_MARKER(Code)



NULL_RECORD_MARKER
final public static int NULL_RECORD_MARKER(Code)



PLAIN_LITERAL_RECORD_MARKER
final public static int PLAIN_LITERAL_RECORD_MARKER(Code)



QNAME_RECORD_MARKER
final public static int QNAME_RECORD_MARKER(Code)



QUERY_EVALUATION_ERROR
final public static int QUERY_EVALUATION_ERROR(Code)



REPEAT_RECORD_MARKER
final public static int REPEAT_RECORD_MARKER(Code)



TABLE_END_RECORD_MARKER
final public static int TABLE_END_RECORD_MARKER(Code)



URI_RECORD_MARKER
final public static int URI_RECORD_MARKER(Code)





www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.