libcsem  0.2
csem_builder.h File Reference
#include "csem_tree.h"
#include "csem_url.h"

Go to the source code of this file.

Defines

#define CSEM_NS_C_BEGIN
#define CSEM_NS_C_END

Typedefs

typedef typedefCSEM_NS_C_BEGIN
struct CSEM_Builder 
CSEM_Builder
 Data model builder.

Functions

CSEM_Error CSEM_Builder_Create (CSEM_Builder **builder)
 Create new builder.
void CSEM_Builder_SetBaseURL (CSEM_Builder *builder, CSEM_Url *baseURL)
 Set base URL.
CSEM_Error CSEM_Builder_Parse (CSEM_Builder *builder, int fd)
 Parse the specified input stream and build a data model.
CSEM_Error CSEM_Builder_ParseChunk (CSEM_Builder *builder, const char *chunk, int size, int terminate)
 Parse the specified chunk data and build a part of the data model.
CSEM_Error CSEM_Builder_GetDocument (CSEM_Builder *builder, CSEM_Document **doc)
 Get the parsed result document.
void CSEM_Builder_Dispose (CSEM_Builder *builder)
 Dispose the builder.

Define Documentation

#define CSEM_NS_C_BEGIN
#define CSEM_NS_C_END

Typedef Documentation

typedef typedefCSEM_NS_C_BEGIN struct CSEM_Builder CSEM_Builder

Data model builder.


Function Documentation

Create new builder.

Parameters:
builder[out]builder to be created
Returns:
error code
Examples:
sample_micro_search.c, sample_micro_tree.c, sample_rdfa_search.c, and sample_rdfa_tree.c.
void CSEM_Builder_Dispose ( CSEM_Builder builder)

Dispose the builder.

Parameters:
builder[in]builder to be freed
Examples:
sample_micro_search.c, sample_micro_tree.c, sample_rdfa_search.c, and sample_rdfa_tree.c.

Get the parsed result document.

Parameters:
builder[in]builder
doc[out]parsed result document
Examples:
sample_micro_search.c, sample_micro_tree.c, sample_rdfa_search.c, and sample_rdfa_tree.c.
CSEM_Error CSEM_Builder_Parse ( CSEM_Builder builder,
int  fd 
)

Parse the specified input stream and build a data model.

Parameters:
builder[in]builder
fd[in]input stream
Returns:
error code
Examples:
sample_micro_search.c, sample_micro_tree.c, sample_rdfa_search.c, and sample_rdfa_tree.c.
CSEM_Error CSEM_Builder_ParseChunk ( CSEM_Builder builder,
const char *  chunk,
int  size,
int  terminate 
)

Parse the specified chunk data and build a part of the data model.

Parameters:
builder[in]builder
chunk[in]chunk data
size[in]size of the chunk
terminate[in]set 1 if the chunk is final data to be parsed. Otherwise, set 0.
Returns:
error code
void CSEM_Builder_SetBaseURL ( CSEM_Builder builder,
CSEM_Url baseURL 
)

Set base URL.

Parameters:
builder[in]builder
baseURL[in]base URL
Examples:
sample_micro_search.c, sample_micro_tree.c, sample_rdfa_search.c, and sample_rdfa_tree.c.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines