de.lehmannet.om
Class GenericFinding
java.lang.Object
de.lehmannet.om.SchemaElement
de.lehmannet.om.Finding
de.lehmannet.om.GenericFinding
- All Implemented Interfaces:
- IExtendableSchemaElement, IFinding, ISchemaElement
public class GenericFinding
- extends Finding
The class GenericFinding provides a generic implementation of
de.lehmannet.om.IFinding.
The GenericFinding class stores a description of the findings
and provides simple access to this description field.
- Since:
- 1.3
- Author:
- doergn@users.sourceforge.net
|
Method Summary |
org.w3c.dom.Element |
addToXmlElement(org.w3c.dom.Element parent)
Adds this GenericFinding to an given parent XML DOM Element. |
boolean |
equals(java.lang.Object obj)
Overwrittes equals(Object) method from java.lang.Object. |
java.lang.String |
getDisplayName()
Returns a display name for this element. |
java.lang.String |
getXSIType()
Returns the XML schema instance type of the implementation. |
java.lang.String |
toString()
Overwrittes toString() method from java.lang.Object. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
GenericFinding
public GenericFinding(org.w3c.dom.Node findingElement)
throws SchemaException
- Throws:
SchemaException
GenericFinding
public GenericFinding(java.lang.String description)
throws SchemaException
- Throws:
SchemaException
GenericFinding
public GenericFinding(java.lang.String ID,
java.lang.String description)
throws SchemaException
- Throws:
SchemaException
getDisplayName
public java.lang.String getDisplayName()
- Returns a display name for this element.
The method differs from the toString() method as toString() shows
more technical information about the element. Also the formating of
toString() can spread over several lines.
This method returns a string (in one line) that can be used as
displayname in e.g. a UI dropdown box.
- Specified by:
getDisplayName in interface ISchemaElement- Specified by:
getDisplayName in class SchemaElement
- Returns:
- Returns a String with a one line display name
- See Also:
java.lang.Object.toString();
toString
public java.lang.String toString()
- Overwrittes toString() method from java.lang.Object.
Returns the field values of this GenericFinding.
- Overrides:
toString in class java.lang.Object
- Returns:
- This GenericFinding field values
- See Also:
Object
equals
public boolean equals(java.lang.Object obj)
- Overwrittes equals(Object) method from java.lang.Object.
Checks if this GenericFinding and the given Object are equal. Two GenericFinding
are equal if both return the same string from their toString() method and
both XSI types are equal.
- Overrides:
equals in class SchemaElement
- Parameters:
obj - The Object to compare this GenericFinding with.
- Returns:
true if both Objects are instances from class GenericFinding,
their XSI type is equal and their fields contain the same values.
(Can be checked with calling and comparing both objects toString() method)- See Also:
Object
getXSIType
public java.lang.String getXSIType()
- Returns the XML schema instance type of the implementation.
Example:
- Returns:
- The xsi:type value of this implementation
addToXmlElement
public org.w3c.dom.Element addToXmlElement(org.w3c.dom.Element parent)
- Adds this GenericFinding to an given parent XML DOM Element.
The GenericFinding Element will be set as a child element of
the passed Element.
- Specified by:
addToXmlElement in interface IFinding- Specified by:
addToXmlElement in class Finding
- Parameters:
parent - The parent element for this GenericFinding
- Returns:
- Returns the Element given as parameter with this
GenericFinding as child Element.
Might return null if parent was null. - See Also:
Element