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

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


      }
      json.endCollection(3, false);

      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 },
View Full Code Here


    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", "localeCountry", "value", db.getStorage().getConfiguration().getLocaleCountry() }, new Object[] { "name",
            "localeLanguage", "value", db.getStorage().getConfiguration().getLocaleLanguage() }, new Object[] { "name",
            "definitionVersion", "value", db.getStorage().getConfiguration().version });
    json.endCollection(2, true);

    json.beginCollection(2, true, "properties");
    if (db.getStorage().getConfiguration().properties != null)
      for (OStorageEntryConfiguration entry : db.getStorage().getConfiguration().properties) {
        if (entry != null) {
View Full Code Here

          json.writeAttribute(4, false, "name", entry.name);
          json.writeAttribute(4, false, "value", entry.value);
          json.endObject(3, true);
        }
      }
    json.endCollection(2, true);

    json.endObject(1, true);
    json.endObject();
    json.flush();
View Full Code Here

       final String format = iFetchPlan != null ? iFormat + ",fetchPlan:" + iFetchPlan : iFormat;

       // WRITE RECORDS
       json.beginCollection(-1, true, "result");
       formatMultiValue(it, buffer, format);
       json.endCollection(-1, true);

       json.endObject();
       send(OHttpUtils.STATUS_OK_CODE, "OK", OHttpUtils.CONTENT_JSON, buffer.toString(), null);
     }
   }
View Full Code Here

             exportedNames.add(cls.getName());
           } catch (Exception e) {
             OLogManager.instance().error(this, "Error on exporting class '" + cls + "'", e);
           }
       }
       json.endCollection(1, true);
     }

     if (db.getClusterNames() != null) {
       json.beginCollection(1, false, "clusters");
       OCluster cluster;
View Full Code Here

         } 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());

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

       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;
     for (ODocument doc : db.getMetadata().getSecurity().getAllRoles()) {
       role = new ORole(doc);
View Full Code Here

         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));
         json.endObject(4, true);
       }
       json.endCollection(3, false);

       json.endObject(2, true);
     }
     json.endCollection(1, true);
View Full Code Here

       }
       json.endCollection(3, false);

       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 },
View Full Code Here

     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", "localeCountry", "value", db.getStorage().getConfiguration().getLocaleCountry() }, new Object[] { "name",
             "localeLanguage", "value", db.getStorage().getConfiguration().getLocaleLanguage() }, new Object[] { "name",
             "definitionVersion", "value", db.getStorage().getConfiguration().version });
     json.endCollection(2, true);

     json.beginCollection(2, true, "properties");
     if (db.getStorage().getConfiguration().properties != null)
       for (OStorageEntryConfiguration entry : db.getStorage().getConfiguration().properties) {
         if (entry != null) {
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.