[DOC] remove @brief (noit compatible with javadoc
This commit is contained in:
parent
17f9b3284e
commit
e906b9a089
@ -10,7 +10,7 @@ import org.atriasoft.exml.internal.PositionParsing;
|
|||||||
import org.atriasoft.exml.internal.Tools;
|
import org.atriasoft.exml.internal.Tools;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Single attribute element
|
* Single attribute element
|
||||||
*/
|
*/
|
||||||
public class Attribute {
|
public class Attribute {
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ public class Attribute {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* Constructor
|
||||||
* @param[in] _name Name of the attribute.
|
* @param[in] _name Name of the attribute.
|
||||||
* @param[in] _value Value of the attribute.
|
* @param[in] _value Value of the attribute.
|
||||||
*/
|
*/
|
||||||
@ -55,7 +55,7 @@ public class Attribute {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the current name of the Attribute
|
* get the current name of the Attribute
|
||||||
* @return String of the attribute
|
* @return String of the attribute
|
||||||
*/
|
*/
|
||||||
public String getName() {
|
public String getName() {
|
||||||
@ -63,7 +63,7 @@ public class Attribute {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the current element Value.
|
* get the current element Value.
|
||||||
* @return the reference of the string value.
|
* @return the reference of the string value.
|
||||||
*/
|
*/
|
||||||
public String getValue() {
|
public String getValue() {
|
||||||
@ -162,7 +162,7 @@ public class Attribute {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief set the name of the attribute
|
* set the name of the attribute
|
||||||
* @param[in] _name New name of the attribute
|
* @param[in] _name New name of the attribute
|
||||||
*/
|
*/
|
||||||
public void setName(final String _name) {
|
public void setName(final String _name) {
|
||||||
@ -170,7 +170,7 @@ public class Attribute {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief set the value of the node.
|
* set the value of the node.
|
||||||
* @param[in] _value New value of the node.
|
* @param[in] _value New value of the node.
|
||||||
*/
|
*/
|
||||||
public final void setValue(final String _value) {
|
public final void setValue(final String _value) {
|
||||||
|
@ -14,7 +14,7 @@ import org.atriasoft.exml.exception.ExmlAttributeDoesNotExist;
|
|||||||
import org.atriasoft.exml.internal.Log;
|
import org.atriasoft.exml.internal.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief List of all attribute element in a node
|
* List of all attribute element in a node
|
||||||
*/
|
*/
|
||||||
public abstract class AttributeList extends Node {
|
public abstract class AttributeList extends Node {
|
||||||
protected List<Attribute> listAttribute = new ArrayList<>(); //!< list of all attribute;
|
protected List<Attribute> listAttribute = new ArrayList<>(); //!< list of all attribute;
|
||||||
@ -24,7 +24,7 @@ public abstract class AttributeList extends Node {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* Constructor
|
||||||
* @param[in] _value Node value;
|
* @param[in] _value Node value;
|
||||||
*/
|
*/
|
||||||
public AttributeList(final String _value) {
|
public AttributeList(final String _value) {
|
||||||
@ -32,7 +32,7 @@ public abstract class AttributeList extends Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief add attribute on the List
|
* Add attribute on the List
|
||||||
* @param[in] _attr Pointer on the attribute
|
* @param[in] _attr Pointer on the attribute
|
||||||
*/
|
*/
|
||||||
public void appendAttribute(final Attribute _attr) {
|
public void appendAttribute(final Attribute _attr) {
|
||||||
@ -60,7 +60,7 @@ public abstract class AttributeList extends Node {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief check if an attribute exist or not with his name.
|
* Check if an attribute exist or not with his name.
|
||||||
* @param[in] _name Attribute Name.
|
* @param[in] _name Attribute Name.
|
||||||
* @return true if the attribute exist or False
|
* @return true if the attribute exist or False
|
||||||
*/
|
*/
|
||||||
@ -77,7 +77,7 @@ public abstract class AttributeList extends Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get attribute whith his ID
|
* Get attribute whith his ID
|
||||||
* @param[in] _id Identifier of the attribute 0<= _id < sizeAttribute()
|
* @param[in] _id Identifier of the attribute 0<= _id < sizeAttribute()
|
||||||
* @return Pointer on the attribute or NULL
|
* @return Pointer on the attribute or NULL
|
||||||
* @throws ExmlAttributeDoesNotExist The attribute does not exist.
|
* @throws ExmlAttributeDoesNotExist The attribute does not exist.
|
||||||
@ -90,7 +90,7 @@ public abstract class AttributeList extends Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the attribute value with searching in the List with his name
|
* get the attribute value with searching in the List with his name
|
||||||
* @param[in] _name Attribute Name.
|
* @param[in] _name Attribute Name.
|
||||||
* @return Value of the attribute or no data in the string
|
* @return Value of the attribute or no data in the string
|
||||||
* @throws ExmlAttributeDoesNotExist The attribute does not exist.
|
* @throws ExmlAttributeDoesNotExist The attribute does not exist.
|
||||||
@ -112,7 +112,7 @@ public abstract class AttributeList extends Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get attribute whith his ID
|
* get attribute whith his ID
|
||||||
* @param[in] _id Identifier of the attribute 0<= _id < sizeAttribute()
|
* @param[in] _id Identifier of the attribute 0<= _id < sizeAttribute()
|
||||||
* @return Name and value of the attribute
|
* @return Name and value of the attribute
|
||||||
* @throws ExmlAttributeDoesNotExist The attribute does not exist.
|
* @throws ExmlAttributeDoesNotExist The attribute does not exist.
|
||||||
@ -133,7 +133,7 @@ public abstract class AttributeList extends Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Remove an attribute form the list
|
* Remove an attribute form the list
|
||||||
* @param[in] _name Name of the attribute
|
* @param[in] _name Name of the attribute
|
||||||
* @return true The attribute has been removed
|
* @return true The attribute has been removed
|
||||||
* @return false An error occured.
|
* @return false An error occured.
|
||||||
@ -157,7 +157,7 @@ public abstract class AttributeList extends Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set A new attribute or replace data of the previous one
|
* Set A new attribute or replace data of the previous one
|
||||||
* @param[in] _name Name of the attribute
|
* @param[in] _name Name of the attribute
|
||||||
* @param[in] _value Value of the attribute
|
* @param[in] _value Value of the attribute
|
||||||
*/
|
*/
|
||||||
@ -175,7 +175,7 @@ public abstract class AttributeList extends Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the number of attribute in the Node
|
* get the number of attribute in the Node
|
||||||
* @return Nulber of attribute >=0
|
* @return Nulber of attribute >=0
|
||||||
*/
|
*/
|
||||||
public int sizeAttribute() {
|
public int sizeAttribute() {
|
||||||
|
@ -10,7 +10,7 @@ import org.atriasoft.exml.internal.PositionParsing;
|
|||||||
import org.atriasoft.exml.internal.Tools;
|
import org.atriasoft.exml.internal.Tools;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Comment node: lt;!-- ... --gt;
|
* Comment node: lt;!-- ... --gt;
|
||||||
*/
|
*/
|
||||||
public class Comment extends Node {
|
public class Comment extends Node {
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ public class Comment extends Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* Constructor
|
||||||
* @param[in] _value comment value
|
* @param[in] _value comment value
|
||||||
*/
|
*/
|
||||||
public Comment(final String _value) {
|
public Comment(final String _value) {
|
||||||
|
@ -10,7 +10,7 @@ import org.atriasoft.exml.internal.PositionParsing;
|
|||||||
import org.atriasoft.exml.internal.Tools;
|
import org.atriasoft.exml.internal.Tools;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Declaration node: lt;?XXXXXX ... gt;
|
* Declaration node: lt;?XXXXXX ... gt;
|
||||||
*/
|
*/
|
||||||
public class Declaration extends AttributeList {
|
public class Declaration extends AttributeList {
|
||||||
public Declaration() {
|
public Declaration() {
|
||||||
@ -25,7 +25,7 @@ public class Declaration extends AttributeList {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* Constructor
|
||||||
* @param[in] _name name of the declaration (xml, xml:xxxx ...)
|
* @param[in] _name name of the declaration (xml, xml:xxxx ...)
|
||||||
*/
|
*/
|
||||||
public Declaration(final String _name) {
|
public Declaration(final String _name) {
|
||||||
|
@ -15,7 +15,7 @@ import org.atriasoft.exml.internal.Tools;
|
|||||||
* @license MPL v2.0 (see license file)
|
* @license MPL v2.0 (see license file)
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Basic document element of a document
|
* Basic document element of a document
|
||||||
*/
|
*/
|
||||||
public class Document extends Element {
|
public class Document extends Element {
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ public class Document extends Element {
|
|||||||
private FilePos filePos; //!< position of the error
|
private FilePos filePos; //!< position of the error
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
public Document() {
|
public Document() {
|
||||||
this.caseSensitive = false;
|
this.caseSensitive = false;
|
||||||
@ -43,7 +43,7 @@ public class Document extends Element {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Create an error in the parsing (call by the syetm for error management)
|
* Create an error in the parsing (call by the syetm for error management)
|
||||||
* @param[in] _data string of chat is wrong
|
* @param[in] _data string of chat is wrong
|
||||||
* @param[in] _pos Position in the file
|
* @param[in] _pos Position in the file
|
||||||
* @param[in] _filePos human position of the error
|
* @param[in] _filePos human position of the error
|
||||||
@ -59,7 +59,7 @@ public class Document extends Element {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Display the Document on console
|
* Display the Document on console
|
||||||
*/
|
*/
|
||||||
public void display() {
|
public void display() {
|
||||||
final StringBuilder tmpp = new StringBuilder();
|
final StringBuilder tmpp = new StringBuilder();
|
||||||
@ -68,7 +68,7 @@ public class Document extends Element {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Request display in log of the error
|
* Request display in log of the error
|
||||||
*/
|
*/
|
||||||
public void displayError() {
|
public void displayError() {
|
||||||
if (this.comment.length() == 0) {
|
if (this.comment.length() == 0) {
|
||||||
@ -111,7 +111,7 @@ public class Document extends Element {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief generate a string that contain the created XML
|
* generate a string that contain the created XML
|
||||||
* @param[out] _data Data where the xml is stored
|
* @param[out] _data Data where the xml is stored
|
||||||
* @return false : An error occured
|
* @return false : An error occured
|
||||||
* @return true : Parsing is OK
|
* @return true : Parsing is OK
|
||||||
@ -120,7 +120,7 @@ public class Document extends Element {
|
|||||||
return iGenerate(_data, 0);
|
return iGenerate(_data, 0);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @brief Load the file that might contain the xml
|
* Load the file that might contain the xml
|
||||||
* @param[in] _uri URI of the xml
|
* @param[in] _uri URI of the xml
|
||||||
* @return false : An error occured
|
* @return false : An error occured
|
||||||
* @return true : Parsing is OK
|
* @return true : Parsing is OK
|
||||||
@ -150,7 +150,7 @@ public class Document extends Element {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Store the Xml in the file
|
* Store the Xml in the file
|
||||||
* @param[in] _uri URI of the xml
|
* @param[in] _uri URI of the xml
|
||||||
* @return false : An error occured
|
* @return false : An error occured
|
||||||
* @return true : Parsing is OK
|
* @return true : Parsing is OK
|
||||||
@ -178,7 +178,7 @@ public class Document extends Element {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief get the status of case sensitive mode.
|
* get the status of case sensitive mode.
|
||||||
* @return true if case sensitive is active
|
* @return true if case sensitive is active
|
||||||
*/
|
*/
|
||||||
public boolean getCaseSensitive() {
|
public boolean getCaseSensitive() {
|
||||||
@ -186,7 +186,7 @@ public class Document extends Element {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get the display of the error status.
|
* Get the display of the error status.
|
||||||
* @return true Display error
|
* @return true Display error
|
||||||
* @return false Does not display error (get it at end)
|
* @return false Does not display error (get it at end)
|
||||||
*/
|
*/
|
||||||
@ -210,7 +210,7 @@ public class Document extends Element {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief parse a string that contain an XML
|
* parse a string that contain an XML
|
||||||
* @param[in] _data Data to parse
|
* @param[in] _data Data to parse
|
||||||
* @return false : An error occured
|
* @return false : An error occured
|
||||||
* @return true : Parsing is OK
|
* @return true : Parsing is OK
|
||||||
@ -225,7 +225,7 @@ public class Document extends Element {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Enable or diasable the case sensitive (must be done before the call of parsing)
|
* Enable or diasable the case sensitive (must be done before the call of parsing)
|
||||||
* @param[in] _val true if enable; false else.
|
* @param[in] _val true if enable; false else.
|
||||||
*/
|
*/
|
||||||
// TODO: Naming error, it is insensitive ...
|
// TODO: Naming error, it is insensitive ...
|
||||||
@ -234,7 +234,7 @@ public class Document extends Element {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set the display of the error when detected.
|
* Set the display of the error when detected.
|
||||||
* @param[in] _value true: display error, false not display error (get it at end)
|
* @param[in] _value true: display error, false not display error (get it at end)
|
||||||
*/
|
*/
|
||||||
public void setDisplayError(final boolean _value) {
|
public void setDisplayError(final boolean _value) {
|
||||||
|
@ -20,13 +20,13 @@ import org.atriasoft.exml.internal.Tools;
|
|||||||
* @license MPL v2.0 (see license file)
|
* @license MPL v2.0 (see license file)
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Basic element Node of an XML document lt;YYYYYgt;
|
* Basic element Node of an XML document lt;YYYYYgt;
|
||||||
*/
|
*/
|
||||||
public class Element extends AttributeList {
|
public class Element extends AttributeList {
|
||||||
protected List<Node> listSub = new ArrayList<>(); //!< List of subNodes;
|
protected List<Node> listSub = new ArrayList<>(); //!< List of subNodes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
public Element() {
|
public Element() {
|
||||||
super();
|
super();
|
||||||
@ -43,7 +43,7 @@ public class Element extends AttributeList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* Constructor
|
||||||
* @param[in] _value Element name;
|
* @param[in] _value Element name;
|
||||||
*/
|
*/
|
||||||
public Element(final String _value) {
|
public Element(final String _value) {
|
||||||
@ -52,7 +52,7 @@ public class Element extends AttributeList {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief add a node at the element (not Attribute (move in the attribute automaticly).
|
* add a node at the element (not Attribute (move in the attribute automaticly).
|
||||||
* @param[in] _node Pointer of the node to add.
|
* @param[in] _node Pointer of the node to add.
|
||||||
*/
|
*/
|
||||||
public void append(final Node _node) {
|
public void append(final Node _node) {
|
||||||
@ -81,7 +81,7 @@ public class Element extends AttributeList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the Node pointer of the element id.
|
* get the Node pointer of the element id.
|
||||||
* @param[in] _id Id of the element.
|
* @param[in] _id Id of the element.
|
||||||
* @return true if the Node exist.
|
* @return true if the Node exist.
|
||||||
*/
|
*/
|
||||||
@ -93,7 +93,7 @@ public class Element extends AttributeList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get an element with his name (work only with Element)
|
* get an element with his name (work only with Element)
|
||||||
* @param[in] _name Name of the element that is requested
|
* @param[in] _name Name of the element that is requested
|
||||||
* @return true if the Node exist.
|
* @return true if the Node exist.
|
||||||
*/
|
*/
|
||||||
@ -113,7 +113,7 @@ public class Element extends AttributeList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the Node pointer of the element id.
|
* get the Node pointer of the element id.
|
||||||
* @param[in] _id Id of the element.
|
* @param[in] _id Id of the element.
|
||||||
* @return Pointer on node.
|
* @return Pointer on node.
|
||||||
* @throws ExmlNodeDoesNotExist The Node does not exist
|
* @throws ExmlNodeDoesNotExist The Node does not exist
|
||||||
@ -126,7 +126,7 @@ public class Element extends AttributeList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get an element with his name (work only with Element)
|
* get an element with his name (work only with Element)
|
||||||
* @param[in] _name Name of the element that is requested
|
* @param[in] _name Name of the element that is requested
|
||||||
* @return Pointer on the node.
|
* @return Pointer on the node.
|
||||||
* @throws ExmlNodeDoesNotExist The Node does not exist
|
* @throws ExmlNodeDoesNotExist The Node does not exist
|
||||||
@ -144,7 +144,7 @@ public class Element extends AttributeList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get the list of the sub-nodes.
|
* Get the list of the sub-nodes.
|
||||||
* @return List of current nodes.
|
* @return List of current nodes.
|
||||||
*/
|
*/
|
||||||
public List<Node> getNodes() {
|
public List<Node> getNodes() {
|
||||||
@ -152,7 +152,7 @@ public class Element extends AttributeList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the internal data of the element (if the element has some sub node they are converted in xml string == > like this it is not needed to use <![CDATA[...]]>
|
* get the internal data of the element (if the element has some sub node they are converted in xml string == > like this it is not needed to use <![CDATA[...]]>
|
||||||
* @return the curent data string. if Only one text node, then we get the parssed data (no amp; ...) if more than one node, then we transform ,",',<,> in xml normal text...
|
* @return the curent data string. if Only one text node, then we get the parssed data (no amp; ...) if more than one node, then we transform ,",',<,> in xml normal text...
|
||||||
*/
|
*/
|
||||||
public String getText() {
|
public String getText() {
|
||||||
@ -179,7 +179,7 @@ public class Element extends AttributeList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the type of the element id.
|
* get the type of the element id.
|
||||||
* @param[in] _id Id of the element.
|
* @param[in] _id Id of the element.
|
||||||
* @return the Current type of the element or typeUnknow.
|
* @return the Current type of the element or typeUnknow.
|
||||||
* @throws ExmlNodeDoesNotExist The Node does not exist
|
* @throws ExmlNodeDoesNotExist The Node does not exist
|
||||||
@ -271,7 +271,7 @@ public class Element extends AttributeList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Remove all element with this name
|
* Remove all element with this name
|
||||||
* @param[in] _nodeName Name of nodes to remove.
|
* @param[in] _nodeName Name of nodes to remove.
|
||||||
*/
|
*/
|
||||||
public void remove(final String _nodeName) {
|
public void remove(final String _nodeName) {
|
||||||
@ -291,7 +291,7 @@ public class Element extends AttributeList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the number of sub element in the node (can be Comment ; Element ; Text :Declaration).
|
* get the number of sub element in the node (can be Comment ; Element ; Text :Declaration).
|
||||||
* @return a number >=0.
|
* @return a number >=0.
|
||||||
*/
|
*/
|
||||||
public int size() {
|
public int size() {
|
||||||
@ -299,7 +299,7 @@ public class Element extends AttributeList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Parse sub node string
|
* Parse sub node string
|
||||||
* @param[in] _data all file string data
|
* @param[in] _data all file string data
|
||||||
* @param[in,out] _pos Position to start parsing in the file and return the end of parsing
|
* @param[in,out] _pos Position to start parsing in the file and return the end of parsing
|
||||||
* @param[in] _caseSensitive Case sensitive parsing (usefull for html)
|
* @param[in] _caseSensitive Case sensitive parsing (usefull for html)
|
||||||
|
@ -12,14 +12,14 @@ package org.atriasoft.exml;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Position in the file of the original data.
|
* Position in the file of the original data.
|
||||||
*/
|
*/
|
||||||
public class FilePos {
|
public class FilePos {
|
||||||
private int col; //!< source text colomn
|
private int col; //!< source text colomn
|
||||||
private int line; //!< source Line colomn
|
private int line; //!< source Line colomn
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief default contructor (set line and col at 0)
|
* default contructor (set line and col at 0)
|
||||||
*/
|
*/
|
||||||
public FilePos() {
|
public FilePos() {
|
||||||
this.col = 0;
|
this.col = 0;
|
||||||
@ -27,7 +27,7 @@ public class FilePos {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief initialize constructor
|
* initialize constructor
|
||||||
* @param[in] _line Line in the file
|
* @param[in] _line Line in the file
|
||||||
* @param[in] _col Colomn in the file
|
* @param[in] _col Colomn in the file
|
||||||
*/
|
*/
|
||||||
@ -37,7 +37,7 @@ public class FilePos {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Addition operator
|
* Addition operator
|
||||||
* @param[in] _obj Addition object..
|
* @param[in] _obj Addition object..
|
||||||
* @return Reference on this
|
* @return Reference on this
|
||||||
*/
|
*/
|
||||||
@ -52,7 +52,7 @@ public class FilePos {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Colomn addition operator
|
* Colomn addition operator
|
||||||
* @param[in] _col Number of colomn to add
|
* @param[in] _col Number of colomn to add
|
||||||
* @return Reference on this
|
* @return Reference on this
|
||||||
*/
|
*/
|
||||||
@ -62,7 +62,7 @@ public class FilePos {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Check if the value is a new line and update internal property
|
* Check if the value is a new line and update internal property
|
||||||
* @param[in] _val Char value to check
|
* @param[in] _val Char value to check
|
||||||
* @return true We find a new line
|
* @return true We find a new line
|
||||||
* @return false We NOT find a new line
|
* @return false We NOT find a new line
|
||||||
@ -77,7 +77,7 @@ public class FilePos {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Reset position at 0,0
|
* Reset position at 0,0
|
||||||
*/
|
*/
|
||||||
public void clear() {
|
public void clear() {
|
||||||
this.col = 0;
|
this.col = 0;
|
||||||
@ -93,7 +93,7 @@ public class FilePos {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Decrement the colomn position
|
* Decrement the colomn position
|
||||||
* @return Reference on this
|
* @return Reference on this
|
||||||
*/
|
*/
|
||||||
public FilePos decrement() {
|
public FilePos decrement() {
|
||||||
@ -114,7 +114,7 @@ public class FilePos {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get the colomn position
|
* Get the colomn position
|
||||||
* @return Colomn in number of utf8-char
|
* @return Colomn in number of utf8-char
|
||||||
*/
|
*/
|
||||||
public int getCol() {
|
public int getCol() {
|
||||||
@ -122,7 +122,7 @@ public class FilePos {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get the line number position
|
* Get the line number position
|
||||||
* @return line ID (start at 0)
|
* @return line ID (start at 0)
|
||||||
*/
|
*/
|
||||||
public int getLine() {
|
public int getLine() {
|
||||||
@ -135,7 +135,7 @@ public class FilePos {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Increment the colomn position
|
* Increment the colomn position
|
||||||
* @return Reference on this
|
* @return Reference on this
|
||||||
*/
|
*/
|
||||||
public FilePos increment() {
|
public FilePos increment() {
|
||||||
@ -144,7 +144,7 @@ public class FilePos {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Find a new line & reset colomn at 0
|
* Find a new line & reset colomn at 0
|
||||||
*/
|
*/
|
||||||
public void newLine() {
|
public void newLine() {
|
||||||
this.col = 0;
|
this.col = 0;
|
||||||
@ -152,7 +152,7 @@ public class FilePos {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Asignment operator
|
* Asignment operator
|
||||||
* @param[in] _obj Object to copy
|
* @param[in] _obj Object to copy
|
||||||
* @return Reference on this
|
* @return Reference on this
|
||||||
*/
|
*/
|
||||||
@ -163,7 +163,7 @@ public class FilePos {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Setter of specific data
|
* Setter of specific data
|
||||||
* @param[in] _line Line in the file
|
* @param[in] _line Line in the file
|
||||||
* @param[in] _col Colomn in the file
|
* @param[in] _col Colomn in the file
|
||||||
*/
|
*/
|
||||||
|
@ -8,7 +8,7 @@ package org.atriasoft.exml;
|
|||||||
import org.atriasoft.exml.internal.PositionParsing;
|
import org.atriasoft.exml.internal.PositionParsing;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Basic main object of all xml elements.
|
* Basic main object of all xml elements.
|
||||||
*/
|
*/
|
||||||
public abstract class Node {
|
public abstract class Node {
|
||||||
|
|
||||||
@ -16,14 +16,14 @@ public abstract class Node {
|
|||||||
protected String value; //!< value of the node (for element this is the name, for text it is the inside text ...);
|
protected String value; //!< value of the node (for element this is the name, for text it is the inside text ...);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief basic element of a xml structure
|
* basic element of a xml structure
|
||||||
*/
|
*/
|
||||||
public Node() {
|
public Node() {
|
||||||
this.pos = null;
|
this.pos = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief basic element of a xml structure
|
* basic element of a xml structure
|
||||||
* @param[in] _value value of the node
|
* @param[in] _value value of the node
|
||||||
*/
|
*/
|
||||||
public Node(final String _value) {
|
public Node(final String _value) {
|
||||||
@ -32,7 +32,7 @@ public abstract class Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief clear the Node
|
* clear the Node
|
||||||
*/
|
*/
|
||||||
public void clear() {
|
public void clear() {
|
||||||
this.value = "";
|
this.value = "";
|
||||||
@ -45,7 +45,7 @@ public abstract class Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the current position where the element is in the file
|
* get the current position where the element is in the file
|
||||||
* @return The file position reference
|
* @return The file position reference
|
||||||
*/
|
*/
|
||||||
public FilePos getPos() {
|
public FilePos getPos() {
|
||||||
@ -53,13 +53,13 @@ public abstract class Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the node type.
|
* get the node type.
|
||||||
* @return the type of the Node.
|
* @return the type of the Node.
|
||||||
*/
|
*/
|
||||||
public abstract NodeType getType();
|
public abstract NodeType getType();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the current element Value.
|
* get the current element Value.
|
||||||
* @return the reference of the string value.
|
* @return the reference of the string value.
|
||||||
*/
|
*/
|
||||||
public String getValue() {
|
public String getValue() {
|
||||||
@ -67,7 +67,7 @@ public abstract class Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief generate a string with the tree of the xml
|
* generate a string with the tree of the xml
|
||||||
* @param[in,out] _data string where to add the elements
|
* @param[in,out] _data string where to add the elements
|
||||||
* @param[in] _indent current indentation of the file
|
* @param[in] _indent current indentation of the file
|
||||||
* @return false if an error occured.
|
* @return false if an error occured.
|
||||||
@ -75,7 +75,7 @@ public abstract class Node {
|
|||||||
protected abstract boolean iGenerate(final StringBuilder _data, final int _indent);
|
protected abstract boolean iGenerate(final StringBuilder _data, final int _indent);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief parse the Current node [pure VIRUAL]
|
* parse the Current node [pure VIRUAL]
|
||||||
* @param[in] _data data string to parse.
|
* @param[in] _data data string to parse.
|
||||||
* @param[in,out] _pos position in the string to start parse, return the position end of parsing.
|
* @param[in,out] _pos position in the string to start parse, return the position end of parsing.
|
||||||
* @param[in] _caseSensitive Request a parsion of element that is not case sensitive (all element is in low case)
|
* @param[in] _caseSensitive Request a parsion of element that is not case sensitive (all element is in low case)
|
||||||
@ -86,7 +86,7 @@ public abstract class Node {
|
|||||||
protected abstract boolean iParse(String _data, PositionParsing _pos, boolean _caseSensitive, FilePos _filePos, Document _doc);
|
protected abstract boolean iParse(String _data, PositionParsing _pos, boolean _caseSensitive, FilePos _filePos, Document _doc);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief check if the node is a Comment
|
* check if the node is a Comment
|
||||||
* @return true if the node is a Comment
|
* @return true if the node is a Comment
|
||||||
*/
|
*/
|
||||||
public final boolean isComment() {
|
public final boolean isComment() {
|
||||||
@ -94,7 +94,7 @@ public abstract class Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief check if the node is a Declaration
|
* check if the node is a Declaration
|
||||||
* @return true if the node is a Declaration
|
* @return true if the node is a Declaration
|
||||||
*/
|
*/
|
||||||
public final boolean isDeclaration() {
|
public final boolean isDeclaration() {
|
||||||
@ -102,7 +102,7 @@ public abstract class Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief check if the node is a Document
|
* check if the node is a Document
|
||||||
* @return true if the node is a Document
|
* @return true if the node is a Document
|
||||||
*/
|
*/
|
||||||
public final boolean isDocument() {
|
public final boolean isDocument() {
|
||||||
@ -110,7 +110,7 @@ public abstract class Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief check if the node is a Element
|
* check if the node is a Element
|
||||||
* @return true if the node is a Element
|
* @return true if the node is a Element
|
||||||
*/
|
*/
|
||||||
public final boolean isElement() {
|
public final boolean isElement() {
|
||||||
@ -118,7 +118,7 @@ public abstract class Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief check if the node is a Text
|
* check if the node is a Text
|
||||||
* @return true if the node is a Text
|
* @return true if the node is a Text
|
||||||
*/
|
*/
|
||||||
public final boolean isText() {
|
public final boolean isText() {
|
||||||
@ -126,7 +126,7 @@ public abstract class Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief set the value of the node.
|
* set the value of the node.
|
||||||
* @param[in] _value New value of the node.
|
* @param[in] _value New value of the node.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ public abstract class Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Cast the element in a Comment if it is possible.
|
* Cast the element in a Comment if it is possible.
|
||||||
* @return pointer on the class or null.
|
* @return pointer on the class or null.
|
||||||
*/
|
*/
|
||||||
public final Comment toComment() {
|
public final Comment toComment() {
|
||||||
@ -143,7 +143,7 @@ public abstract class Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Cast the element in a Declaration if it is possible.
|
* Cast the element in a Declaration if it is possible.
|
||||||
* @return pointer on the class or null.
|
* @return pointer on the class or null.
|
||||||
*/
|
*/
|
||||||
public final Declaration toDeclaration() {
|
public final Declaration toDeclaration() {
|
||||||
@ -151,7 +151,7 @@ public abstract class Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Cast the element in a Document if it is possible.
|
* Cast the element in a Document if it is possible.
|
||||||
* @return pointer on the class or null.
|
* @return pointer on the class or null.
|
||||||
*/
|
*/
|
||||||
public final Document toDocument() {
|
public final Document toDocument() {
|
||||||
@ -159,7 +159,7 @@ public abstract class Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Cast the element in a Element if it is possible.
|
* Cast the element in a Element if it is possible.
|
||||||
* @return pointer on the class or null.
|
* @return pointer on the class or null.
|
||||||
*/
|
*/
|
||||||
public final Element toElement() {
|
public final Element toElement() {
|
||||||
@ -167,7 +167,7 @@ public abstract class Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Cast the element in a Text if it is possible.
|
* Cast the element in a Text if it is possible.
|
||||||
* @return pointer on the class or null.
|
* @return pointer on the class or null.
|
||||||
*/
|
*/
|
||||||
public final Text toText() {
|
public final Text toText() {
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
package org.atriasoft.exml;
|
package org.atriasoft.exml;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Type of the XML elements.
|
* Type of the XML elements.
|
||||||
*/
|
*/
|
||||||
public enum NodeType {
|
public enum NodeType {
|
||||||
DOCUMENT, //!< all the file main access
|
DOCUMENT, //!< all the file main access
|
||||||
|
@ -10,7 +10,7 @@ import org.atriasoft.exml.internal.PositionParsing;
|
|||||||
import org.atriasoft.exml.internal.Tools;
|
import org.atriasoft.exml.internal.Tools;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Text node interface (internal data between two Marker: <XXX> ALL here </XXX>
|
* Text node interface (internal data between two Marker: <XXX> ALL here </XXX>
|
||||||
*/
|
*/
|
||||||
public class Text extends Node {
|
public class Text extends Node {
|
||||||
|
|
||||||
@ -43,12 +43,12 @@ public class Text extends Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
public Text() {};
|
public Text() {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* Constructor
|
||||||
* @param[in] _data String data of the current Text
|
* @param[in] _data String data of the current Text
|
||||||
*/
|
*/
|
||||||
public Text(final String _data) {
|
public Text(final String _data) {
|
||||||
@ -56,7 +56,7 @@ public class Text extends Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief count the number of line in the current text
|
* count the number of line in the current text
|
||||||
* @return The number of lines
|
* @return The number of lines
|
||||||
*/
|
*/
|
||||||
protected int countLines() {
|
protected int countLines() {
|
||||||
|
@ -4,7 +4,7 @@ import org.atriasoft.exml.FilePos;
|
|||||||
|
|
||||||
public class Tools {
|
public class Tools {
|
||||||
/**
|
/**
|
||||||
* @brief add indentation of the string input.
|
* add indentation of the string input.
|
||||||
* @param[in,out] _data String where the indentation is done.
|
* @param[in,out] _data String where the indentation is done.
|
||||||
* @param[in] _indent Number of tab to add at the string.
|
* @param[in] _indent Number of tab to add at the string.
|
||||||
*/
|
*/
|
||||||
@ -15,7 +15,7 @@ public class Tools {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief check if an element or attribute is availlable (not : !"#$%&'()*+,/;<=>?@[\]^`{|}~ \\n\\t\\r and for first char : not -.0123456789).
|
* check if an element or attribute is availlable (not : !"#$%&'()*+,/;<=>?@[\]^`{|}~ \\n\\t\\r and for first char : not -.0123456789).
|
||||||
* @param[in] _val Value to check the conformity.
|
* @param[in] _val Value to check the conformity.
|
||||||
* @param[in] _firstChar True if the element check is the first char.
|
* @param[in] _firstChar True if the element check is the first char.
|
||||||
* @return true The value can be a part of attribute name
|
* @return true The value can be a part of attribute name
|
||||||
@ -37,7 +37,7 @@ public class Tools {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief count the number of white char in the string from the specify position (stop at the first element that is not a white char)
|
* count the number of white char in the string from the specify position (stop at the first element that is not a white char)
|
||||||
* @param[in] _data Data to parse.
|
* @param[in] _data Data to parse.
|
||||||
* @param[in] _pos Start position in the string.
|
* @param[in] _pos Start position in the string.
|
||||||
* @param[out] _filePos new poistion of te file to add.
|
* @param[out] _filePos new poistion of te file to add.
|
||||||
@ -76,7 +76,7 @@ public class Tools {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Display the cuurent element that is curently parse.
|
* Display the cuurent element that is curently parse.
|
||||||
* @param[in] _val Char that is parsed.
|
* @param[in] _val Char that is parsed.
|
||||||
* @param[in] _filePos Position of the char in the file.
|
* @param[in] _filePos Position of the char in the file.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user