Examples of beginObject()


Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginObject()

  @Override
  public StringWriter parse(final OHttpRequest iRequest, final Map<String, String> headers,
      final OHttpMultipartContentInputStream in, ODatabaseRecord database) throws IOException {
    final StringWriter buffer = new StringWriter();
    final OJSONWriter json = new OJSONWriter(buffer);
    json.beginObject();
    String fileName = headers.get(OHttpUtils.MULTIPART_CONTENT_FILENAME);
    int fileSize = 0;
    if (fileName.charAt(0) == '"') {
      fileName = new String(fileName.substring(1));
    }
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginObject()

            fetchPlan = f.substring(f.indexOf(':') + 1);
          else if (f.startsWith("keepTypes"))
            keepTypes = true;
      }

      json.beginObject(indentLevel);

      writeSignature(json, indentLevel, includeType, includeId, includeVer, includeClazz, attribSameRow, iRecord);

      if (iRecord instanceof ORecordSchemaAware<?>) {
        // SCHEMA AWARE
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginObject()

        json.endObject(2, true);
      }
      json.endCollection(1, true);

      json.beginObject(1, true, "config");

      json.beginCollection(2, true, "values");
      json.writeObjects(3, true, null,
          new Object[] { "name", "dateFormat", "value", db.getStorage().getConfiguration().dateFormat }, new Object[] { "name",
              "dateTimeFormat", "value", db.getStorage().getConfiguration().dateTimeFormat }, new Object[] { "name",
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginObject()

      json.beginCollection(2, true, "properties");
      if (db.getStorage().getConfiguration().properties != null)
        for (OStorageEntryConfiguration entry : db.getStorage().getConfiguration().properties) {
          if (entry != null) {
            json.beginObject(3, true, null);
            json.writeAttribute(4, false, "name", entry.name);
            json.writeAttribute(4, false, "value", entry.value);
            json.endObject(3, true);
          }
        }
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginObject()

            fetchPlan = f.substring(f.indexOf(':') + 1);
          else if (f.startsWith("keepTypes"))
            keepTypes = true;
      }

      json.beginObject(indentLevel);

      writeSignature(json, indentLevel, includeType, includeId, includeVer, includeClazz, attribSameRow, iRecord);

      if (iRecord instanceof ORecordSchemaAware<?>) {
        // SCHEMA AWARE
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginObject()

    try {
      StringWriter jsonBuffer = new StringWriter();
      OJSONWriter json = new OJSONWriter(jsonBuffer);

      json.beginObject();

      json.beginCollection(1, true, "connections");

      String lastCommandOn;
      String connectedOn;
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginObject()

        synchronized (dateTimeFormat) {
          lastCommandOn = dateTimeFormat.format(new Date(c.protocol.getData().lastCommandReceived));
          connectedOn = dateTimeFormat.format(new Date(c.since));
        }

        json.beginObject(2);
        writeField(json, 2, "id", c.id);
        writeField(json, 2, "id", c.id);
        writeField(json, 2, "remoteAddress", c.protocol.getChannel() != null ? c.protocol.getChannel().toString() : "Disconnected");
        writeField(json, 2, "db", c.database != null ? c.database.getName() : "-");
        writeField(json, 2, "user", c.database != null && c.database.getUser() != null ? c.database.getUser().getName() : "-");
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginObject()

      json.beginCollection(1, true, "dbs");
      Map<String, OResourcePool<String, ODatabaseDocumentTx>> dbPool = OSharedDocumentDatabase.getDatabasePools();
      for (Entry<String, OResourcePool<String, ODatabaseDocumentTx>> entry : dbPool.entrySet()) {
        for (ODatabaseDocumentTx db : entry.getValue().getResources()) {

          json.beginObject(2);
          writeField(json, 2, "db", db.getName());
          writeField(json, 2, "user", db.getUser() != null ? db.getUser().getName() : "-");
          writeField(json, 2, "open", db.isClosed() ? "closed" : "open");
          writeField(json, 2, "storage", db.getStorage().getClass().getSimpleName());
          json.endObject(2);
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginObject()

      json.endCollection(1, false);

      json.beginCollection(1, true, "storages");
      OStorage[] storages = OServerMain.server().getManagedServer().getOpenedStorages();
      for (OStorage s : storages) {
        json.beginObject(2);
        writeField(json, 2, "name", s.getName());
        writeField(json, 2, "type", s.getClass().getSimpleName());
        writeField(json, 2, "path", s instanceof OStorageLocal ? ((OStorageLocal) s).getStoragePath().replace('\\', '/') : "");
        writeField(json, 2, "activeUsers", s.getUsers());
        json.endObject(2);
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginObject()

      }
      json.endCollection(1, false);

      json.beginCollection(2, true, "properties");
      for (OServerEntryConfiguration entry : OServerMain.server().getConfiguration().properties) {
        json.beginObject(3, true, null);
        json.writeAttribute(4, false, "name", entry.name);
        json.writeAttribute(4, false, "value", entry.value);
        json.endObject(3, true);
      }
      json.endCollection(2, true);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.