Poco::FastInfoset

class DocumentVocabulary

Library: FastInfoset
Package: FastInfoset
Header: Poco/FastInfoset/DocumentVocabulary.h

Description

Class DocumentVocabulary groups together all vocabularies used when de-/encoding a FISDocument.

Member Summary

Member Functions: attributeVocabulary, decodings, elementVocabulary, encodings, exists, index, init, initialize, operator -, operator =, restrictedAlphabets, setExternalDictionary, value, vocabularies, vocabulary

Types

VocabularyVector

typedef std::vector < XMLStringVocabulary * > VocabularyVector;

XMLStringVocabulary

typedef MapVocabulary < Poco::XML::XMLString > XMLStringVocabulary;

Enumerations

CharacterStringEncoding

UTF8 = 0

UTF16 = 1

RESTRICTEDALPHABET = 2

ENCODINGALGORITHM = 3

ID

RESTRICTED_ALPHABET = 0

ENCODING_ALGORITHM = 1

PREFIX = 2

NAMESPACE_NAME = 3

LOCAL_NAME = 4

OTHER_NCNAME = 5

OTHER_URI = 6

ATTRIBUTE_VALUE = 7

OTHER_STRING = 8

CHARACTER_CONTENT_CHUNK = 9

ELEMENT_NAME = 10

ATTRIBUTE_NAME = 11

INVALID = 0xffffffff

Constructors

DocumentVocabulary

DocumentVocabulary();

Creates the DocumentVocabulary.

DocumentVocabulary

DocumentVocabulary(
    const DocumentVocabulary & other
);

Copy constructor.

Destructor

~DocumentVocabulary

~DocumentVocabulary();

Destroys the DocumentVocabulary.

Member Functions

attributeVocabulary inline

QualifiedNameVocabulary & attributeVocabulary();

Returns the vocabulary used for QualifiedNames of attributes.

attributeVocabulary

const QualifiedNameVocabulary & attributeVocabulary() const;

Returns the vocabulary used for QualifiedNames of attributes.

decodings inline

DecodingAlgorithm & decodings();

Returns the decodings which are available per default.

elementVocabulary inline

QualifiedNameVocabulary & elementVocabulary();

Returns the vocabulary used for QualifiedNames of elements.

elementVocabulary

const QualifiedNameVocabulary & elementVocabulary() const;

Returns the vocabulary used for QualifiedNames of elements.

encodings inline

EncodingAlgorithm & encodings();

Returns the encodings which are available per default.

exists inline

Poco::UInt32 exists(
    ID vocabulary,
    const Poco::XML::XMLString & value,
    bool & valueExists
) const;

Returns the index for the given vocabulary and value if it exists. otherwise an invalid value is returned and valueExists is set to false.

index inline

Poco::UInt32 index(
    ID vocabulary,
    const Poco::XML::XMLString & value,
    bool & valueExisted
);

Returns the index for the given vocabulary and value. Automatically appends the value and assigns it a new index if the value does not exist yet.

init

void init();

Sets the minimum required entries.

initialize

void initialize(
    ID vocabulary,
    XMLStringVocabulary * pVoc
);

Initializes a vocabulary with the given one. Existing cached data will be cleared! Class takes ownership of the pointer.

operator -

DocumentVocabulary operator - (
    const DocumentVocabulary & doc
);

Subtracts from this object doc. the doc vocabulary must contain for each vocabulary less elements than this vocabulary. The returned Vocabulary will only contain the difference, url will be always empty note that the - operator ignores encodingalgos currently!

operator =

DocumentVocabulary & operator = (
    const DocumentVocabulary & voc
);

Assignement operator.

restrictedAlphabets inline

DocumentRestrictedAlphabet & restrictedAlphabets();

Returns the restricted alphabets, per default only the builtin ones are enabled.

restrictedAlphabets

const DocumentRestrictedAlphabet & restrictedAlphabets() const;

Returns the restricted alphabets, per default only the builtin ones are enabled.

setExternalDictionary inline

void setExternalDictionary(
    const Poco::URI & uri
);

value inline

const Poco::XML::XMLString & value(
    ID vocabulary,
    Poco::UInt32 idx
) const;

Returns the value for the given vocabulary and index. Throws an exception if vocabulary or idx are out of range.

vocabularies inline

const VocabularyVector & vocabularies() const;

vocabulary inline

XMLStringVocabulary & vocabulary(
    ID voc
);

vocabulary

const XMLStringVocabulary & vocabulary(
    ID voc
) const;