/** * Retrieves an attribute as a URI, and verifies that the URI is an http or https URI. * @param node * @param attr * @param base * @return the parsed uri, or null if the attribute is not a valid http or * https URI. */ public static Uri getHttpUriAttribute(Node node, String attr, Uri base) { return getHttpUriAttribute(node, attr, base, null); }
/** * @return An attribute coerced to an integer. */ public static int getIntAttribute(Node node, String attr) { return getIntAttribute(node, attr, 0); }
/** * @param node * @param attr * @return True if the attribute exists and is not equal to "false" * false otherwise. */ public static boolean getBoolAttribute(Node node, String attr) { return getBoolAttribute(node, attr, false); }
/** * Retrieves an attribute as a URI. * @param node * @param attr * @return The parsed uri, or null. */ public static Uri getUriAttribute(Node node, String attr) { return getUriAttribute(node, attr, null); }
/** * @param node * @param attr * @return The value of the given attribute, or null if not present. */ public static String getAttribute(Node node, String attr) { return getAttribute(node, attr, null); }
/** * Use for testing. */ public GadgetSpec(Uri url, String xml) throws SpecParserException { this(url, XmlUtil.parseSilent(xml), xml); }
/** * @param node * @param attr * @return True if the attribute exists and is not equal to "false" * false otherwise. */ public static boolean getBoolAttribute(Node node, String attr) { return getBoolAttribute(node, attr, false); }
/** * Retrieves an attribute as a URI, and verifies that the URI is an http or https URI. * @param node * @param attr * @param base * @return the parsed uri, or null if the attribute is not a valid http or * https URI. */ public static Uri getHttpUriAttribute(Node node, String attr, Uri base) { return getHttpUriAttribute(node, attr, base, null); }
/** * @return An attribute coerced to an integer. */ public static int getIntAttribute(Node node, String attr) { return getIntAttribute(node, attr, 0); }
/** * Retrieves an attribute as a URI. * @param node * @param attr * @return The parsed uri, or null. */ public static Uri getUriAttribute(Node node, String attr) { return getUriAttribute(node, attr, null); }
/** * @param node * @param attr * @return The value of the given attribute, or null if not present. */ public static String getAttribute(Node node, String attr) { return getAttribute(node, attr, null); }
/** * Use for testing. */ public GadgetSpec(Uri url, String xml) throws SpecParserException { this(url, XmlUtil.parseSilent(xml), xml); }
/** * @param node * @param attr * @return True if the attribute exists and is not equal to "false" * false otherwise. */ public static boolean getBoolAttribute(Node node, String attr) { return getBoolAttribute(node, attr, false); }
/** * Retrieves an attribute as a URI, and verifies that the URI is an http or https URI. * @param node * @param attr * @param base * @return the parsed uri, or null if the attribute is not a valid http or * https URI. */ public static Uri getHttpUriAttribute(Node node, String attr, Uri base) { return getHttpUriAttribute(node, attr, base, null); }
/** * @return An attribute coerced to an integer. */ public static int getIntAttribute(Node node, String attr) { return getIntAttribute(node, attr, 0); }
/** * Retrieves an attribute as a URI. * @param node * @param attr * @return The parsed uri, or null. */ public static Uri getUriAttribute(Node node, String attr) { return getUriAttribute(node, attr, null); }
/** * @param node * @param attr * @return The value of the given attribute, or null if not present. */ public static String getAttribute(Node node, String attr) { return getAttribute(node, attr, null); }
/** * @param node * @param attr * @return True if the attribute exists and is not equal to "false" * false otherwise. */ public static boolean getBoolAttribute(Node node, String attr) { return getBoolAttribute(node, attr, false); }
/** * Retrieves an attribute as a URI, and verifies that the URI is an http or https URI. * @param node * @param attr * @param base * @return the parsed uri, or null if the attribute is not a valid http or * https URI. */ public static Uri getHttpUriAttribute(Node node, String attr, Uri base) { return getHttpUriAttribute(node, attr, base, null); }
/** * @param node * @param attr * @return True if the attribute exists and is not equal to "false" * false otherwise. */ public static boolean getBoolAttribute(Node node, String attr) { return getBoolAttribute(node, attr, false); }