Library: FastInfoset
Package: FastInfoset
Header: Poco/FastInfoset/DocumentVocabulary.h
Class DocumentVocabulary groups together all vocabularies used when de-/encoding a FISDocument.
Member Functions: attributeVocabulary, decodings, elementVocabulary, encodings, exists, index, init, initialize, operator -, operator =, restrictedAlphabets, setExternalDictionary, value, vocabularies, vocabulary
typedef std::vector < XMLStringVocabulary * > VocabularyVector;
typedef MapVocabulary < Poco::XML::XMLString > XMLStringVocabulary;
UTF8 = 0
UTF16 = 1
PREFIX = 2
NAMESPACE_NAME = 3
LOCAL_NAME = 4
OTHER_NCNAME = 5
OTHER_URI = 6
ATTRIBUTE_VALUE = 7
OTHER_STRING = 8
ELEMENT_NAME = 10
ATTRIBUTE_NAME = 11
INVALID = 0xffffffff
Creates the DocumentVocabulary.
DocumentVocabulary(
const DocumentVocabulary & other
);
Copy constructor.
Destroys the DocumentVocabulary.
QualifiedNameVocabulary & attributeVocabulary();
Returns the vocabulary used for QualifiedNames of attributes.
const QualifiedNameVocabulary & attributeVocabulary() const;
Returns the vocabulary used for QualifiedNames of attributes.
DecodingAlgorithm & decodings();
Returns the decodings which are available per default.
QualifiedNameVocabulary & elementVocabulary();
Returns the vocabulary used for QualifiedNames of elements.
const QualifiedNameVocabulary & elementVocabulary() const;
Returns the vocabulary used for QualifiedNames of elements.
EncodingAlgorithm & encodings();
Returns the encodings which are available per default.
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.
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.
void init();
Sets the minimum required entries.
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.
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!
DocumentVocabulary & operator = (
const DocumentVocabulary & voc
);
Assignement operator.
DocumentRestrictedAlphabet & restrictedAlphabets();
Returns the restricted alphabets, per default only the builtin ones are enabled.
const DocumentRestrictedAlphabet & restrictedAlphabets() const;
Returns the restricted alphabets, per default only the builtin ones are enabled.
void setExternalDictionary(
const Poco::URI & uri
);
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.
const VocabularyVector & vocabularies() const;
XMLStringVocabulary & vocabulary(
ID voc
);
const XMLStringVocabulary & vocabulary(
ID voc
) const;