Examples of ORecordSerializer


Examples of com.orientechnologies.orient.core.serialization.serializer.record.ORecordSerializer

  public void exportRecord(@ConsoleParameter(name = "format", description = "Format, such as 'json'") final String iFormat)
      throws IOException {
    checkCurrentDatabase();
    checkCurrentObject();

    final ORecordSerializer serializer = ORecordSerializerFactory.instance().getFormat(iFormat.toLowerCase());

    if (serializer == null) {
      out.println("ERROR: Format '" + iFormat + "' was not found.");
      printSupportedSerializerFormat();
      return;
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.record.ORecordSerializer

  public void exportRecord(@ConsoleParameter(name = "format", description = "Format, such as 'json'") final String iFormat)
      throws IOException {
    checkCurrentDatabase();
    checkCurrentObject();

    final ORecordSerializer serializer = ORecordSerializerFactory.instance().getFormat(iFormat.toLowerCase());

    if (serializer == null) {
      out.println("ERROR: Format '" + iFormat + "' was not found.");
      printSupportedSerializerFormat();
      return;
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.record.ORecordSerializer

  public void exportRecord(@ConsoleParameter(name = "format", description = "Format, such as 'json'") final String iFormat)
      throws IOException {
    checkCurrentDatabase();
    checkCurrentObject();

    final ORecordSerializer serializer = ORecordSerializerFactory.instance().getFormat(iFormat.toLowerCase());

    if (serializer == null) {
      out.println("ERROR: Format '" + iFormat + "' was not found.");
      printSupportedSerializerFormat();
      return;
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.record.ORecordSerializer

  public void exportRecord(@ConsoleParameter(name = "format", description = "Format, such as 'json'") final String iFormat)
      throws IOException {
    checkCurrentDatabase();
    checkCurrentObject();

    final ORecordSerializer serializer = ORecordSerializerFactory.instance().getFormat(iFormat.toLowerCase());

    if (serializer == null) {
      out.println("ERROR: Format '" + iFormat + "' was not found.");
      printSupportedSerializerFormat();
      return;
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.record.ORecordSerializer

    server.activate();
  }

  @Test
  public void createCsvDatabaseConnectBinary() throws IOException {
    ORecordSerializer prev = ODatabaseDocumentTx.getDefaultSerializer();
    ODatabaseDocumentTx.setDefaultSerializer(ORecordSerializerSchemaAware2CSV.INSTANCE);
    createDatabase();

    ODatabaseDocumentTx dbTx = null;
    try {
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.record.ORecordSerializer

    admin.createDatabase("document", "plocal");
  }

  @Test
  public void createBinaryDatabaseConnectCsv() throws IOException {
    ORecordSerializer prev = ODatabaseDocumentTx.getDefaultSerializer();
    ODatabaseDocumentTx.setDefaultSerializer(ORecordSerializerBinary.INSTANCE);
    createDatabase();

    ODatabaseDocumentTx dbTx = null;
    try {
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.record.ORecordSerializer

     final boolean asynch = channel.readByte() == 'a';
     String dbSerializerName = connection.database.getSerializer().toString();
     String name = getRecordSerializerName();

     if (!dbSerializerName.equals(name)) {
       ORecordSerializer ser = ORecordSerializerFactory.instance().getFormat(name);
       ONetworkThreadLocalSerializer.setNetworkSerializer(ser);
     }
     final OCommandRequestText command = (OCommandRequestText) OStreamSerializerAnyStreamable.INSTANCE.fromStream(channel
         .readBytes());
     ONetworkThreadLocalSerializer.setNetworkSerializer(null);
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.record.ORecordSerializer

  public void exportRecord(@ConsoleParameter(name = "format", description = "Format, such as 'json'") final String iFormat,
      @ConsoleParameter(name = "options", description = "Options", optional = true) String iOptions) throws IOException {
    checkForDatabase();
    checkCurrentObject();

    final ORecordSerializer serializer = ORecordSerializerFactory.instance().getFormat(iFormat.toLowerCase());

    if (serializer == null) {
      message("\nERROR: Format '" + iFormat + "' was not found.");
      printSupportedSerializerFormat();
      return;
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.record.ORecordSerializer

      l.delete();
    bank.delete();
  }

  public void testSerialization() {
    ORecordSerializer current = ODatabaseDocumentTx.getDefaultSerializer();
    ODatabaseDocumentTx.setDefaultSerializer(ORecordSerializerSchemaAware2CSV.INSTANCE);
    ODatabaseRecordInternal oldDb = ODatabaseRecordThreadLocal.INSTANCE.get();
    ORecordSerializer dbser = oldDb.getSerializer();
    if (oldDb instanceof ODatabaseDocumentTx)
      ((ODatabaseDocumentTx) oldDb).setSerializer(ORecordSerializerSchemaAware2CSV.INSTANCE);
    else
      ((ODatabaseRecordTx) oldDb).setSerializer(ORecordSerializerSchemaAware2CSV.INSTANCE);
    final byte[] streamOrigin = "Account@html:{\"path\":\"html/layout\"},config:{\"title\":\"Github Admin\",\"modules\":(githubDisplay:\"github_display\")},complex:(simple1:\"string1\",one_level1:(simple2:\"string2\"),two_levels:(simple3:\"string3\",one_level2:(simple4:\"string4\")))"
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.record.ORecordSerializer

     String name = getRecordSerializerName();
     if (ORecordInternal.getRecordType(record) == ODocument.RECORD_TYPE && !dbSerializerName.equals(name)) {
       ORecordInternal.fill(record, rid, version, null, true);
       try {
         ORecordSerializer ser = ORecordSerializerFactory.instance().getFormat(name);
         ONetworkThreadLocalSerializer.setNetworkSerializer(ser);
         record.fromStream(buffer);
       } finally {
         ONetworkThreadLocalSerializer.setNetworkSerializer(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.