Package com.orientechnologies.orient.core.serialization.serializer

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


        writeField(json, 3, "averageElapsed", pEntry.average);
        writeField(json, 3, "minElapsed", pEntry.min);
        writeField(json, 3, "maxElapsed", pEntry.max);
        writeField(json, 3, "lastElapsed", pEntry.last);
        writeField(json, 3, "totalElapsed", pEntry.total);
        json.endObject(3);
      }
      json.endCollection(2, false);
      json.endObject(1);

      json.endObject();
View Full Code Here


        writeField(json, 3, "lastElapsed", pEntry.last);
        writeField(json, 3, "totalElapsed", pEntry.total);
        json.endObject(3);
      }
      json.endCollection(2, false);
      json.endObject(1);

      json.endObject();

      sendTextContent(iRequest, OHttpUtils.STATUS_OK_CODE, "OK", null, OHttpUtils.CONTENT_JSON, jsonBuffer.toString());
View Full Code Here

        json.endObject(3);
      }
      json.endCollection(2, false);
      json.endObject(1);

      json.endObject();

      sendTextContent(iRequest, OHttpUtils.STATUS_OK_CODE, "OK", null, OHttpUtils.CONTENT_JSON, jsonBuffer.toString());

    } finally {
    }
View Full Code Here

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

    json.endObject();

    sendTextContent(iRequest, OHttpUtils.STATUS_OK_CODE, "OK", null, OHttpUtils.CONTENT_JSON, buffer.toString());
  }

  protected void sendRecordContent(final OHttpRequest iRequest, final ORecord<?> iRecord) throws IOException {
View Full Code Here

          json.writeAttribute(3, false, "name", data.getName());
          json.writeAttribute(3, false, "size", data.getSize());
          json.writeAttribute(3, false, "filled", data.getFilledUpTo());
          json.writeAttribute(3, false, "maxSize", data.getConfig().maxSize);
          json.writeAttribute(3, false, "files", Arrays.toString(data.getConfig().infoFiles));
          json.endObject(2, false);
        }
        json.endCollection(1, true);
      }

      if (db.getClusterNames() != null) {
View Full Code Here

              json.writeAttribute(3, false, "files", "-");
            }
          } catch (Exception e) {
            json.writeAttribute(3, false, "records", "? (Unauthorized)");
          }
          json.endObject(2, false);
        }
        json.endCollection(1, true);
      }

      if (db.getStorage() instanceof OStorageLocal) {
View Full Code Here

        json.writeAttribute(3, false, "totalLogs", txSegment.getTotalLogCount());
        json.writeAttribute(3, false, "size", txSegment.getSize());
        json.writeAttribute(3, false, "filled", txSegment.getFilledUpTo());
        json.writeAttribute(3, false, "maxSize", txSegment.getConfig().maxSize);
        json.writeAttribute(3, false, "file", txSegment.getConfig().path);
        json.endObject(2, false);
        json.endCollection(1, true);
      }

      json.beginCollection(1, false, "users");
      OUser user;
View Full Code Here

      for (ODocument doc : db.getMetadata().getSecurity().getUsers()) {
        user = new OUser(doc);
        json.beginObject(2, true, null);
        json.writeAttribute(3, false, "name", user.getName());
        json.writeAttribute(3, false, "roles", user.getRoles() != null ? Arrays.toString(user.getRoles().toArray()) : "null");
        json.endObject(2, false);
      }
      json.endCollection(1, true);

      json.beginCollection(1, true, "roles");
      ORole role;
View Full Code Here

    // FORMAT THE RETURNING DOCUMENT
    json.writeAttribute(1, true, "name", fileName);
    json.writeAttribute(1, true, "type", headers.get(OHttpUtils.MULTIPART_CONTENT_TYPE));
    json.writeAttribute(1, true, "size", fileSize);
    json.endObject();
    return new ByteArrayInputStream(buffer.toString().getBytes());
  }

  public boolean isOverwrite() {
    return overwrite;
View Full Code Here

          json.writeAttribute(3, false, "maxSize", "-");
          json.writeAttribute(3, false, "files", "-");
        } catch (Exception e) {
          json.writeAttribute(3, false, "records", "? (Unauthorized)");
        }
        json.endObject(2, false);
      }
      json.endCollection(1, true);
    }

    json.writeAttribute(1, false, "currentUser", db.getUser().getName());
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.