Package com.stardog.stark.query.io.xml
Class AbstractSPARQLXMLWriter<T>
- java.lang.Object
-
- com.stardog.stark.query.io.xml.AbstractSPARQLXMLWriter<T>
-
- All Implemented Interfaces:
QueryResultWriter<T>
,QueryResultHandler<T>
- Direct Known Subclasses:
SPARQLXMLBooleanResultWriter
,SPARQLXMLSelectResultWriter
public abstract class AbstractSPARQLXMLWriter<T> extends java.lang.Object implements QueryResultWriter<T>
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BINDING_NAME_ATT
static java.lang.String
BINDING_TAG
static java.lang.String
BNODE_TAG
static java.lang.String
BOOLEAN_FALSE
static java.lang.String
BOOLEAN_TAG
static java.lang.String
BOOLEAN_TRUE
static java.lang.String
CONTEXT_TAG
protected boolean
documentOpen
static java.lang.String
HEAD_TAG
protected boolean
headerComplete
protected boolean
headerOpen
static java.lang.String
HREF_ATT
static java.lang.String
LINK_TAG
static java.lang.String
LITERAL_DATATYPE_ATT
static java.lang.String
LITERAL_LANG_ATT
static java.lang.String
LITERAL_TAG
protected com.stardog.stark.impl.NamespacesImpl
mNamespaces
protected Options
mOptions
protected XMLWriter
mWriter
static java.lang.String
NAMESPACE
static java.lang.String
OBJECT_TAG
static java.lang.String
PREDICATE_TAG
static java.lang.String
QNAME
static java.lang.String
RESULT_SET_TAG
static java.lang.String
RESULT_TAG
static java.lang.String
ROOT_TAG
static java.lang.String
STATEMENT_TAG
static java.lang.String
SUBJECT_TAG
protected boolean
tupleVariablesFound
static java.lang.String
UNBOUND_TAG
static java.lang.String
URI_TAG
static java.lang.String
VAR_NAME_ATT
static java.lang.String
VAR_TAG
-
Constructor Summary
Constructors Constructor Description AbstractSPARQLXMLWriter(java.io.OutputStream theOutputStream, Options theOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
end()
Signal that query processing has completedvoid
links(java.util.List<java.lang.String> theLinks)
Handle the set of links from the resultvoid
namespace(java.lang.String thePrefix, java.lang.String theIRI)
void
start()
Indicates that writing has begun.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.stardog.stark.query.io.QueryResultWriter
format, handle
-
-
-
-
Field Detail
-
mWriter
protected final XMLWriter mWriter
-
mOptions
protected final Options mOptions
-
documentOpen
protected boolean documentOpen
-
headerOpen
protected boolean headerOpen
-
headerComplete
protected boolean headerComplete
-
tupleVariablesFound
protected boolean tupleVariablesFound
-
mNamespaces
protected final com.stardog.stark.impl.NamespacesImpl mNamespaces
-
NAMESPACE
public static final java.lang.String NAMESPACE
- See Also:
- Constant Field Values
-
ROOT_TAG
public static final java.lang.String ROOT_TAG
- See Also:
- Constant Field Values
-
HEAD_TAG
public static final java.lang.String HEAD_TAG
- See Also:
- Constant Field Values
-
LINK_TAG
public static final java.lang.String LINK_TAG
- See Also:
- Constant Field Values
-
VAR_TAG
public static final java.lang.String VAR_TAG
- See Also:
- Constant Field Values
-
VAR_NAME_ATT
public static final java.lang.String VAR_NAME_ATT
- See Also:
- Constant Field Values
-
HREF_ATT
public static final java.lang.String HREF_ATT
- See Also:
- Constant Field Values
-
BOOLEAN_TAG
public static final java.lang.String BOOLEAN_TAG
- See Also:
- Constant Field Values
-
BOOLEAN_TRUE
public static final java.lang.String BOOLEAN_TRUE
- See Also:
- Constant Field Values
-
BOOLEAN_FALSE
public static final java.lang.String BOOLEAN_FALSE
- See Also:
- Constant Field Values
-
RESULT_SET_TAG
public static final java.lang.String RESULT_SET_TAG
- See Also:
- Constant Field Values
-
RESULT_TAG
public static final java.lang.String RESULT_TAG
- See Also:
- Constant Field Values
-
BINDING_TAG
public static final java.lang.String BINDING_TAG
- See Also:
- Constant Field Values
-
BINDING_NAME_ATT
public static final java.lang.String BINDING_NAME_ATT
- See Also:
- Constant Field Values
-
URI_TAG
public static final java.lang.String URI_TAG
- See Also:
- Constant Field Values
-
BNODE_TAG
public static final java.lang.String BNODE_TAG
- See Also:
- Constant Field Values
-
LITERAL_TAG
public static final java.lang.String LITERAL_TAG
- See Also:
- Constant Field Values
-
LITERAL_LANG_ATT
public static final java.lang.String LITERAL_LANG_ATT
- See Also:
- Constant Field Values
-
LITERAL_DATATYPE_ATT
public static final java.lang.String LITERAL_DATATYPE_ATT
- See Also:
- Constant Field Values
-
UNBOUND_TAG
public static final java.lang.String UNBOUND_TAG
- See Also:
- Constant Field Values
-
QNAME
public static final java.lang.String QNAME
- See Also:
- Constant Field Values
-
STATEMENT_TAG
public static final java.lang.String STATEMENT_TAG
- See Also:
- Constant Field Values
-
SUBJECT_TAG
public static final java.lang.String SUBJECT_TAG
- See Also:
- Constant Field Values
-
PREDICATE_TAG
public static final java.lang.String PREDICATE_TAG
- See Also:
- Constant Field Values
-
OBJECT_TAG
public static final java.lang.String OBJECT_TAG
- See Also:
- Constant Field Values
-
CONTEXT_TAG
public static final java.lang.String CONTEXT_TAG
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractSPARQLXMLWriter
public AbstractSPARQLXMLWriter(@Nonnull java.io.OutputStream theOutputStream, @Nonnull Options theOptions)
-
-
Method Detail
-
links
public final void links(@Nonnull java.util.List<java.lang.String> theLinks) throws ResultWritingFailed
Handle the set of links from the result- Specified by:
links
in interfaceQueryResultHandler<T>
- Specified by:
links
in interfaceQueryResultWriter<T>
- Parameters:
theLinks
- The links- Throws:
ResultWritingFailed
- See Also:
- "link"
-
namespace
public final void namespace(@Nonnull java.lang.String thePrefix, @Nonnull java.lang.String theIRI) throws ResultWritingFailed
- Specified by:
namespace
in interfaceQueryResultWriter<T>
- Throws:
ResultWritingFailed
-
start
public final void start() throws ResultWritingFailed
Indicates that writing has begun.- Specified by:
start
in interfaceQueryResultHandler<T>
- Specified by:
start
in interfaceQueryResultWriter<T>
- Throws:
ResultWritingFailed
- if writing failed.
-
end
public final void end() throws ResultWritingFailed
Signal that query processing has completed- Specified by:
end
in interfaceQueryResultHandler<T>
- Specified by:
end
in interfaceQueryResultWriter<T>
- Throws:
ResultWritingFailed
-
-