クラス XmlElementAdapter

    • コンストラクタの詳細

      • XmlElementAdapter

        public XmlElementAdapter​(XmlElement target)
    • メソッドの詳細

      • getRoot

        public XmlContainer getRoot()
        インタフェースからコピーされた説明: XmlElement
        Get top most container that is either XmlDocument or XmlElement (may be event this element!!!)
        定義:
        getRoot インタフェース内 XmlElement
      • getParent

        public XmlContainer getParent()
        インタフェースからコピーされた説明: XmlElement
        XML Infoset [parent] property. If current element is not child of containing parent XmlElement or XmlDocument then builder exception will be thrown
        定義:
        getParent インタフェース内 XmlContained
        定義:
        getParent インタフェース内 XmlElement
      • newNamespace

        public XmlNamespace newNamespace​(String prefix,
                                         String namespaceName)
        インタフェースからコピーされた説明: XmlElement
        Create new namespace with prefix and namespace name (both must be not null).
        定義:
        newNamespace インタフェース内 XmlElement
      • attribute

        public XmlAttribute attribute​(String attributeName)
        インタフェースからコピーされた説明: XmlElement
        Find attribute that matches given name or namespace Returns null if not found. Will match only attribute that have no namesapce.
        定義:
        attribute インタフェース内 XmlElement
      • attribute

        public XmlAttribute attribute​(XmlNamespace attributeNamespaceName,
                                      String attributeName)
        インタフェースからコピーされた説明: XmlElement
        Find attribute that matches given name or namespace Returns null if not found. NOTE: if namespace is null in this case it will match only attributes that have no namespace.
        定義:
        attribute インタフェース内 XmlElement
      • findAttribute

        public XmlAttribute findAttribute​(String attributeNamespaceName,
                                          String attributeName)
        インタフェースからコピーされた説明: XmlElement
        Find attribute that matches given name or namespace Returns null if not found. NOTE: if namespace is null in this case it will match only attributes that has no namespace.
        定義:
        findAttribute インタフェース内 XmlElement
      • attributes

        public Iterator attributes()
        インタフェースからコピーされた説明: XmlElement
        Return Iterator - null is never returned if there is no children then iteraotr over empty collection is returned
        定義:
        attributes インタフェース内 XmlElement
      • removeAllChildren

        public void removeAllChildren()
        インタフェースからコピーされた説明: XmlElement
        Removes all children - every child that was implementing XmlNode will have set parent to null.
        定義:
        removeAllChildren インタフェース内 XmlElement
      • addAttribute

        public XmlAttribute addAttribute​(String attributeType,
                                         String attributePrefix,
                                         String attributeNamespace,
                                         String attributeName,
                                         String attributeValue,
                                         boolean specified)
        インタフェースからコピーされた説明: XmlElement
        Method addAttribute
        定義:
        addAttribute インタフェース内 XmlElement
        パラメータ:
        attributeType - a String
        attributePrefix - a String
        attributeNamespace - a String
        attributeName - a String
        attributeValue - a String
        specified - a boolean
        戻り値:
        a XmlAttribute
      • getAttributeValue

        public String getAttributeValue​(String attributeNamespaceName,
                                        String attributeName)
        インタフェースからコピーされた説明: XmlElement
        Method getAttributeValue
        定義:
        getAttributeValue インタフェース内 XmlElement
        attributeName - a String
        戻り値:
        a String
      • addAttribute

        public XmlAttribute addAttribute​(XmlNamespace namespace,
                                         String name,
                                         String value)
        インタフェースからコピーされた説明: XmlElement
        Method addAttribute
        定義:
        addAttribute インタフェース内 XmlElement
        パラメータ:
        namespace - a XmlNamespace
        name - a String
        value - a String
        戻り値:
        a XmlAttribute
      • getNamespaceName

        public String getNamespaceName()
        インタフェースからコピーされた説明: XmlElement
        Return namespace name (XML Infoset [namespace name]property or null if element has no namespace
        定義:
        getNamespaceName インタフェース内 XmlElement
      • ensureChildrenCapacity

        public void ensureChildrenCapacity​(int minCapacity)
        インタフェースからコピーされた説明: XmlElement
        Method ensureChildrenCapacity
        定義:
        ensureChildrenCapacity インタフェース内 XmlElement
        パラメータ:
        minCapacity - an int
      • namespaces

        public Iterator namespaces()
        インタフェースからコピーされた説明: XmlElement
        Return Iterator - null is never returned if there is no children then iteraotr over empty collection is returned
        定義:
        namespaces インタフェース内 XmlElement
      • removeAllAttributes

        public void removeAllAttributes()
        インタフェースからコピーされた説明: XmlElement
        Method removeAllAttributes
        定義:
        removeAllAttributes インタフェース内 XmlElement
      • getNamespace

        public XmlNamespace getNamespace()
        インタフェースからコピーされた説明: XmlElement
        Return namespace of current element (XML Infoset [namespace name] and [prefix] properties combined) null is only returned if element was created without namespace
        定義:
        getNamespace インタフェース内 XmlElement
      • getBaseUri

        public String getBaseUri()
        インタフェースからコピーされた説明: XmlElement
        XML Infoset [base URI] property
        定義:
        getBaseUri インタフェース内 XmlElement
        戻り値:
        a String
      • removeAttribute

        public void removeAttribute​(XmlAttribute attr)
        インタフェースからコピーされた説明: XmlElement
        Method removeAttribute
        定義:
        removeAttribute インタフェース内 XmlElement
        パラメータ:
        attr - a XmlAttribute
      • declareNamespace

        public XmlNamespace declareNamespace​(String prefix,
                                             String namespaceName)
        インタフェースからコピーされた説明: XmlElement
        Create new namespace with prefix and namespace name (both must be not null) and add it to current element.
        定義:
        declareNamespace インタフェース内 XmlElement
      • removeAllNamespaceDeclarations

        public void removeAllNamespaceDeclarations()
        インタフェースからコピーされた説明: XmlElement
        Method removeAllNamespaceDeclarations
        定義:
        removeAllNamespaceDeclarations インタフェース内 XmlElement
      • hasAttributes

        public boolean hasAttributes()
        インタフェースからコピーされた説明: XmlElement
        Method hasAttributes
        定義:
        hasAttributes インタフェース内 XmlElement
        戻り値:
        a boolean
      • addAttribute

        public XmlAttribute addAttribute​(String type,
                                         XmlNamespace namespace,
                                         String name,
                                         String value,
                                         boolean specified)
        インタフェースからコピーされた説明: XmlElement
        Method addAttribute
        定義:
        addAttribute インタフェース内 XmlElement
        パラメータ:
        type - a String
        namespace - a XmlNamespace
        name - a String
        value - a String
        specified - a boolean
        戻り値:
        a XmlAttribute
      • addAttribute

        public XmlAttribute addAttribute​(String name,
                                         String value)
        インタフェースからコピーされた説明: XmlElement
        addAttribute
        定義:
        addAttribute インタフェース内 XmlElement
        パラメータ:
        name - a String
        value - a String
        戻り値:
        a XmlAttribute
      • hasNamespaceDeclarations

        public boolean hasNamespaceDeclarations()
        インタフェースからコピーされた説明: XmlElement
        Method hasNamespaceDeclarations
        定義:
        hasNamespaceDeclarations インタフェース内 XmlElement
        戻り値:
        a boolean
      • lookupNamespaceByName

        public XmlNamespace lookupNamespaceByName​(String namespaceName)
        インタフェースからコピーされた説明: XmlElement
        Find namespace (will have non empty prefix) corresponding to namespace name checking first current elemen and if not found continue in parent (if element has parent). and so on.
        定義:
        lookupNamespaceByName インタフェース内 XmlElement
      • lookupNamespaceByPrefix

        public XmlNamespace lookupNamespaceByPrefix​(String namespacePrefix)
        インタフェースからコピーされた説明: XmlElement
        Find namespace (will have non empty prefix) corresponding to namespace prefix checking first current elemen and if not found continue in parent (if element has parent) and so on.
        定義:
        lookupNamespaceByPrefix インタフェース内 XmlElement
      • newNamespace

        public XmlNamespace newNamespace​(String namespaceName)
        インタフェースからコピーされた説明: XmlElement
        Create new namespace with null prefix (namespace name must be not null).
        定義:
        newNamespace インタフェース内 XmlElement
      • setBaseUri

        public void setBaseUri​(String baseUri)
        インタフェースからコピーされた説明: XmlElement
        XML Infoset [base URI] property
        定義:
        setBaseUri インタフェース内 XmlElement
        パラメータ:
        baseUri - a String
      • setNamespace

        public void setNamespace​(XmlNamespace namespace)
        インタフェースからコピーされた説明: XmlElement
        Set namespace ot use for theis element. Note: namespace prefix is always ignored.
        定義:
        setNamespace インタフェース内 XmlElement
      • ensureNamespaceDeclarationsCapacity

        public void ensureNamespaceDeclarationsCapacity​(int minCapacity)
        インタフェースからコピーされた説明: XmlElement
        Method ensureNamespaceDeclarationsCapacity
        定義:
        ensureNamespaceDeclarationsCapacity インタフェース内 XmlElement
        パラメータ:
        minCapacity - an int
      • getName

        public String getName()
        インタフェースからコピーされた説明: XmlElement
        XML Infoset [local name] property.
        定義:
        getName インタフェース内 XmlElement
        戻り値:
        a String
      • setName

        public void setName​(String name)
        インタフェースからコピーされた説明: XmlElement
        XML Infoset [local name] property.
        定義:
        setName インタフェース内 XmlElement
        パラメータ:
        name - a String
      • addAttribute

        public XmlAttribute addAttribute​(String type,
                                         XmlNamespace namespace,
                                         String name,
                                         String value)
        インタフェースからコピーされた説明: XmlElement
        Method addAttribute
        定義:
        addAttribute インタフェース内 XmlElement
        パラメータ:
        type - a String
        namespace - a XmlNamespace
        name - a String
        value - a String
        戻り値:
        a XmlAttribute
      • ensureAttributeCapacity

        public void ensureAttributeCapacity​(int minCapacity)
        インタフェースからコピーされた説明: XmlElement
        Method ensureAttributeCapacity
        定義:
        ensureAttributeCapacity インタフェース内 XmlElement
        パラメータ:
        minCapacity - an int
      • addAttribute

        public XmlAttribute addAttribute​(XmlAttribute attributeValueToAdd)
        インタフェースからコピーされた説明: XmlElement
        Add attribute (adds it to the XML Infoset [namespace attributes] set) Attribute mist
        定義:
        addAttribute インタフェース内 XmlElement
        パラメータ:
        attributeValueToAdd - a XmlAttribute
        戻り値:
        a XmlAttribute
      • element

        public XmlElement element​(int position)
        インタフェースからコピーされた説明: XmlElement
        return element at poition (0..count-1) or IndexOutOfBoundsException if positon incorrect
        定義:
        element インタフェース内 XmlElement
      • element

        public XmlElement element​(XmlNamespace n,
                                  String name)
        インタフェースからコピーされた説明: XmlElement
        find first element with name and namespace (if namespace is null it is ignored in search)
        定義:
        element インタフェース内 XmlElement
      • element

        public XmlElement element​(XmlNamespace n,
                                  String name,
                                  boolean create)
        インタフェースからコピーされた説明: XmlElement
        find first element with name and namespace (if namespace is null it is ignored in search) if no matching element is found then new element is created, appended to children, and returned
        定義:
        element インタフェース内 XmlElement
      • elements

        public Iterable elements​(XmlNamespace n,
                                 String name)
        インタフェースからコピーされた説明: XmlElement
        Return all elements that has namespace and name (null is never returned but empty iteraotr)
        定義:
        elements インタフェース内 XmlElement
      • newElement

        public XmlElement newElement​(XmlNamespace namespace,
                                     String name)
        インタフェースからコピーされた説明: XmlElement
        Method newElement
        定義:
        newElement インタフェース内 XmlElement
        パラメータ:
        namespace - a XmlNamespace
        name - a String
        戻り値:
        a XmlElement
      • addElement

        public XmlElement addElement​(XmlElement child)
        インタフェースからコピーされた説明: XmlElement
        NOTE: the child element must unattached to be added (it is atttached if it is XmlContainer of recognized type and getParent() != null)
        定義:
        addElement インタフェース内 XmlElement
      • addElement

        public XmlElement addElement​(int pos,
                                     XmlElement child)
        インタフェースからコピーされた説明: XmlElement
        Method addElement
        定義:
        addElement インタフェース内 XmlElement
        パラメータ:
        pos - an int (starting from 0)
        child - a XmlElement
        戻り値:
        a XmlElement
      • addElement

        public XmlElement addElement​(String name)
        インタフェースからコピーされた説明: XmlElement
        Method addElement
        定義:
        addElement インタフェース内 XmlElement
        パラメータ:
        name - a String
        戻り値:
        a XmlElement
      • addChild

        public void addChild​(Object child)
        インタフェースからコピーされた説明: XmlElement
        NOTE: =child added is _not_ checked if it XmlContainer, caller must manually fix parent in child by calling setParent() !!!!
        定義:
        addChild インタフェース内 XmlElement
      • removeChild

        public void removeChild​(Object child)
        インタフェースからコピーされた説明: XmlElement
        Method removeChild
        定義:
        removeChild インタフェース内 XmlElement
        パラメータ:
        child - an Object
      • children

        public Iterator children()
        インタフェースからコピーされた説明: XmlElement
        Return Iterator - null is never returned if there is no children then iteraotr over empty collection is returned
        定義:
        children インタフェース内 XmlElement
        • requiredElementContent

          public Iterable requiredElementContent()
          インタフェースからコピーされた説明: XmlElement
          Return Iterator - that represents all XmlElement content. When used exception will be thrown if non white space children are found (as expected no mixed content!).
          定義:
          requiredElementContent インタフェース内 XmlElement
        • requiredTextContent

          public String requiredTextContent()
          インタフェースからコピーされた説明: XmlElement
          return children content as text - if there are any no text children throw exception
          定義:
          requiredTextContent インタフェース内 XmlElement
        • hasChild

          public boolean hasChild​(Object child)
          インタフェースからコピーされた説明: XmlElement
          Method hasChild
          定義:
          hasChild インタフェース内 XmlElement
          パラメータ:
          child - an Object
          戻り値:
          a boolean
        • newElement

          public XmlElement newElement​(String namespaceName,
                                       String name)
          インタフェースからコピーされた説明: XmlElement
          Method newElement
          定義:
          newElement インタフェース内 XmlElement
          パラメータ:
          namespaceName - a String
          name - a String
          戻り値:
          a XmlElement
        • addElement

          public XmlElement addElement​(XmlNamespace namespace,
                                       String name)
          インタフェースからコピーされた説明: XmlElement
          Method addElement
          定義:
          addElement インタフェース内 XmlElement
          パラメータ:
          namespace - a XmlNamespace
          name - a String
          戻り値:
          a XmlElement
        • hasChildren

          public boolean hasChildren()
          インタフェースからコピーされた説明: XmlElement
          Method hasChildren
          定義:
          hasChildren インタフェース内 XmlElement
          戻り値:
          a boolean
        • addChild

          public void addChild​(int pos,
                               Object child)
          インタフェースからコピーされた説明: XmlElement
          Method addChild
          定義:
          addChild インタフェース内 XmlElement
          パラメータ:
          pos - an int (starting from 0)
          child - an Object
        • replaceChild

          public void replaceChild​(Object newChild,
                                   Object oldChild)
          インタフェースからコピーされた説明: XmlElement
          Method replaceChild
          定義:
          replaceChild インタフェース内 XmlElement
          パラメータ:
          newChild - an Object
          oldChild - an Object
        • replaceChildrenWithText

          public void replaceChildrenWithText​(String textContent)
          インタフェースからコピーされた説明: XmlElement
          Remove all children and then add this text as only child.
          定義:
          replaceChildrenWithText インタフェース内 XmlElement