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

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


      json.beginCollection(1, true, "roles");
      ORole role;
      for (ODocument doc : db.getMetadata().getSecurity().getRoles()) {
        role = new ORole(doc);
        json.beginObject(2, true, null);
        json.writeAttribute(3, false, "name", role.getName());
        json.writeAttribute(3, false, "mode", role.getMode().toString());

        json.beginCollection(3, true, "rules");
        for (Entry<String, Byte> rule : role.getRules().entrySet()) {
View Full Code Here

        json.writeAttribute(3, false, "name", role.getName());
        json.writeAttribute(3, false, "mode", role.getMode().toString());

        json.beginCollection(3, true, "rules");
        for (Entry<String, Byte> rule : role.getRules().entrySet()) {
          json.beginObject(4);
          json.writeAttribute(4, true, "name", rule.getKey());
          json.writeAttribute(4, false, "create", role.allow(rule.getKey(), ORole.PERMISSION_CREATE));
          json.writeAttribute(4, false, "read", role.allow(rule.getKey(), ORole.PERMISSION_READ));
          json.writeAttribute(4, false, "update", role.allow(rule.getKey(), ORole.PERMISSION_UPDATE));
          json.writeAttribute(4, false, "delete", role.allow(rule.getKey(), ORole.PERMISSION_DELETE));
View Full Code Here

        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

      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

            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

      final OJSONWriter json = new OJSONWriter(buffer);

      final ODataLocal dataSegment = ((OStorageLocal) db.getStorage()).getDataSegment(0);
      final long dbSize = dataSegment.getFilledUpTo();

      json.beginObject();
      json.writeAttribute(1, true, "size", dbSize);

      long current = 0;

      long holesSize = 0;
View Full Code Here

        if (h.dataOffset == -1)
          continue;

        if (current < h.dataOffset) {
          // DATA SEGMENT
          json.beginObject(2, true, null);
          json.writeAttribute(3, false, "type", "d");
          json.writeAttribute(3, false, "offset", current);
          json.writeAttribute(3, false, "size", h.dataOffset - current);
          json.endObject(2, false);
        }
View Full Code Here

          json.writeAttribute(3, false, "offset", current);
          json.writeAttribute(3, false, "size", h.dataOffset - current);
          json.endObject(2, false);
        }

        json.beginObject(2, true, null);
        json.writeAttribute(3, false, "type", "h");
        json.writeAttribute(3, false, "offset", h.dataOffset);
        json.writeAttribute(3, false, "size", h.size);
        json.endObject(2, false);
        holesSize += h.size;
View Full Code Here

        current = h.dataOffset + h.size;
      }

      if (dbSize > current) {
        // DATA SEGMENT
        json.beginObject(2, true, null);
        json.writeAttribute(3, false, "type", "d");
        json.writeAttribute(3, false, "offset", current);
        json.writeAttribute(3, false, "size", dbSize - current);
        json.endObject(2, false);
      }
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.