org.apache.shindig.gadgets.parse
Class SocialDataTags

java.lang.Object
  extended by org.apache.shindig.gadgets.parse.SocialDataTags

public final class SocialDataTags
extends Object

Helper class containing all defs regarding social data tags, and one helper method to retrieve all such tags from the document. Neko's parser implementation disallows script tags with children, so as a workaround they convert such tags' name to OSData or OSTemplate. This class provides a helper to select all OSData or OSTemplate tags, irrespective whether this conversion occurred, ensuring that data pipelining and templating can work with any parser.

Since:
2.0.0

Field Summary
static String OSML_DATA_TAG
          Allowed tag names for OpenSocial Data and template blocks.
static String OSML_TEMPLATE_TAG
           
static com.google.common.collect.BiMap<String,String> SCRIPT_TYPE_TO_OSML_TAG
          Bi-map of OpenSocial tags to their script type attribute values.
 
Method Summary
static List<Element> getTags(Document doc, String tagName)
           
static boolean isOpenSocialScript(Element script)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OSML_DATA_TAG

public static final String OSML_DATA_TAG
Allowed tag names for OpenSocial Data and template blocks.

See Also:
Constant Field Values

OSML_TEMPLATE_TAG

public static final String OSML_TEMPLATE_TAG
See Also:
Constant Field Values

SCRIPT_TYPE_TO_OSML_TAG

public static final com.google.common.collect.BiMap<String,String> SCRIPT_TYPE_TO_OSML_TAG
Bi-map of OpenSocial tags to their script type attribute values.

Method Detail

getTags

public static List<Element> getTags(Document doc,
                                    String tagName)

isOpenSocialScript

public static boolean isOpenSocialScript(Element script)


Copyright © 2007-2012. All Rights Reserved.