Class ContentNodeImpl

    • Constructor Detail

      • ContentNodeImpl

        public ContentNodeImpl​(org.jruby.runtime.builtin.IRubyObject rubyNode)
    • Method Detail

      • getId

        public java.lang.String getId()
        Specified by:
        getId in interface ContentNode
        Returns:
        A unique ID for this node
      • setId

        public void setId​(java.lang.String id)
        Specified by:
        setId in interface ContentNode
      • setContext

        public void setContext​(java.lang.String context)
        Specified by:
        setContext in interface ContentNode
      • getAttributes

        public java.util.Map<java.lang.String,​java.lang.Object> getAttributes()
        Specified by:
        getAttributes in interface ContentNode
      • getAttribute

        public java.lang.Object getAttribute​(java.lang.Object name,
                                             java.lang.Object defaultValue,
                                             boolean inherit)
        Specified by:
        getAttribute in interface ContentNode
      • getAttribute

        public java.lang.Object getAttribute​(java.lang.Object name,
                                             java.lang.Object defaultValue)
        Specified by:
        getAttribute in interface ContentNode
      • getAttribute

        public java.lang.Object getAttribute​(java.lang.Object name)
        Specified by:
        getAttribute in interface ContentNode
      • isAttribute

        public boolean isAttribute​(java.lang.Object name,
                                   java.lang.Object expected,
                                   boolean inherit)
        Specified by:
        isAttribute in interface ContentNode
        Returns:
      • isAttribute

        public boolean isAttribute​(java.lang.Object name,
                                   java.lang.Object expected)
        Specified by:
        isAttribute in interface ContentNode
        Returns:
      • hasAttribute

        public boolean hasAttribute​(java.lang.Object name)
        Specified by:
        hasAttribute in interface ContentNode
        Returns:
        true if this node or the document has an attribute with the given name
      • hasAttribute

        public boolean hasAttribute​(java.lang.Object name,
                                    boolean inherited)
        Specified by:
        hasAttribute in interface ContentNode
        Returns:
        true if the current node or depending on the inherited parameter the document has an attribute with the given name.
      • setAttribute

        public boolean setAttribute​(java.lang.Object name,
                                    java.lang.Object value,
                                    boolean overwrite)
        Specified by:
        setAttribute in interface ContentNode
        Returns:
      • isOption

        public boolean isOption​(java.lang.Object name)
        Specified by:
        isOption in interface ContentNode
      • getRole

        public java.lang.String getRole()
        Specified by:
        getRole in interface ContentNode
      • getRoles

        public java.util.List<java.lang.String> getRoles()
        Specified by:
        getRoles in interface ContentNode
      • hasRole

        public boolean hasRole​(java.lang.String role)
        Specified by:
        hasRole in interface ContentNode
      • addRole

        public void addRole​(java.lang.String role)
        Specified by:
        addRole in interface ContentNode
      • removeRole

        public void removeRole​(java.lang.String role)
        Specified by:
        removeRole in interface ContentNode
      • iconUri

        public java.lang.String iconUri​(java.lang.String name)
        Specified by:
        iconUri in interface ContentNode
      • mediaUri

        public java.lang.String mediaUri​(java.lang.String target)
        Specified by:
        mediaUri in interface ContentNode
      • imageUri

        public java.lang.String imageUri​(java.lang.String targetImage)
        Specified by:
        imageUri in interface ContentNode
      • imageUri

        public java.lang.String imageUri​(java.lang.String targetImage,
                                         java.lang.String assetDirKey)
        Specified by:
        imageUri in interface ContentNode
      • readAsset

        public java.lang.String readAsset​(java.lang.String path,
                                          java.util.Map<java.lang.Object,​java.lang.Object> opts)
        Specified by:
        readAsset in interface ContentNode
      • normalizeWebPath

        public java.lang.String normalizeWebPath​(java.lang.String path,
                                                 java.lang.String start,
                                                 boolean preserveUriTarget)
        Specified by:
        normalizeWebPath in interface ContentNode