Class ItemScope
- java.lang.Object
-
- org.apache.any23.extractor.microdata.Item
-
- org.apache.any23.extractor.microdata.ItemScope
-
public class ItemScope extends Item
This class describes a Microdata itemscope.- Author:
- Michele Mostarda (mostarda@fbk.eu), Hans Brende (hansbrende@apache.org)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidacquireProperty(ItemProp itemProp)protected voiddisownProperty(ItemProp itemProp)booleanequals(Object obj)StringgetId()StringgetItemId()Map<String,List<ItemProp>>getProperties()String[]getRefs()URLgetType()inthashCode()StringtoJSON()StringtoString()
-
-
-
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 benull.refs- list of item prop references connected to this itemscope. Can benull.type- itemscope type. Can benull.itemId- itemscope id. Can benull.
-
-
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()
-
acquireProperty
protected void acquireProperty(ItemProp itemProp)
-
disownProperty
protected void disownProperty(ItemProp itemProp)
-
-