Package com.pnfsoftware.jeb.core.units
Interface IXmlUnit
- All Superinterfaces:
IAddressableUnit
,IEventSource
,IUnit
,IUnitCreator
,IUserDataSupport
Units providing XML documents are encouraged to implement this interface.
-
Method Summary
Modifier and TypeMethodDescriptionRetrieve the org.w3c.dom.XML document object.getItemObject
(long id) Optionally provide an object associated with the given item.boolean
Indicate if XML Document has the XML declaration in prolog "<?xml ...Methods inherited from interface com.pnfsoftware.jeb.core.units.IAddressableUnit
getAddressLabel, getAddressLabels, getAddressOfItem, getCanonicalAddress, getItemAtAddress, getRelatedItems, getWellKnownAddresses, isValidAddress
Methods inherited from interface com.pnfsoftware.jeb.util.events.IEventSource
addListener, countListeners, getListeners, getParentSource, insertListener, notifyListeners, removeListener, setParentSource
Methods inherited from interface com.pnfsoftware.jeb.core.units.IUnit
addChild, addChild, canBePersisted, dispose, execprvfunc, generateQuickState, getChildren, getContributions, getCreationTimestamp, getDescription, getExtraInputs, getFormatter, getFormatType, getIconData, getInput, getInterpreters, getLock, getName, getNotes, getNotificationManager, getParent, getParentArtifact, getParentProject, getPropertyDefinitionManager, getPropertyManager, getRealName, getStatus, getUid, getUnitProcessor, initializePropertyObjects, isDisposed, isProcessed, isStale, isTransientChild, notifyGenericChange, postDeserialization, process, removeChild, setName, setNotes, setParent, setRealName, setUnitProcessor
Methods inherited from interface com.pnfsoftware.jeb.core.IUserDataSupport
clearAllData, getAllData, getData, setData
-
Method Details
-
hasXmlDeclaration
boolean hasXmlDeclaration()Indicate if XML Document has the XML declaration in prolog "<?xml ... ?>"- Returns:
-
getDocument
Document getDocument()Retrieve the org.w3c.dom.XML document object. Watch out: per the W3C specifications, the returned tree object is not thread-safe, even for exclusive read operations. However, if the implementation returned is JEB'sXDocument
, then it is thread-safe.- Returns:
- the XML document root
-
getItemObject
Description copied from interface:IAddressableUnit
Optionally provide an object associated with the given item. This method may return null, an opaque object, or an object defined by the contract of the implementing object or sub-interface. The SPI of sub-interfaces should specify the item id formats, if any, as well as types and semantics associated with the objects returned by this method.- Specified by:
getItemObject
in interfaceIAddressableUnit
- Parameters:
id
- the item id- Returns:
- if the item id refers to a non-attribute value node, the return value is an
org.w3c.dom.Node
object; if the item id refers to an attribute value, the return value is a 2-element array containing: theorg.w3c.dom.Attr
node object; the attribute value as aString
object
-