Examples of ISXERecordFactory


Examples of de.fu_berlin.inf.dpp.whiteboard.sxe.records.ISXERecordFactory

    NodeType nodeType = NodeType.fromString(getString(RecordEntry.TYPE));

    NodeRecord record;
    String tmp, rid;

    ISXERecordFactory factory = document.getController().getRecordFactory();

    String parentRid = getString(RecordEntry.PARENT);
    if (parentRid == null) {
      if (!document.isEmpty())
        throw new MalformedRecordException(
            "Received non-root record without parent: "
                + getString(RecordEntry.RID));
    }

    String name = getString(RecordEntry.NAME);
    String ns = getString(RecordEntry.NS);

    switch (nodeType) {
    case ATTR:
      String chdata = getString(RecordEntry.CHDATA);
      AttributeRecord attribute = factory.createAttributeRecord(document,
          ns, name, chdata);
      if (chdata != null)
        attribute.setChdata(chdata);
      record = attribute;
      break;
    case ELEMENT:
      if (parentRid == null)
        record = factory.createRoot(document);
      else
        record = factory.createElementRecord(document, ns, name);
      break;
    default:
      throw new RuntimeException("Unknown node type " + getRecordType());
    }
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.