public class XmlChildElement extends XmlTag
Modifier and Type | Field and Description |
---|---|
static XmlChildElement |
belongsToCategory
applicable to rdfs:Class; it's CIM package of the class
|
(package private) static XmlChildElement |
comment
applicable to all CimXmlElement-s
|
(package private) static XmlChildElement |
dataType
applicable to rdf:Property for attribute whose type is datatype class or primitive
|
(package private) static XmlChildElement |
domain
applicable to rdf:Property for association or attribute of non-enum class
|
(package private) static XmlChildElement |
hasStereotype
applicable to enum classes
|
static XmlChildElement |
inverseRoleName
applicable to association end (rdf:Description, with type=rdf:Property)
|
(package private) static XmlChildElement |
label
applicable to all CimXmlElement-s
|
(package private) static XmlChildElement |
multiplicity
applicable to rdf:Property for association
|
static XmlChildElement |
range
applicable to association end or attribute having compound type
|
static XmlChildElement |
subClassOf
applicable to (non-enum, non-dt, non-compound) class
|
static XmlChildElement |
type
applicable to rdf:Description (attribute of enum class) to designate enum class
|
Modifier | Constructor and Description |
---|---|
private |
XmlChildElement(XmlNs ns,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
private static java.lang.String |
deduceFragment(java.lang.String uri) |
java.util.List<org.w3c.dom.Element> |
getAllOfThisKind(org.w3c.dom.Element parent)
Returns all child elements of
parent having this kind (tag). |
static java.lang.String |
getResourceName(org.w3c.dom.Element parent,
XmlChildElement chiElemKind)
Returns the fragment of the uri which is the resource attribute on child element
chiElemKind of parent if existing, null otherwise. |
static java.util.List<java.lang.String> |
getResourceNames(org.w3c.dom.Element parent,
XmlChildElement chiElemKind)
Returns the fragments of the uris which are the resource attribute on all child elements
chiElemKind of parent . |
java.lang.String |
getResourceValue(org.w3c.dom.Element parent)
Returns value of resource attribute on single
parent 's child of this kind if it
exists, null otherwise. |
java.util.List<java.lang.String> |
getResourceValues(org.w3c.dom.Element parent)
Returns values of resource attribute on all
parent 's children of this kind if
they exist, empty list otherwise. |
java.lang.String |
getText(org.w3c.dom.Element parent)
Returns trimmed text contents of single
parent 's child of this kind (tag) if it
exists, empty string otherwise. |
static java.net.URI |
getValidatedUri(java.lang.String uri)
Returns validated URI for given string.
|
static final XmlChildElement label
static final XmlChildElement comment
public static final XmlChildElement subClassOf
static final XmlChildElement domain
public static final XmlChildElement type
public static final XmlChildElement range
static final XmlChildElement hasStereotype
public static final XmlChildElement inverseRoleName
public static final XmlChildElement belongsToCategory
static final XmlChildElement dataType
static final XmlChildElement multiplicity
private XmlChildElement(XmlNs ns, java.lang.String name)
public java.lang.String getText(org.w3c.dom.Element parent)
parent
's child of this kind (tag) if it
exists, empty string otherwise.parent
- public java.util.List<org.w3c.dom.Element> getAllOfThisKind(org.w3c.dom.Element parent)
parent
having this kind (tag).public java.lang.String getResourceValue(org.w3c.dom.Element parent)
parent
's child of this kind if it
exists, null otherwise.parent
- parent
's child of this kind if it
exists, null otherwise.public java.util.List<java.lang.String> getResourceValues(org.w3c.dom.Element parent)
parent
's children of this kind if
they exist, empty list otherwise.public static java.net.URI getValidatedUri(java.lang.String uri) throws CimSchemaException
uri
- CimSchemaException
- if given string is syntactically invalid URI.public static java.lang.String getResourceName(org.w3c.dom.Element parent, XmlChildElement chiElemKind)
chiElemKind
of parent
if existing, null otherwise. Use this method
only when sure that the URI has already been validated.parent
- chiElemKind
- private static java.lang.String deduceFragment(java.lang.String uri)
public static java.util.List<java.lang.String> getResourceNames(org.w3c.dom.Element parent, XmlChildElement chiElemKind)
chiElemKind
of parent
. This is the helper for those child element
kinds that can be multiple for a parent (e.g., type, subClassOf).parent
- chiElemKind
- Copyright 2009-2015 Tatjana (Tanja) Kostic