public class XmiElement extends XmiBasePart implements XmiDescendent
Modifier and Type | Field and Description |
---|---|
static String |
NAME_ATTR_NAME
The name of the attribute used as the name attribute.
|
Constructor and Description |
---|
XmiElement(String name) |
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(XmiAttribute newAttribute) |
void |
addChild(XmiElement newChild) |
boolean |
equals(Object obj) |
XmiElement |
findChild(String childName,
String namespaceUri) |
XmiAttribute |
getAttribute(String name,
String namespaceUri) |
List<XmiAttribute> |
getAttributes() |
List<XmiAttribute> |
getAttributes(String namespaceUri) |
String |
getAttributeValue(String name,
String namespaceUri) |
List<XmiElement> |
getChildren() |
XmiAttribute |
getNameAttribute(String namespaceUri) |
String |
getNamespacePrefix() |
String |
getNamespaceUri() |
XmiElement |
getParent() |
String |
getUuid() |
int |
hashCode() |
void |
setParent(XmiElement parent) |
String |
toString() |
getName, getQName, getValue, setNamespacePrefix, setNamespaceUri, setValue
public static final String NAME_ATTR_NAME
public XmiElement(String name)
name
- the element name (cannot be null
or empty)public void addAttribute(XmiAttribute newAttribute)
newAttribute
- the attribute being added (cannot be null
)public void addChild(XmiElement newChild)
newChild
- the child element being added (cannot be null
)public boolean equals(Object obj)
equals
in class XmiBasePart
XmiBasePart.equals(java.lang.Object)
public XmiElement findChild(String childName, String namespaceUri)
childName
- the name of the child being requested (cannot be null
or empty)namespaceUri
- the URI of the attribute being requested (can be null
or empty)null
if not foundpublic XmiAttribute getAttribute(String name, String namespaceUri)
name
- the name of the attribute being requested (cannot be null
or empty)namespaceUri
- the URI of the attribute being requested (can be null
or empty)null
if not foundpublic List<XmiAttribute> getAttributes()
null
but can be empty)public List<XmiAttribute> getAttributes(String namespaceUri)
namespaceUri
- the namespace URI of the attributes being requested (can be null
or empty)null
but can be empty)public String getAttributeValue(String name, String namespaceUri)
name
- the name of the attribute whose value is being requested (cannot be null
or empty)namespaceUri
- the namespace URI of the attribute being requested (can be null
or empty)null
or empty) or null
if not foundpublic List<XmiElement> getChildren()
null
but can be empty)public XmiAttribute getNameAttribute(String namespaceUri)
namespaceUri
- the namespace URI of the name attribute being requested (can be null
or empty)null
if not foundpublic String getNamespacePrefix()
getNamespacePrefix
in interface XmiPart
getNamespacePrefix
in class XmiBasePart
null
or empty)XmiBasePart.getNamespacePrefix()
public String getNamespaceUri()
getNamespaceUri
in interface XmiPart
getNamespaceUri
in class XmiBasePart
null
or empty)XmiBasePart.getNamespaceUri()
public XmiElement getParent()
getParent
in interface XmiDescendent
null
)XmiDescendent.getParent()
public String getUuid()
null
if not setpublic int hashCode()
hashCode
in class XmiBasePart
XmiBasePart.hashCode()
public void setParent(XmiElement parent)
setParent
in interface XmiDescendent
parent
- the new parent (can be null
)XmiDescendent.setParent(org.modeshape.sequencer.teiid.xmi.XmiElement)
public String toString()
toString
in class XmiBasePart
Object.toString()
Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.