Package com.sun.xml.fastinfoset.vocab

Examples of com.sun.xml.fastinfoset.vocab.SerializerVocabulary


             * Create a serializer vocabulary external to the serializer.
             * This will ensure that the vocabulary will never be cleared
             * for each serialization and will be retained (and will grow)
             * for each serialization
             */
            SerializerVocabulary vocabulary = new SerializerVocabulary();
            serializer.setVocabulary(vocabulary);
            serializer.setMinAttributeValueSize(0);
            serializer.setMaxAttributeValueSize(indexedStringSizeLimit);
            serializer.setMinCharacterContentChunkSize(0);
            serializer.setMaxCharacterContentChunkSize(indexedStringSizeLimit);
View Full Code Here


import com.sun.xml.fastinfoset.vocab.SerializerVocabulary;

public class DefaultSerializerVocabularyFactory implements SerializerVocabularyFactory {

    public SerializerVocabulary newInstance() {
        return new SerializerVocabulary();
    }
View Full Code Here

            WSTCPCodecConfigurator configurator = WSTCPCodecConfigurator.INSTANCE;
            StAXDocumentSerializer serializer = configurator.getDocumentSerializerFactory().newInstance();
            serializer.setOutputStream(out);
           
            if (_retainState) {
                SerializerVocabulary vocabulary = configurator.getSerializerVocabularyFactory().newInstance();
                serializer.setVocabulary(vocabulary);
                serializer.setMinAttributeValueSize(
                        configurator.getMinAttributeValueSize());
                serializer.setMaxAttributeValueSize(
                        configurator.getMaxAttributeValueSize());
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void setExternalVocabulary(ExternalVocabulary v) {
        // Create internal serializer vocabulary
        _v = new SerializerVocabulary();
        // Set the external vocabulary
        SerializerVocabulary ev = new SerializerVocabulary(v.vocabulary,
                _useLocalNameAsKeyForQualifiedNameLookup);
        _v.setExternalVocabulary(v.URI,
                ev, false);
       
        _vIsInternal = true;
View Full Code Here

     * Encode the initial vocabulary of a fast infoset document.
     *
     */
    protected final void encodeInitialVocabulary() throws IOException {
        if (_v == null) {
            _v = new SerializerVocabulary();
            _vIsInternal = true;
        } else if (_vIsInternal) {
            _v.clear();
            if (_vData != null)
                _vData.clear();
        }
       
        if (!_v.hasInitialVocabulary() && !_v.hasExternalVocabulary()) {
            write(0);
        } else if (_v.hasInitialVocabulary()) {
            _b = EncodingConstants.DOCUMENT_INITIAL_VOCABULARY_FLAG;
            write(_b);

            SerializerVocabulary initialVocabulary = _v.getReadOnlyVocabulary();

            // TODO check for contents of vocabulary to assign bits
            if (initialVocabulary.hasExternalVocabulary()) {
                _b = EncodingConstants.INITIAL_VOCABULARY_EXTERNAL_VOCABULARY_FLAG;
                write(_b);
                write(0);
            }

            if (initialVocabulary.hasExternalVocabulary()) {
                encodeNonEmptyOctetStringOnSecondBit(_v.getExternalVocabularyURI());
            }

            // TODO check for contents of vocabulary to encode values
        } else if (_v.hasExternalVocabulary()) {
View Full Code Here

   
    protected int characterContentChunkSizeContraint = FastInfosetSerializer.MAX_CHARACTER_CONTENT_CHUNK_SIZE;
   
    /** Creates a new instance of VocabularyGenerator */
    public VocabularyGenerator() {
        _serializerVocabulary = new SerializerVocabulary();
        _parserVocabulary = new ParserVocabulary();
       
        _v = new org.jvnet.fastinfoset.Vocabulary();
    }
View Full Code Here

       
        _v = new org.jvnet.fastinfoset.Vocabulary();
    }

    public VocabularyGenerator(ParserVocabulary parserVocabulary) {
        _serializerVocabulary = new SerializerVocabulary();
        _parserVocabulary = parserVocabulary;
       
        _v = new org.jvnet.fastinfoset.Vocabulary();
    }
View Full Code Here

             * Create a serializer vocabulary external to the serializer.
             * This will ensure that the vocabulary will never be cleared
             * for each serialization and will be retained (and will grow)
             * for each serialization
             */
            SerializerVocabulary vocabulary = new SerializerVocabulary();
            serializer.setVocabulary(vocabulary);
            serializer.setMinAttributeValueSize(0);
            serializer.setMaxAttributeValueSize(indexedStringSizeLimit);
            serializer.setMinCharacterContentChunkSize(0);
            serializer.setMaxCharacterContentChunkSize(indexedStringSizeLimit);
View Full Code Here

TOP

Related Classes of com.sun.xml.fastinfoset.vocab.SerializerVocabulary

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.