Class ItemScope


  • public class ItemScope
    extends Item
    This class describes a Microdata itemscope.
    Author:
    Michele Mostarda (mostarda@fbk.eu), Hans Brende (hansbrende@apache.org)
    • Constructor Detail

      • ItemScope

        public ItemScope​(String xpath,
                         ItemProp[] itemProps,
                         String id,
                         String[] refs,
                         String type,
                         String itemId)
        Constructor.
        Parameters:
        xpath - location of this itemscope within the container document.
        itemProps - list of properties bound to this itemscope.
        id - DOM identifier for this itemscope. Can be null.
        refs - list of item prop references connected to this itemscope. Can be null.
        type - itemscope type. Can be null.
        itemId - itemscope id. Can be null.
    • Method Detail

      • getProperties

        public Map<String,​List<ItemProp>> getProperties()
        Returns:
        map of declared properties, every property can have more than a value.
      • getId

        public String getId()
        Returns:
        the itemscope
      • getRefs

        public String[] getRefs()
        Returns:
        itemscope list of references to itemprops.
      • getType

        public URL getType()
        Returns:
        itemscope type.
      • getItemId

        public String getItemId()
        Returns:
        itemscope public identifier.
      • toJSON

        public String toJSON()
        Specified by:
        toJSON in class Item
        Returns:
        the JSON representation for this item.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Item
      • equals

        public boolean equals​(Object obj)
        Overrides:
        equals in class Item
      • acquireProperty

        protected void acquireProperty​(ItemProp itemProp)
      • disownProperty

        protected void disownProperty​(ItemProp itemProp)