Examples of fromDocument()


Examples of com.orientechnologies.orient.core.serialization.ODocumentSerializable.fromDocument()

      try {
        final ODocumentSerializable documentSerializable = (ODocumentSerializable) clazz.newInstance();
        final ODocument docClone = new ODocument();
        instance.copyTo(docClone);
        docClone.removeField(ODocumentSerializable.CLASS_NAME);
        documentSerializable.fromDocument(docClone);

        return documentSerializable;
      } catch (InstantiationException e) {
        throw new OSerializationException("Cannot serialize the object", e);
      } catch (IllegalAccessException e) {
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.ODocumentSerializable.fromDocument()

      if (((ODocument) value).containsField(ODocumentSerializable.CLASS_NAME)) {
        String className = ((ODocument) value).field(ODocumentSerializable.CLASS_NAME);
        try {
          Class<?> clazz = Class.forName(className);
          ODocumentSerializable newValue = (ODocumentSerializable) clazz.newInstance();
          newValue.fromDocument((ODocument) value);
          value = newValue;
        } catch (Exception e) {
          throw new RuntimeException(e);
        }
      }
View Full Code Here

Examples of org.jamesii.core.model.symbolic.convert.IConverter.fromDocument()

  @SuppressWarnings("unchecked")
  @Override
  public boolean setFromDocument(IDocument<?> model) {
    IConverter converter = getConverter(model.getClass());
    return setFromDataStructure(((ISymbolicModel<D>) converter
        .fromDocument(model)).getAsDataStructure());
  }

  /**
   * The Class DefaultConverter.
View Full Code Here

Examples of org.jamesii.model.carules.converter.CARulesConverter.fromDocument()

      }

      CARulesConverter converter = new CARulesConverter();

      ISymbolicModel<?> sm =
          converter.fromDocument(new CARulesAntlrDocument(builder.toString()));

      SymbolicCAModelInformation info =
          (SymbolicCAModelInformation) sm.getAsDataStructure();

      List<CAProblemToken> problems = info.getProblems();
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.