normalize RML quads in the store, by modifying the existing store, and then write them semi-pretty using the writer.
@param store N3.Store
@param writer N3.Writer
174987
function writeNormalizeRml(store, writer) {
  normalizeRml(store, function () {
    let parsedBlankSubjects = {};
    writeBlanks(store, parsedBlankSubjects);
    let quads = store.getQuads();
    quads.forEach(function (quad) {
      if (parsedBlankSubjects[quad.subject]) {
        return;
      }
      if (parsedBlankSubjects[quad.object]) {
        writer.addQuad(quad.subject, quad.predicate, writer.blank(parsedBlankSubjects[quad.object]));
        return;
      }
      writer.addTriple(quad);
    });
  });
}
192567
public static <T> void registerWriter(Class<?> cls, JsonWriterI<T> writer) {
		defaultWriter.registerWriter(writer, cls);
	}
1218659
public static <T> Writer<Params<T>> writer(final Writer<? super T> writer) {
		return elem(
			"params",
			attr("name").map(Params::getName),
			elems("param", writer)
		);
	}
1367281
public static DescriptionDescriptor createDescription(DescriptionType descriptionType, Store store) {
        DescriptionDescriptor descriptionDescriptor = store.create(DescriptionDescriptor.class);
        descriptionDescriptor.setLang(descriptionType.getLang());
        descriptionDescriptor.setValue(descriptionType.getValue());
        return descriptionDescriptor;
    }
1347483
private void completeWrite(Write write) {
        Timer t = write.complete();
        if (t != null) {
            this.metrics.bookKeeperWriteCompleted(write.data.getLength(), t.getElapsed());
        }
    }
431063
private void normalizeModel(List<Server> servers) {

        for (Server server : servers) {
            ServerInstance serverInstance = getServerInstance(new ServerRef(server.getHostName(), server.getName()));
            server.setServerState(serverInstance.getServerState());
            server.setSuspendState(serverInstance.getSuspendState());
        }
    }
536501
@Override
    public void write(final Writer writer) throws ConfigurationException, IOException {
        Preconditions.checkNotNull(writer);

        @SuppressWarnings("unchecked") final
        HashMap<String, Object> settings = (HashMap<String, Object>) fromNode(this.getModel().getInMemoryRepresentation());
        this.mapper.writerWithDefaultPrettyPrinter().writeValue(writer, settings);
    }
104751
private void printErrLine(int pos, PrintWriter writer) {
        String line = (source == null ? null : source.getLine(pos));
        if (line == null)
            return;
        int col = source.getColumnNumber(pos, false);

        printRawLines(writer, line);
        for (int i = 0; i < col - 1; i++) {
            writer.print((line.charAt(i) == '\t') ? "\t" : " ");
        }
        writer.println("^");
        writer.flush();
    }
747023
protected final void writeSerializedBytes(ObjectManagerByteArrayOutputStream buffer) {
        buffer.write(simpleSerialVersion);
        buffer.writeInt(objectStoreIdentifier);
        buffer.writeLong(storedObjectIdentifier);
    }
847920
@Override
	public void store(final Writer writer, final String comments) throws IOException {
		lock.readLock().lock();
		try {
			properties.store(writer, comments);
		} finally {
			lock.readLock().unlock();
		}
	}
398296
private void replace(PersistentStore store, NodeAVL x, NodeAVL n) {

        if (x.isRoot()) {
            if (n != null) {
                n = n.setParent(store, null);
            }

            store.setAccessor(this, n);
        } else {
            set(store, x.getParent(store), x.isFromLeft(store), n);
        }
    }
1000053
public void setWriter (Writer writer) {
		if (!(writer instanceof JsonWriter)) writer = new JsonWriter(writer);
		this.writer = (JsonWriter)writer;
		this.writer.setOutputType(outputType);
		this.writer.setQuoteLongValues(quoteLongValues);
	}
302198
private void unmap() {
    if (storageLevel == StorageLevel.MAPPED) {
      writer.unmap();
      readers.forEach(reader -> reader.unmap());
    }
  }
32624
private void store(PrintWriter writer) throws IOException {
		for (Entry<String, LinkedHashMap<String, String>> groupEntry : this.groupedMap.entrySet()) {
			writer.println(StrUtil.format("{}{}{}", CharUtil.BRACKET_START, groupEntry.getKey(), CharUtil.BRACKET_END));
			for (Entry<String, String> entry : groupEntry.getValue().entrySet()) {
				writer.println(StrUtil.format("{} {} {}", entry.getKey(), ASSIGN_FLAG, entry.getValue()));
			}
		}
	}
130381
public static void writeRecords(final List<VcfSample> samples,
                                    final List<VcfRecord> records,
                                    final PrintWriter writer) {
        checkNotNull(samples);
        checkNotNull(records);
        checkNotNull(writer);

        for (VcfRecord record : records) {
            writeRecord(samples, record, writer);
        }
    }
989830
public void write(@NonNull MultiNormalizerMinMaxScaler normalizer, @NonNull OutputStream stream)
                    throws IOException {
        try (DataOutputStream dos = new DataOutputStream(stream)) {
            dos.writeBoolean(normalizer.isFitLabel());
            dos.writeInt(normalizer.numInputs());
            dos.writeInt(normalizer.isFitLabel() ? normalizer.numOutputs() : -1);
            dos.writeDouble(normalizer.getTargetMin());
            dos.writeDouble(normalizer.getTargetMax());

            for (int i = 0; i < normalizer.numInputs(); i++) {
                Nd4j.write(normalizer.getMin(i), dos);
                Nd4j.write(normalizer.getMax(i), dos);
            }
            if (normalizer.isFitLabel()) {
                for (int i = 0; i < normalizer.numOutputs(); i++) {
                    Nd4j.write(normalizer.getLabelMin(i), dos);
                    Nd4j.write(normalizer.getLabelMax(i), dos);
                }
            }
            dos.flush();
        }
    }
818958
public final void unlockFromWrite(L locker) {
        int writeCount = mWriteCount - 1;
        if (writeCount < 0) {
            throw new IllegalMonitorStateException("Too many write locks released");
        }
        mWriteCount = writeCount;
        if (writeCount > 0) {
            return;
        }

        // copy original state to check if upgrade lock was automatic
        final int state = mState;

        // make sure upgrade lock is still held after releasing write lock
        mState = LOCK_STATE_UPGRADE;

        Node h = mRWHead;
        if (h != null && h.mWaitStatus != 0) {
            unparkReadWriteSuccessor(h);
        }

        if (state == LOCK_STATE_WRITE) {
            // upgrade owner was automatically set, so automatically clear it
            unlockFromUpgrade(locker);
        }
    }