|
org.netbeans.modules.xml.xam/1 1.18.0 1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.modules.xml.xam.AbstractModel<T>
org.netbeans.modules.xml.xam.dom.AbstractDocumentModel<T>
public abstract class AbstractDocumentModel<T extends DocumentComponent<T>>
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.netbeans.modules.xml.xam.AbstractModel |
|---|
AbstractModel.ModelUndoableEdit, AbstractModel.ModelUndoableEditSupport |
| Nested classes/interfaces inherited from interface org.netbeans.modules.xml.xam.Model |
|---|
Model.State |
| Field Summary | |
|---|---|
protected DocumentModelAccess |
access
|
| Fields inherited from class org.netbeans.modules.xml.xam.AbstractModel |
|---|
ues |
| Fields inherited from interface org.netbeans.modules.xml.xam.Model |
|---|
STATE_PROPERTY |
| Constructor Summary | |
|---|---|
AbstractDocumentModel(ModelSource source)
|
|
| Method Summary | |
|---|---|
void |
addChildComponent(Component target,
Component child,
int index)
Adds child component at specified index. |
boolean |
areSameNodes(Node n1,
Node n2)
|
abstract T |
createRootComponent(Element root)
|
AbstractDocumentComponent |
findComponent(AbstractDocumentComponent base,
List<Element> pathFromRoot,
int current)
|
DocumentComponent |
findComponent(Element e)
|
DocumentComponent |
findComponent(int position)
Find component given a position into the Swing document. |
DocumentComponent |
findComponent(List<Element> pathFromRoot)
Find the component given a path to its element node from root. |
protected void |
firePropertyChangedEvents(SyncUnit unit)
|
protected void |
firePropertyChangedEvents(SyncUnit unit,
Element oldElement)
|
DocumentModelAccess |
getAccess()
|
static DocumentModelAccessProvider |
getAccessProvider()
|
Document |
getBaseDocument()
|
protected abstract ComponentUpdater<T> |
getComponentUpdater()
|
Document |
getDocument()
|
Set<String> |
getElementNames()
|
Set<QName> |
getQNames()
Returns QName of elements used in model. |
Map<QName,List<QName>> |
getQNameValuedAttributes()
Returns QName of all attributes with QName value, sorted by containing element QName. |
String |
getXPathExpression(DocumentComponent component)
Return XPath expression for the given component. |
protected boolean |
isDomainElement(Node e)
|
protected boolean |
needsSync()
This method is overridden by subclasses to determine if sync needs to be performed. |
ChangeInfo |
prepareChangeInfo(List<? extends Node> pathToRoot,
List<? extends Node> nsContextPathToRoot)
Performs intermediate stage of synchronization XDM --> XAM. |
ChangeInfo |
prepareChangeInfo(List<Node> pathToRoot)
Deprecated. Use prepareChangeInfo(java.util.List, java.util.List) instead. It is necessary for fixing bug #166177. |
SyncUnit |
prepareSyncUnit(ChangeInfo change,
SyncUnit order)
|
void |
processSyncUnit(SyncUnit syncOrder)
|
protected void |
refresh()
Refresh the domain model component trees. |
void |
removeChildComponent(Component child)
Removes specified component from model. |
protected void |
setIdentifyingAttributes()
Set the identifying attributes for underlying access to merge. |
protected void |
syncCompleted()
This method is invoked when sync has completed. |
protected void |
syncStarted()
This method is invoked when sync has started. |
protected static String |
toLocalName(String tagName)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.netbeans.modules.xml.xam.dom.DocumentModel |
|---|
createComponent, getRootComponent |
| Methods inherited from interface org.netbeans.modules.xml.xam.Model |
|---|
addComponentListener, addPropertyChangeListener, addUndoableEditListener, addUndoableRefactorListener, endTransaction, getModelSource, getState, inSync, isIntransaction, removeComponentListener, removePropertyChangeListener, removeUndoableEditListener, removeUndoableRefactorListener, startTransaction, sync |
| Field Detail |
|---|
protected DocumentModelAccess access
| Constructor Detail |
|---|
public AbstractDocumentModel(ModelSource source)
| Method Detail |
|---|
public Document getBaseDocument()
public abstract T createRootComponent(Element root)
public boolean areSameNodes(Node n1,
Node n2)
areSameNodes in interface DocumentModel<T extends DocumentComponent<T>>public Set<QName> getQNames()
protected boolean needsSync()
AbstractModel
needsSync in class AbstractModel<T extends DocumentComponent<T>>protected void syncStarted()
AbstractModel
syncStarted in class AbstractModel<T extends DocumentComponent<T>>protected void syncCompleted()
AbstractModel
syncCompleted in class AbstractModel<T extends DocumentComponent<T>>protected abstract ComponentUpdater<T> getComponentUpdater()
public Set<String> getElementNames()
public ChangeInfo prepareChangeInfo(List<Node> pathToRoot)
prepareChangeInfo(java.util.List, java.util.List) instead. It is necessary for fixing bug #166177.
pathToRoot -
public ChangeInfo prepareChangeInfo(List<? extends Node> pathToRoot,
List<? extends Node> nsContextPathToRoot)
ChangeInfo object
is generated here.
pathToRoot - a path of DOM objects from root to changed one.nsContextPathToRoot - Usually the same path as previous param,
but in case of deletion it contains the same path from old model's tree.
It is required in case of prefix declaration deletion, because the deleted
declaration is present only in old model's tree.
Be aware that the method is designed to be called only from XDM
org.netbeans.modules.xml.xdm.xam.XDMListener,
but it also can be redifined. An example can be found in
org.netbeans.modules.xml.wsdl.model.WSDLModel.
public SyncUnit prepareSyncUnit(ChangeInfo change,
SyncUnit order)
protected void firePropertyChangedEvents(SyncUnit unit)
protected void firePropertyChangedEvents(SyncUnit unit,
Element oldElement)
protected static String toLocalName(String tagName)
public void processSyncUnit(SyncUnit syncOrder)
public void addChildComponent(Component target,
Component child,
int index)
Model
addChildComponent in interface Model<T extends DocumentComponent<T>>target - the parent component.child - the child component to be added.index - position among same type of child components, or -1 if not relevant.public void removeChildComponent(Component child)
Model
removeChildComponent in interface Model<T extends DocumentComponent<T>>public DocumentComponent findComponent(Element e)
public DocumentComponent findComponent(List<Element> pathFromRoot)
pathFromRoot - list of elements from model root to backing element of target component.
public AbstractDocumentComponent findComponent(AbstractDocumentComponent base,
List<Element> pathFromRoot,
int current)
public DocumentComponent findComponent(int position)
DocumentModel
findComponent in interface DocumentModel<T extends DocumentComponent<T>>public String getXPathExpression(DocumentComponent component)
DocumentModel
getXPathExpression in interface DocumentModel<T extends DocumentComponent<T>>public Document getDocument()
getDocument in interface DocumentModel<T extends DocumentComponent<T>>public DocumentModelAccess getAccess()
getAccess in class AbstractModel<T extends DocumentComponent<T>>public static DocumentModelAccessProvider getAccessProvider()
protected void setIdentifyingAttributes()
protected boolean isDomainElement(Node e)
protected void refresh()
AbstractModel
refresh in class AbstractModel<T extends DocumentComponent<T>>public Map<QName,List<QName>> getQNameValuedAttributes()
|
org.netbeans.modules.xml.xam/1 1.18.0 1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||