|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gcube.portlets.user.shareupdates.server.metaseeker.MetaSeeker
public class MetaSeeker
Field Summary | |
---|---|
static Hashtable<String,String[]> |
BASE_TYPES
|
static String[] |
REQUIRED_META
|
Constructor Summary | |
---|---|
MetaSeeker()
Create an open graph representation for generating your own Open Graph object |
|
MetaSeeker(String url)
Fetch the metas representation from a web site |
Method Summary | |
---|---|
Hashtable<String,ArrayList<MetaElement>> |
exposeTable()
Obtain the underlying HashTable |
String |
getBaseType()
Get the basic type of the Open graph page as per the specification |
String |
getContent(String property)
Get a value of a given Open Graph property |
String |
getOriginalUrl()
Get the original URL the Open Graph page was obtained from |
MetaElement[] |
getProperties()
Get all the defined properties of the Open Graph object |
MetaElement[] |
getProperties(String property)
Get all the defined properties of the Open Graph object |
boolean |
hasChanged()
Test if the object has been modified by setters/deleters. |
boolean |
isFromWeb()
Test if the Open Graph object was initially a representation of a web page |
void |
removeProperty(String property)
Removed a defined property |
void |
setProperty(String property,
String content)
Set the meta property to a specific value |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String[] REQUIRED_META
public static final Hashtable<String,String[]> BASE_TYPES
Constructor Detail |
---|
public MetaSeeker()
public MetaSeeker(String url) throws IOException, Exception
url
- The address to the web page to fetch the meta
IOException
- If a network error occurs, the HTML parser will throw an IO Exception
Exception
Method Detail |
---|
public String getBaseType()
public String getContent(String property)
property
- The Open graph property key
public MetaElement[] getProperties()
public MetaElement[] getProperties(String property)
property
- The property to focus on
public String getOriginalUrl()
public void setProperty(String property, String content)
property
- The meta where XXXX is the property you wish to setcontent
- The value or contents of the property to be setpublic void removeProperty(String property)
property
- The og:XXXX where XXXX is the property you wish to removepublic Hashtable<String,ArrayList<MetaElement>> exposeTable()
public boolean isFromWeb()
public boolean hasChanged()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |