@Override public MutableDocumentImpl<Node, Element, Text> parse(String text) { IndexedDocument<Node, Element, Text> doc = POJO.parse(text); return new MutableDocumentImpl<Node, Element, Text>(createTrivialSequencer(doc), doc); } };
@Override public MutableDocumentImpl<Node, Element, Text> create(String tagName, Map<String, String> attributes) { IndexedDocument<Node, Element, Text> doc = POJO.create(tagName, attributes); return new MutableDocumentImpl<Node, Element, Text>(createTrivialSequencer(doc), doc); }
/** Init document state */ protected void init(String initialContent) { indexed = DocProviders.POJO.parse(initialContent); // Get a mutable doc view of our target and hook it up with the // "remote" document as the sink of outgoing ops. doc = new MutableDocumentImpl<Node, Element, Text>( createSequencer(indexed), indexed); }
/** Init document state */ protected void init(String initialContent) { indexed = DocProviders.POJO.parse(initialContent); // Get a mutable doc view of our target and hook it up with the // "remote" document as the sink of outgoing ops. doc = new MutableDocumentImpl<Node, Element, Text>( createSequencer(indexed), indexed); }
private void create(String xml) { RawDocumentImpl raw = DocProviders.ROJO.parse("<d>" + xml + "</d>"); RawDocumentImpl raw2 = DocProviders.ROJO.parse("<d>" + xml + "</d>"); indexed = new ObservableIndexedDocument<Node, Element, Text, Void>(handler, raw, null, DocumentSchema.NO_SCHEMA_CONSTRAINTS); indexedCopy = new ObservableIndexedDocument<Node, Element, Text, Void>( handler2, raw2, null, DocumentSchema.NO_SCHEMA_CONSTRAINTS); doc = new MutableDocumentImpl<Node, Element, Text>( new OperationSequencer<Nindo>() { @Override public void begin() { } @Override public void consume(Nindo op) { try { consumeNindo(op); } catch (OperationException e) { throw new OperationRuntimeException("Bug!", e); } } @Override public void end() { } }, testNindoConsume ? indexed : indexedCopy); root = doc.getDocumentElement(); }
private void create(String xml) { RawDocumentImpl raw = DocProviders.ROJO.parse("<d>" + xml + "</d>"); RawDocumentImpl raw2 = DocProviders.ROJO.parse("<d>" + xml + "</d>"); indexed = new ObservableIndexedDocument<Node, Element, Text, Void>(handler, raw, null, DocumentSchema.NO_SCHEMA_CONSTRAINTS); indexedCopy = new ObservableIndexedDocument<Node, Element, Text, Void>( handler2, raw2, null, DocumentSchema.NO_SCHEMA_CONSTRAINTS); doc = new MutableDocumentImpl<Node, Element, Text>( new OperationSequencer<Nindo>() { @Override public void begin() { } @Override public void consume(Nindo op) { try { consumeNindo(op); } catch (OperationException e) { throw new OperationRuntimeException("Bug!", e); } } @Override public void end() { } }, testNindoConsume ? indexed : indexedCopy); root = doc.getDocumentElement(); }
new MutableDocumentImpl<Node, Element, Text>( DocProviders.createTrivialSequencer(indexedDoc, null), indexedDoc);