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

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


           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


             exportClass(db, json, cls);
           } catch (Exception e) {
             OLogManager.instance().error(this, "Error on exporting class '" + cls + "'", e);
           }
         }
         json.endCollection();
       }

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

           } catch (Exception e) {
             json.writeAttribute("records", "? (Unauthorized)");
           }
           json.endObject();
         }
         json.endCollection();
       }

       if (db.getUser() != null) {
         json.writeAttribute("currentUser", db.getUser().getName());
View Full Code Here

//          json.beginObject();
//          json.writeAttribute("name", user.getName());
//          json.writeAttribute("roles", user.getRoles() != null ? Arrays.toString(user.getRoles().toArray()) : "null");
//          json.endObject();
//        }
         json.endCollection();

         json.beginCollection("roles");
//        ORole role;
//        for (ODocument doc : db.getMetadata().getSecurity().getAllRoles()) {
//          role = new ORole(doc);
View Full Code Here

//          }
//          json.endCollection();
//
//          json.endObject();
//        }
         json.endCollection();
       }

       final OIndexManagerProxy idxManager = db.getMetadata().getIndexManager();
       json.beginCollection("indexes");
       for (OIndex<?> index : idxManager.getIndexes()) {
View Full Code Here

         } catch (Exception e) {
           OLogManager.instance().error(this, "Cannot serialize index configuration", e);
         }
         json.endObject();
       }
       json.endCollection();

       json.beginObject("config");

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

               db.getStorage().getConfiguration().getTimeZone().getID() }, new Object[] { "name", "definitionVersion", "value",
               db.getStorage().getConfiguration().version }, new Object[] { "name", "clusterSelection", "value",
               db.getStorage().getConfiguration().getClusterSelection() }, new Object[] { "name", "minimumClusters", "value",
               db.getStorage().getConfiguration().getMinimumClusters() }, new Object[] { "name", "conflictStrategy", "value",
                                                                                        db.getStorage().getConfiguration().getConflictStrategy() });
       json.endCollection();

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

             json.writeAttribute("name", entry.name);
             json.writeAttribute("value", entry.value);
             json.endObject();
           }
         }
       json.endCollection();

       json.endObject();
       json.endObject();
       json.flush();
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.