public class ElementDescriptor extends java.lang.Object implements XMLPersistent
Modifier and Type | Class and Description |
---|---|
class |
ElementDescriptor.ElementFile |
Constructor and Description |
---|
ElementDescriptor(ElementDescriptor element)
Create a new element descriptor using specified element informations
|
ElementDescriptor(org.w3c.dom.Node node) |
Modifier and Type | Method and Description |
---|---|
boolean |
addElementFile(ElementDescriptor.ElementFile file) |
java.lang.String |
getChangelog() |
ElementDescriptor.ElementFile |
getElementFile(java.lang.String localPath)
return ElementFile containing specified local path
|
ElementDescriptor.ElementFile |
getFile(int index) |
java.util.ArrayList<ElementDescriptor.ElementFile> |
getFiles() |
int |
getFilesNumber() |
java.lang.String |
getName() |
static ElementDescriptor |
getUpdateElement(ElementDescriptor localElement,
ElementDescriptor onlineElement)
Process and return the update the element which contain differences
from the specified local and online elements. |
Version |
getVersion() |
boolean |
hasLocalPath(java.lang.String localPath)
return true if element contains the specified local path
|
boolean |
isSame(ElementDescriptor element,
boolean compareFileOnlinePath)
Return true if the specified ElementDescriptor is the same than current one.
|
boolean |
isValid() |
boolean |
loadFromXML(org.w3c.dom.Node node)
LOAD
|
boolean |
removeElementFile(ElementDescriptor.ElementFile file) |
void |
removeElementFile(java.lang.String localPath) |
boolean |
saveToNode(org.w3c.dom.Node node,
boolean onlineSave) |
boolean |
saveToXML(org.w3c.dom.Node node)
SAVE
|
void |
setVersion(Version version) |
java.lang.String |
toString() |
void |
update(ElementDescriptor updateElement)
Update current element with informations from specified element
|
boolean |
validate()
Validate the current element descriptor.
|
public ElementDescriptor(org.w3c.dom.Node node)
public ElementDescriptor(ElementDescriptor element)
public boolean loadFromXML(org.w3c.dom.Node node)
XMLPersistent
loadFromXML
in interface XMLPersistent
public boolean saveToXML(org.w3c.dom.Node node)
XMLPersistent
saveToXML
in interface XMLPersistent
public boolean saveToNode(org.w3c.dom.Node node, boolean onlineSave)
public ElementDescriptor.ElementFile getElementFile(java.lang.String localPath)
public boolean hasLocalPath(java.lang.String localPath)
public boolean addElementFile(ElementDescriptor.ElementFile file)
public boolean removeElementFile(ElementDescriptor.ElementFile file)
public void removeElementFile(java.lang.String localPath)
public boolean validate()
public boolean isValid()
public java.lang.String getName()
public Version getVersion()
public int getFilesNumber()
public java.util.ArrayList<ElementDescriptor.ElementFile> getFiles()
public ElementDescriptor.ElementFile getFile(int index)
public java.lang.String getChangelog()
public void setVersion(Version version)
version
- the version to setpublic boolean isSame(ElementDescriptor element, boolean compareFileOnlinePath)
element
- the element descriptor to comparecompareFileOnlinePath
- specify if we compare file online path informationpublic static ElementDescriptor getUpdateElement(ElementDescriptor localElement, ElementDescriptor onlineElement)
public void update(ElementDescriptor updateElement)
public java.lang.String toString()
toString
in class java.lang.Object