/** * @param defaultSystemSymbolTable must not be null. * @param catalog may be null. * @param rootContainer must not be null. */ protected IonWriterSystemTree(SymbolTable defaultSystemSymbolTable, IonCatalog catalog, IonContainer rootContainer, InitialIvmHandling initialIvmHandling) { super(defaultSystemSymbolTable, initialIvmHandling, IvmMinimizing.ADJACENT); _factory = rootContainer.getSystem(); _lst_factory = (LocalSymbolTableAsStruct.Factory)((PrivateValueFactory)_factory).getLstFactory(); _catalog = catalog; _current_parent = rootContainer; _in_struct = (_current_parent instanceof IonStruct); int depth = 0; if (! (rootContainer instanceof IonDatagram)) { IonContainer c = rootContainer; do { depth++; c = c.getContainer(); } while (c != null); } _initialDepth = depth; }
protected IonType getContainer() { IonType containerType; if (_parent_stack_top > 0) { containerType = _parent_stack[_parent_stack_top-1].getType(); } else { containerType = IonType.DATAGRAM; } return containerType; } public boolean isInStruct() {
/** * @param container must not be null. */ public static IonWriter makeWriter(IonContainer container) { IonSystem sys = container.getSystem(); IonCatalog cat = sys.getCatalog(); IonWriter writer = makeWriter(cat, container); return writer; }
/** * @param container must not be null. */ public static IonWriter makeSystemWriter(IonContainer container) { IonSystem sys = container.getSystem(); IonCatalog cat = sys.getCatalog(); SymbolTable defaultSystemSymtab = sys.getSystemSymbolTable(); IonWriter writer = new IonWriterSystemTree(defaultSystemSymtab, cat, container, null /* initialIvmHandling */); return writer; } }
/** * @param defaultSystemSymbolTable must not be null. * @param catalog may be null. * @param rootContainer must not be null. */ protected IonWriterSystemTree(SymbolTable defaultSystemSymbolTable, IonCatalog catalog, IonContainer rootContainer, InitialIvmHandling initialIvmHandling) { super(defaultSystemSymbolTable, initialIvmHandling, IvmMinimizing.ADJACENT); if (rootContainer == null) throw new NullPointerException(); _factory = rootContainer.getSystem(); _catalog = catalog; _current_parent = rootContainer; _in_struct = (_current_parent instanceof IonStruct); int depth = 0; if (! (rootContainer instanceof IonDatagram)) { IonContainer c = rootContainer; do { depth++; c = c.getContainer(); } while (c != null); } _initialDepth = depth; }
/** * @param container must not be null. */ public static IonWriter makeWriter(IonCatalog catalog, IonContainer container) { IonSystem sys = container.getSystem(); SymbolTable defaultSystemSymtab = sys.getSystemSymbolTable(); // TODO the SUPPRESS here is a nasty discontinuity with other places // that create this kind of reader. It prevents the Lite DG system // iterator from returning two IVMs at the start of the data. // The Span tests detect that problem. IonWriterSystemTree system_writer = new IonWriterSystemTree(defaultSystemSymtab, catalog, container, InitialIvmHandling.SUPPRESS); return new IonWriterUser(catalog, sys, system_writer); }
protected IonType getContainer() { IonType containerType; if (_parent_stack_top > 0) { containerType = _parent_stack[_parent_stack_top-1].getType(); } else { containerType = IonType.DATAGRAM; } return containerType; } public boolean isInStruct() {
/** * @param defaultSystemSymbolTable must not be null. * @param catalog may be null. * @param rootContainer must not be null. */ protected IonWriterSystemTree(SymbolTable defaultSystemSymbolTable, IonCatalog catalog, IonContainer rootContainer, InitialIvmHandling initialIvmHandling) { super(defaultSystemSymbolTable, initialIvmHandling, IvmMinimizing.ADJACENT); _factory = rootContainer.getSystem(); _lst_factory = (LocalSymbolTableAsStruct.Factory)((PrivateValueFactory)_factory).getLstFactory(); _catalog = catalog; _current_parent = rootContainer; _in_struct = (_current_parent instanceof IonStruct); int depth = 0; if (! (rootContainer instanceof IonDatagram)) { IonContainer c = rootContainer; do { depth++; c = c.getContainer(); } while (c != null); } _initialDepth = depth; }
/** * @param container must not be null. */ public static IonWriter makeWriter(IonContainer container) { IonSystem sys = container.getSystem(); IonCatalog cat = sys.getCatalog(); IonWriter writer = makeWriter(cat, container); return writer; }
protected IonType getContainer() { IonType containerType; if (_parent_stack_top > 0) { containerType = _parent_stack[_parent_stack_top-1].getType(); } else { containerType = IonType.DATAGRAM; } return containerType; } public boolean isInStruct() {
/** * @param container must not be null. */ public static IonWriter makeWriter(IonContainer container) { IonSystem sys = container.getSystem(); IonCatalog cat = sys.getCatalog(); IonWriter writer = makeWriter(cat, container); return writer; }
/** * @param container must not be null. */ public static IonWriter makeSystemWriter(IonContainer container) { IonSystem sys = container.getSystem(); IonCatalog cat = sys.getCatalog(); SymbolTable defaultSystemSymtab = sys.getSystemSymbolTable(); IonWriter writer = new IonWriterSystemTree(defaultSystemSymtab, cat, container, null /* initialIvmHandling */); return writer; } }
/** * @param container must not be null. */ public static IonWriter makeSystemWriter(IonContainer container) { IonSystem sys = container.getSystem(); IonCatalog cat = sys.getCatalog(); SymbolTable defaultSystemSymtab = sys.getSystemSymbolTable(); IonWriter writer = new IonWriterSystemTree(defaultSystemSymtab, cat, container, null /* initialIvmHandling */); return writer; } }
/** * @param container must not be null. */ public static IonWriter makeWriter(IonCatalog catalog, IonContainer container) { IonSystem sys = container.getSystem(); SymbolTable defaultSystemSymtab = sys.getSystemSymbolTable(); // TODO the SUPPRESS here is a nasty discontinuity with other places // that create this kind of reader. It prevents the Lite DG system // iterator from returning two IVMs at the start of the data. // The Span tests detect that problem. IonWriterSystemTree system_writer = new IonWriterSystemTree(defaultSystemSymtab, catalog, container, InitialIvmHandling.SUPPRESS); return new IonWriterUser(catalog, sys, system_writer); }
/** * @param container must not be null. */ public static IonWriter makeWriter(IonCatalog catalog, IonContainer container) { IonSystem sys = container.getSystem(); SymbolTable defaultSystemSymtab = sys.getSystemSymbolTable(); // TODO the SUPPRESS here is a nasty discontinuity with other places // that create this kind of reader. It prevents the Lite DG system // iterator from returning two IVMs at the start of the data. // The Span tests detect that problem. IonWriterSystemTree system_writer = new IonWriterSystemTree(defaultSystemSymtab, catalog, container, InitialIvmHandling.SUPPRESS); return new IonWriterUser(catalog, sys, system_writer); }