|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.semanticdesktop.aperture.outlook.OutlookResource
public abstract class OutlookResource
For each outlook class, a outlook resource class exists. Here we implement methods to get save versions of the classes, map them to RDFS, etc. Also the real extraction process happens here. It would be bad to have each resourceWrapper in its own file, too many files, so this is for shortness of code.
Copyright: Copyright (c) 2003
Organisation: Gnowsis.com
Nested Class Summary | |
---|---|
static class |
OutlookResource.Appointment
Copyright: Copyright (c) 2003 Organisation: Gnowsis.com |
static class |
OutlookResource.Calendar
wraps an outlook calendar folder as vcalendar - leap of faith to do this. |
static class |
OutlookResource.Contact
|
static class |
OutlookResource.DistList
|
static class |
OutlookResource.Document
|
static class |
OutlookResource.Folder
|
static class |
OutlookResource.Mail
|
static class |
OutlookResource.Note
|
static class |
OutlookResource.OutlookResourceSave
a OutlookResource that has a "save" object from redemption. |
static class |
OutlookResource.RootFolder
|
static class |
OutlookResource.Task
|
Constructor Summary | |
---|---|
protected |
OutlookResource(OutlookCrawler crawler,
com.jacob.com.Dispatch resource,
String itemType)
Special constructor for subclasses for a little convenience. argh, in Delphi i would have done this even easier. |
protected |
OutlookResource(OutlookCrawler crawler,
String uri,
com.jacob.com.Dispatch resource,
String itemType)
Normal constructor with url and resource. |
Method Summary | |
---|---|
void |
addData(RDFContainer rdf)
Add the data about this object. |
protected void |
addDateIfNotNull(RDFContainer rdf,
URI property,
com.jacob.com.Dispatch resource,
String dispName)
END OF OutlookResource ****************************** |
protected abstract void |
addDetailData(RDFContainer rdf)
Add the detail data about this object. |
protected void |
addEmailAddressIfNotNull(Model model,
Resource parentNode,
com.jacob.com.Dispatch resource,
String dispName)
|
protected void |
addNcalDateTimeIfNotNull(RDFContainer rdf,
URI property,
com.jacob.com.Dispatch resource,
String dispName)
|
protected void |
addPropertyIfNotNull(RDFContainer rdf,
URI property,
com.jacob.com.Dispatch disp,
String dispName)
protected helper method. |
protected void |
addRecipientsIfNotNull(RDFContainer rdf,
com.jacob.com.Dispatch resource,
String dispName,
OutlookResource parentResource)
Add the recipients of an e-mail or an appointment |
protected void |
addStatement(RDFContainer rdf,
Resource subject,
URI predicate,
Node object)
|
protected void |
addStatement(RDFContainer rdf,
Resource subject,
URI predicate,
String label)
|
protected void |
addStatement(RDFContainer rdf,
Resource subject,
URI predicate,
String label,
URI datatype)
|
protected void |
addTelephoneNumberIfNotNull(Model model,
Resource parentNode,
com.jacob.com.Dispatch resource,
String dispName,
String comment,
URI type)
|
static OutlookResource |
createWrapperFor(OutlookCrawler crawler,
com.jacob.com.Dispatch resource,
Logger logger)
Factory method to create Wrappers. this looks at the passed Dispatch and sees what type it is and creates an according OutlookResource subclass |
static OutlookResource |
createWrapperFor(OutlookCrawler crawler,
String uri,
Logger logger)
create a outlook resource wrapper for a uri Parse the uri and return the resource wrapper or null, if uri points to nowhere This interface is primarily used to get the objects from the Jena/RDF side of the world |
static OutlookResource.Folder |
createWrapperForFolder(OutlookCrawler crawler,
com.jacob.com.Dispatch folder)
Factory method to create Wrappers for Folder Dispatchs. this looks at the passed Dispatch and sees what type it is and creates an according OLFolder or other resource |
static OutlookResource.Folder |
createWrapperForFolder(OutlookCrawler crawler,
String itemId,
String expectedItemType,
Logger logger)
Factory method to create Wrappers for Folder Dispatchs. this looks at the passed Dispatch and sees what type it is and creates an according OLFolder or other resource |
protected void |
finalize()
finalizer for releasing the activeX //TODO This one runs in its own thread and is therefore dangerous to COM. |
DataObject |
getDataObjectIfModified(String url,
DataSource source,
AccessData accessData,
Map params,
RDFContainerFactory containerFactory)
|
protected Date |
getDateOf(com.jacob.com.Dispatch disp,
String dispName)
protected helper method to extract literal values from Dispatchs |
String |
getItemType()
|
long |
getLastModified()
get the last modification time of this resource. |
protected String |
getLiteralOf(com.jacob.com.Dispatch disp,
String dispName)
protected helper method to extract literal values from Dispatchs |
OutlookCrawler |
getOLCrawler()
get the crawler that hosts this resource |
com.jacob.com.Dispatch |
getResource()
|
abstract URI |
getType()
|
String |
getUri()
|
boolean |
isFolder()
|
void |
release()
release |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected OutlookResource(OutlookCrawler crawler, com.jacob.com.Dispatch resource, String itemType)
crawler
- crawlerresource
- Outlook resource that has to implement "EntryID" for identifieritemType
- itemtype for path
Exception
protected OutlookResource(OutlookCrawler crawler, String uri, com.jacob.com.Dispatch resource, String itemType)
crawler
- Crawlercrawleruri
- uri of the resourceresource
- object of the resourceitemType
- itemtype for path
Exception
Method Detail |
---|
public static OutlookResource createWrapperFor(OutlookCrawler crawler, com.jacob.com.Dispatch resource, Logger logger)
public static OutlookResource createWrapperFor(OutlookCrawler crawler, String uri, Logger logger)
public static OutlookResource.Folder createWrapperForFolder(OutlookCrawler crawler, com.jacob.com.Dispatch folder)
public static OutlookResource.Folder createWrapperForFolder(OutlookCrawler crawler, String itemId, String expectedItemType, Logger logger) throws Exception
Exception
public void addData(RDFContainer rdf) throws IOException
rdf
- the container to add the rdf to
IOException
- if reading is not possibleprotected abstract void addDetailData(RDFContainer rdf) throws IOException
rdf
- the container to add the rdf to
IOException
- if reading is not possibleprotected void addDateIfNotNull(RDFContainer rdf, URI property, com.jacob.com.Dispatch resource, String dispName)
protected void addNcalDateTimeIfNotNull(RDFContainer rdf, URI property, com.jacob.com.Dispatch resource, String dispName)
protected void addEmailAddressIfNotNull(Model model, Resource parentNode, com.jacob.com.Dispatch resource, String dispName)
protected void addTelephoneNumberIfNotNull(Model model, Resource parentNode, com.jacob.com.Dispatch resource, String dispName, String comment, URI type)
protected void addPropertyIfNotNull(RDFContainer rdf, URI property, com.jacob.com.Dispatch disp, String dispName)
protected void addStatement(RDFContainer rdf, Resource subject, URI predicate, String label, URI datatype)
protected void addStatement(RDFContainer rdf, Resource subject, URI predicate, String label)
protected void addStatement(RDFContainer rdf, Resource subject, URI predicate, Node object)
protected void addRecipientsIfNotNull(RDFContainer rdf, com.jacob.com.Dispatch resource, String dispName, OutlookResource parentResource)
rdf
- the parent rdf container. Properties will be added linked to this URIparentResource
- the parent node to add toresource
- the recipients resourcedispName
- diplay nameprotected void finalize() throws Throwable
finalize
in class Object
Throwable
public DataObject getDataObjectIfModified(String url, DataSource source, AccessData accessData, Map params, RDFContainerFactory containerFactory) throws UrlNotFoundException, IOException
UrlNotFoundException
IOException
protected Date getDateOf(com.jacob.com.Dispatch disp, String dispName)
disp
- the Dispatch Object to extract fromdispName
-
public String getItemType()
public long getLastModified()
protected String getLiteralOf(com.jacob.com.Dispatch disp, String dispName)
disp
- the Dispatch Object to extract fromdispName
-
public OutlookCrawler getOLCrawler()
public com.jacob.com.Dispatch getResource()
public abstract URI getType()
public String getUri()
public boolean isFolder()
public void release()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |