From: <her...@us...> - 2009-02-26 15:19:26
|
Revision: 1756 http://aperture.svn.sourceforge.net/aperture/?rev=1756&view=rev Author: herko_ter_horst Date: 2009-02-26 15:19:21 +0000 (Thu, 26 Feb 2009) Log Message: ----------- Mavenized Outlook module. Modified Paths: -------------- aperture/trunk/core/addressbook/apple/src/main/java/org/semanticdesktop/aperture/addressbook/apple/bundle/AppleAddressbookActivator.java aperture/trunk/core/addressbook/thunderbird/src/main/java/org/semanticdesktop/aperture/addressbook/thunderbird/bundle/ThunderbirdAddressbookActivator.java aperture/trunk/core/outlook/pom.xml aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/OutlookDataSourceDetector.java aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/OutlookResource.java aperture/trunk/core/pom.xml aperture/trunk/pom.xml Added Paths: ----------- aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/bundle/ aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/bundle/OutlookActivator.java aperture/trunk/core/outlook/src/main/resources/ aperture/trunk/core/outlook/src/main/resources/org/ aperture/trunk/core/outlook/src/main/resources/org/semanticdesktop/ aperture/trunk/core/outlook/src/main/resources/org/semanticdesktop/aperture/ aperture/trunk/core/outlook/src/main/resources/org/semanticdesktop/aperture/outlook/ aperture/trunk/core/outlook/src/main/resources/org/semanticdesktop/aperture/outlook/outlookDataSource.ttl Removed Paths: ------------- aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/OUTLOOKDS.java aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/OutlookDataSource.java aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/outlookDataSource.ttl Property Changed: ---------------- aperture/trunk/core/outlook/ Modified: aperture/trunk/core/addressbook/apple/src/main/java/org/semanticdesktop/aperture/addressbook/apple/bundle/AppleAddressbookActivator.java =================================================================== --- aperture/trunk/core/addressbook/apple/src/main/java/org/semanticdesktop/aperture/addressbook/apple/bundle/AppleAddressbookActivator.java 2009-02-26 14:36:12 UTC (rev 1755) +++ aperture/trunk/core/addressbook/apple/src/main/java/org/semanticdesktop/aperture/addressbook/apple/bundle/AppleAddressbookActivator.java 2009-02-26 15:19:21 UTC (rev 1756) @@ -13,23 +13,23 @@ import org.osgi.framework.ServiceRegistration; import org.semanticdesktop.aperture.addressbook.apple.AppleAddressbookCrawlerFactory; import org.semanticdesktop.aperture.addressbook.apple.AppleAddressbookDataSourceFactory; +import org.semanticdesktop.aperture.crawler.CrawlerFactory; import org.semanticdesktop.aperture.datasource.DataSourceFactory; public class AppleAddressbookActivator implements BundleActivator { + private ServiceRegistration crawlerRegistration; + private ServiceRegistration dataSourceRegistration; - private ServiceRegistration crawlerRegistration; - public void start(BundleContext context) throws Exception { - crawlerRegistration = context.registerService(DataSourceFactory.class + crawlerRegistration = context.registerService(CrawlerFactory.class .getName(), new AppleAddressbookCrawlerFactory(), new Hashtable()); - crawlerRegistration = context.registerService(DataSourceFactory.class - .getName(), new AppleAddressbookDataSourceFactory(), - new Hashtable()); - + dataSourceRegistration = context.registerService( + DataSourceFactory.class.getName(), + new AppleAddressbookDataSourceFactory(), new Hashtable()); } public void stop(BundleContext context) throws Exception { Modified: aperture/trunk/core/addressbook/thunderbird/src/main/java/org/semanticdesktop/aperture/addressbook/thunderbird/bundle/ThunderbirdAddressbookActivator.java =================================================================== --- aperture/trunk/core/addressbook/thunderbird/src/main/java/org/semanticdesktop/aperture/addressbook/thunderbird/bundle/ThunderbirdAddressbookActivator.java 2009-02-26 14:36:12 UTC (rev 1755) +++ aperture/trunk/core/addressbook/thunderbird/src/main/java/org/semanticdesktop/aperture/addressbook/thunderbird/bundle/ThunderbirdAddressbookActivator.java 2009-02-26 15:19:21 UTC (rev 1756) @@ -13,22 +13,23 @@ import org.osgi.framework.ServiceRegistration; import org.semanticdesktop.aperture.addressbook.thunderbird.ThunderbirdAddressbookCrawlerFactory; import org.semanticdesktop.aperture.addressbook.thunderbird.ThunderbirdAddressbookDataSourceFactory; +import org.semanticdesktop.aperture.crawler.CrawlerFactory; import org.semanticdesktop.aperture.datasource.DataSourceFactory; public class ThunderbirdAddressbookActivator implements BundleActivator { + private ServiceRegistration crawlerRegistration; + private ServiceRegistration dataSourceRegistration; - private ServiceRegistration crawlerRegistration; - public void start(BundleContext context) throws Exception { - crawlerRegistration = context.registerService(DataSourceFactory.class + crawlerRegistration = context.registerService(CrawlerFactory.class .getName(), new ThunderbirdAddressbookCrawlerFactory(), new Hashtable()); - crawlerRegistration = context.registerService(DataSourceFactory.class - .getName(), new ThunderbirdAddressbookDataSourceFactory(), - new Hashtable()); + dataSourceRegistration = context.registerService( + DataSourceFactory.class.getName(), + new ThunderbirdAddressbookDataSourceFactory(), new Hashtable()); } Property changes on: aperture/trunk/core/outlook ___________________________________________________________________ Added: svn:ignore + .classpath .project .settings target Modified: aperture/trunk/core/outlook/pom.xml =================================================================== --- aperture/trunk/core/outlook/pom.xml 2009-02-26 14:36:12 UTC (rev 1755) +++ aperture/trunk/core/outlook/pom.xml 2009-02-26 15:19:21 UTC (rev 1756) @@ -14,5 +14,181 @@ <artifactId>aperture-outlook</artifactId> <name>Aperture Core: Outlook</name> - <description>Support for Microsoft Outlook</description> + <description>Support for Microsoft Outlook</description> + + <properties> + <ontology.input>src/main/resources/org/semanticdesktop/aperture/outlook/outlookDataSource.ttl</ontology.input> + <ontology.namespace>http://aperture.semanticdesktop.org/ontology/2007/08/12/outlookds#</ontology.namespace> + <ontology.class>OUTLOOKDS</ontology.class> + <generator.output.package>org.semanticdesktop.aperture.outlook</generator.output.package> + <generator.output.class>OutlookDataSource</generator.output.class> + <generator.output.dir>src/main/java</generator.output.dir> + </properties> + + <dependencies> + <dependency> + <groupId>org.semanticdesktop.aperture</groupId> + <artifactId>aperture-accessor-core</artifactId> + </dependency> + <dependency> + <groupId>org.semanticdesktop.aperture</groupId> + <artifactId>aperture-crawler-core</artifactId> + </dependency> + <dependency> + <groupId>org.semanticdesktop.aperture</groupId> + <artifactId>aperture-datasource-core</artifactId> + </dependency> + <dependency> + <groupId>org.semanticdesktop.aperture</groupId> + <artifactId>aperture-detector-core</artifactId> + </dependency> + <dependency> + <groupId>org.semanticdesktop.aperture</groupId> + <artifactId>aperture-opener-core</artifactId> + </dependency> + <dependency> + <groupId>org.semanticdesktop.aperture</groupId> + <artifactId>aperture-rdf</artifactId> + </dependency> + <dependency> + <groupId>org.semanticdesktop.aperture</groupId> + <artifactId>aperture-vocabulary-core</artifactId> + </dependency> + + <dependency> + <groupId>net.sf.jacob-project</groupId> + <artifactId>jacob</artifactId> + </dependency> + + <dependency> + <groupId>org.semweb4j</groupId> + <artifactId>rdf2go.api</artifactId> + </dependency> + + <dependency> + <groupId>org.osgi</groupId> + <artifactId>osgi_R4_core</artifactId> + </dependency> + + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.semanticdesktop.aperture</groupId> + <artifactId>aperture-vocabulary-maven-plugin</artifactId> + <configuration> + <vocabularies> + <vocabulary> + <ontology>${ontology.input}</ontology> + <namespace>${ontology.namespace}</namespace> + <javaClass>${generator.output.package}.${ontology.class}</javaClass> + <outputDir>${generator.output.dir}</outputDir> + </vocabulary> + </vocabularies> + </configuration> + </plugin> + <plugin> + <groupId>org.semanticdesktop.aperture</groupId> + <artifactId>aperture-datasource-maven-plugin</artifactId> + <configuration> + <dataSources> + <dataSource> + <ontology>${ontology.input}</ontology> + <namespace>${ontology.namespace}</namespace> + <ontologyClass>${ontology.class}</ontologyClass> + <javaClass>${generator.output.package}.${generator.output.class}</javaClass> + <outputDir>${generator.output.dir}</outputDir> + </dataSource> + </dataSources> + </configuration> + </plugin> + <plugin> + <artifactId>maven-jar-plugin</artifactId> + <configuration> + <archive> + <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile> + </archive> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <Export-Package>org.semanticdesktop.aperture.outlook</Export-Package> + <Private-Package>org.semanticdesktop.aperture.outlook.bundle</Private-Package> + <Bundle-Activator>org.semanticdesktop.aperture.outlook.bundle.OutlookActivator</Bundle-Activator> + </instructions> + </configuration> + </plugin> + </plugins> + </build> + + <profiles> + <profile> + <id>win-32</id> + <activation> + <os> + <family>windows</family> + <arch>x86</arch> + </os> + </activation> + <dependencies> + <dependency> + <groupId>net.sf.jacob-project</groupId> + <artifactId>jacob</artifactId> + <type>dll</type> + <classifier>x86</classifier> + </dependency> + </dependencies> + </profile> + <profile> + <id>win-64</id> + <activation> + <os> + <family>windows</family> + <arch>amd64</arch> + </os> + </activation> + <dependencies> + <dependency> + <groupId>net.sf.jacob-project</groupId> + <artifactId>jacob</artifactId> + <type>dll</type> + <classifier>x64</classifier> + </dependency> + </dependencies> + </profile> + <profile> + <!-- Make sure the build doesn't fail when not on Windows --> + <id>not-on-windows</id> + <activation> + <os> + <family>!windows</family> + </os> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <skip>true</skip> + </configuration> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> Deleted: aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/OUTLOOKDS.java =================================================================== --- aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/OUTLOOKDS.java 2009-02-26 14:36:12 UTC (rev 1755) +++ aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/OUTLOOKDS.java 2009-02-26 15:19:21 UTC (rev 1756) @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2006 - 2008 Aduna and Deutsches Forschungszentrum fuer Kuenstliche Intelligenz DFKI GmbH. - * All rights reserved. - * - * Licensed under the Aperture BSD-style license. - */ -package org.semanticdesktop.aperture.outlook; -import java.io.FileNotFoundException; -import java.io.InputStream; - -import org.ontoware.rdf2go.model.Model; -import org.ontoware.rdf2go.model.Syntax; -import org.ontoware.rdf2go.model.node.URI; -import org.ontoware.rdf2go.model.node.impl.URIImpl; -import org.semanticdesktop.aperture.util.ResourceUtil; -/** - * Vocabulary File. Created by org.semanticdesktop.aperture.util.VocabularyWriter on Tue Jul 15 22:55:45 CEST 2008 - * input file: D:\workspace\aperture/src/java/org/semanticdesktop/aperture/outlook/outlookDataSource.ttl - * namespace: http://aperture.semanticdesktop.org/ontology/2007/08/12/outlookds# - */ -public class OUTLOOKDS { - - /** Path to the ontology resource */ - public static final String OUTLOOKDS_RESOURCE_PATH = - "org/semanticdesktop/aperture/outlook/outlookDataSource.ttl"; - - /** - * Puts the OUTLOOKDS ontology into the given model. - * @param model The model for the source ontology to be put into. - * @throws Exception if something goes wrong. - */ - public static void getOUTLOOKDSOntology(Model model) { - try { - InputStream stream = ResourceUtil.getInputStream(OUTLOOKDS_RESOURCE_PATH, OUTLOOKDS.class); - if (stream == null) { - throw new FileNotFoundException("couldn't find resource " + OUTLOOKDS_RESOURCE_PATH); - } - model.readFrom(stream, Syntax.Turtle); - } catch(Exception e) { - throw new RuntimeException(e); - } - } - - /** The namespace for OUTLOOKDS */ - public static final URI NS_OUTLOOKDS = new URIImpl("http://aperture.semanticdesktop.org/ontology/2007/08/12/outlookds#"); - /** - * Type: Class <br/> - * Label: Outlook Data Source <br/> - * Comment: Configures a data source for extracting mails, contacts and calendar information from a running Outlook instance <br/> - */ - public static final URI OutlookDataSource = new URIImpl("http://aperture.semanticdesktop.org/ontology/2007/08/12/outlookds#OutlookDataSource"); - /** - * Type: Property <br/> - * Label: Root URL <br/> - * Comment: URL used as a prefix for URIs of all outlook resources. It should begin with outlook:// <br/> - * Domain: http://aperture.semanticdesktop.org/ontology/2007/08/12/outlookds#OutlookDataSource <br/> - * Range: http://www.w3.org/2001/XMLSchema#string <br/> - */ - public static final URI rootUrl = new URIImpl("http://aperture.semanticdesktop.org/ontology/2007/08/12/outlookds#rootUrl"); -} Deleted: aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/OutlookDataSource.java =================================================================== --- aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/OutlookDataSource.java 2009-02-26 14:36:12 UTC (rev 1755) +++ aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/OutlookDataSource.java 2009-02-26 15:19:21 UTC (rev 1756) @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2006 - 2008 Aduna and Deutsches Forschungszentrum fuer Kuenstliche Intelligenz DFKI GmbH. - * All rights reserved. - * - * Licensed under the Aperture BSD-style license. - */ -package org.semanticdesktop.aperture.outlook; -import org.ontoware.rdf2go.model.node.URI; -import org.semanticdesktop.aperture.datasource.DataSource; -import org.semanticdesktop.aperture.datasource.base.DataSourceBase; -import org.semanticdesktop.aperture.rdf.RDFContainer; - -/** - * Data source class file. Created by org.semanticdesktop.aperture.util.DataSourceClassGenerator on Tue Jul 15 22:55:49 CEST 2008 - * input file: D:\workspace\aperture/src/java/org/semanticdesktop/aperture/outlook/outlookDataSource.ttl - * class uri: http://aperture.semanticdesktop.org/ontology/2007/08/12/outlookds#OutlookDataSource - */ -public class OutlookDataSource extends DataSourceBase { - - /** - * @see DataSource#getType() - */ - public URI getType() { - return OUTLOOKDS.OutlookDataSource; - } - - /** - * Returns the URL used as a prefix for URIs of all outlook resources. It should begin with outlook:// - * - * @return the URL used as a prefix for URIs of all outlook resources. It should begin with outlook:// or null if no value has been set - * @throws NullPointerException if no configuration has been set, use - * {@link #setConfiguration(RDFContainer)} before calling this method - */ - public String getRootUrl() { - return getConfiguration().getString(OUTLOOKDS.rootUrl); - } - - /** - * Sets the URL used as a prefix for URIs of all outlook resources. It should begin with outlook:// - * - * @param rootUrl URL used as a prefix for URIs of all outlook resources. It should begin with outlook://, can be null in which case any previous setting will be removed - * @throws NullPointerException if no configuration has been set, use - * {@link #setConfiguration(RDFContainer)} before calling this method - */ - public void setRootUrl(String rootUrl) { - if ( rootUrl == null) { - getConfiguration().remove(OUTLOOKDS.rootUrl); - } else { - getConfiguration().put(OUTLOOKDS.rootUrl,rootUrl); - } - } -} Modified: aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/OutlookDataSourceDetector.java =================================================================== --- aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/OutlookDataSourceDetector.java 2009-02-26 14:36:12 UTC (rev 1755) +++ aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/OutlookDataSourceDetector.java 2009-02-26 15:19:21 UTC (rev 1756) @@ -16,8 +16,8 @@ import org.semanticdesktop.aperture.detector.DataSourceDescription; import org.semanticdesktop.aperture.detector.DataSourceDetector; import org.semanticdesktop.aperture.rdf.impl.RDFContainerImpl; +import org.semanticdesktop.aperture.rdf.util.ModelUtil; import org.semanticdesktop.aperture.util.OSUtils; -import org.semanticdesktop.aperture.util.UriUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -44,7 +44,7 @@ OutlookDataSource ds = new OutlookDataSource(); Model m=RDF2Go.getModelFactory().createModel(); m.open(); - URI id = UriUtil.generateRandomURI(m); + URI id = ModelUtil.generateRandomURI(m); ds.setConfiguration(new RDFContainerImpl(m, id)); ds.setName("Microsoft Outlook"); ds.setComment("Your emails, appointments, contacts and other elements from Outlook."); Modified: aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/OutlookResource.java =================================================================== --- aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/OutlookResource.java 2009-02-26 14:36:12 UTC (rev 1755) +++ aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/OutlookResource.java 2009-02-26 15:19:21 UTC (rev 1756) @@ -26,8 +26,8 @@ import org.semanticdesktop.aperture.datasource.DataSource; import org.semanticdesktop.aperture.rdf.RDFContainer; import org.semanticdesktop.aperture.rdf.ValueFactory; +import org.semanticdesktop.aperture.rdf.util.ModelUtil; import org.semanticdesktop.aperture.util.DateUtil; -import org.semanticdesktop.aperture.util.UriUtil; import org.semanticdesktop.aperture.vocabulary.NAO; import org.semanticdesktop.aperture.vocabulary.NCAL; import org.semanticdesktop.aperture.vocabulary.NCO; @@ -427,7 +427,7 @@ if (name != null) rdf.add(vf.createStatement(from, NCO.fullname, vf.createLiteral(name))); if (mailbox != null) { - Resource emailAddressResource = UriUtil.generateRandomResource(rdf.getModel()); + Resource emailAddressResource = ModelUtil.generateRandomResource(rdf.getModel()); addStatement(rdf, from, NCO.hasEmailAddress, emailAddressResource); addStatement(rdf, emailAddressResource, RDF.type, NCO.EmailAddress); addStatement(rdf, emailAddressResource, NCO.emailAddress, vf.createLiteral(mailbox)); @@ -850,7 +850,7 @@ protected void addNcalDateTimeIfNotNull(RDFContainer rdf, URI property, Dispatch resource, String dispName) { Date date = getDateOf(resource, dispName); if (date != null) { - Resource ncalDateTimeResource = UriUtil.generateRandomResource(rdf.getModel()); + Resource ncalDateTimeResource = ModelUtil.generateRandomResource(rdf.getModel()); rdf.add(property, ncalDateTimeResource); addStatement(rdf, ncalDateTimeResource, RDF.type, NCAL.NcalDateTime); addStatement(rdf, ncalDateTimeResource, NCAL.dateTime, DateUtil.dateTime2String(date), XSD._dateTime); @@ -861,7 +861,7 @@ String addressString = getLiteralOf(resource, dispName); if (addressString != null) { - Resource emailAddressNode = UriUtil.generateRandomResource(model); + Resource emailAddressNode = ModelUtil.generateRandomResource(model); model.addStatement(parentNode,NCO.hasEmailAddress,emailAddressNode); model.addStatement(emailAddressNode, RDF.type, NCO.EmailAddress); model.addStatement(emailAddressNode, NCO.emailAddress, addressString); @@ -872,7 +872,7 @@ String telephoneString = getLiteralOf(resource, dispName); if (telephoneString != null) { - Resource telephoneNumberNode = UriUtil.generateRandomResource(model); + Resource telephoneNumberNode = ModelUtil.generateRandomResource(model); model.addStatement(parentNode,NCO.hasPhoneNumber,telephoneNumberNode); model.addStatement(telephoneNumberNode, RDF.type, type); model.addStatement(telephoneNumberNode, NCO.phoneNumber, telephoneString); @@ -936,7 +936,7 @@ if (name != null) rdf.add(vf.createStatement(rec, NCO.fullname, vf.createLiteral(name))); if (mailbox != null) { - Resource emailAddressResource = UriUtil.generateRandomResource(rdf.getModel()); + Resource emailAddressResource = ModelUtil.generateRandomResource(rdf.getModel()); addStatement(rdf, rec, NCO.hasEmailAddress, emailAddressResource); addStatement(rdf, emailAddressResource, RDF.type, NCO.EmailAddress); addStatement(rdf, emailAddressResource, NCO.emailAddress, vf.createLiteral(mailbox)); Added: aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/bundle/OutlookActivator.java =================================================================== --- aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/bundle/OutlookActivator.java (rev 0) +++ aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/bundle/OutlookActivator.java 2009-02-26 15:19:21 UTC (rev 1756) @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2006 - 2008 Aduna and Deutsches Forschungszentrum fuer Kuenstliche Intelligenz DFKI GmbH. + * All rights reserved. + * + * Licensed under the Aperture BSD-style license. + */ +package org.semanticdesktop.aperture.outlook.bundle; + +import java.util.Hashtable; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceRegistration; +import org.semanticdesktop.aperture.crawler.CrawlerFactory; +import org.semanticdesktop.aperture.datasource.DataSourceFactory; +import org.semanticdesktop.aperture.detector.DataSourceDetector; +import org.semanticdesktop.aperture.opener.DataOpenerFactory; +import org.semanticdesktop.aperture.outlook.OutlookCrawlerFactory; +import org.semanticdesktop.aperture.outlook.OutlookDataSourceDetector; +import org.semanticdesktop.aperture.outlook.OutlookDataSourceFactory; +import org.semanticdesktop.aperture.outlook.OutlookOpenerFactory; + +public class OutlookActivator implements BundleActivator { + + private ServiceRegistration crawlerRegistration; + + private ServiceRegistration dataSourceRegistration; + + private ServiceRegistration detectorRegistration; + + private ServiceRegistration openerRegistration; + + public void start(BundleContext context) throws Exception { + crawlerRegistration = context.registerService(CrawlerFactory.class + .getName(), new OutlookCrawlerFactory(), new Hashtable()); + + dataSourceRegistration = context.registerService( + DataSourceFactory.class.getName(), + new OutlookDataSourceFactory(), new Hashtable()); + + detectorRegistration = context.registerService(DataSourceDetector.class + .getName(), new OutlookDataSourceDetector(), new Hashtable()); + + openerRegistration = context.registerService(DataOpenerFactory.class + .getName(), new OutlookOpenerFactory(), new Hashtable()); + } + + public void stop(BundleContext context) throws Exception { + if (crawlerRegistration != null) { + crawlerRegistration.unregister(); + crawlerRegistration = null; + } + + if (dataSourceRegistration != null) { + dataSourceRegistration.unregister(); + dataSourceRegistration = null; + } + + if (detectorRegistration != null) { + detectorRegistration.unregister(); + detectorRegistration = null; + } + + if (openerRegistration != null) { + openerRegistration.unregister(); + openerRegistration = null; + } + } +} Deleted: aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/outlookDataSource.ttl =================================================================== --- aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/outlookDataSource.ttl 2009-02-26 14:36:12 UTC (rev 1755) +++ aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/outlookDataSource.ttl 2009-02-26 15:19:21 UTC (rev 1756) @@ -1,30 +0,0 @@ -@prefix fresnel: <http://www.w3.org/2004/09/fresnel#> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . -@prefix sourceformat: <http://aperture.semanticdesktop.org/ontology/sourceformat#> . -@prefix source: <http://aperture.semanticdesktop.org/ontology/2007/08/12/source#> . -@prefix nie: <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#> . -@prefix : <http://aperture.semanticdesktop.org/ontology/2007/08/12/outlookds#> . - -:OutlookDataSource a rdfs:Class ; - rdfs:subClassOf nie:DataSource ; - rdfs:label " Outlook Data Source" ; - rdfs:comment "Configures a data source for extracting mails, contacts and calendar information from a running Outlook instance" . - -:OutlookDataSourceLens rdf:type fresnel:Lens ; - fresnel:purpose fresnel:defaultLens ; - fresnel:classLensDomain :OutlookDataSource ; - fresnel:showProperties ( :rootUrl ) . - -:rootUrl a rdf:Property ; - rdfs:label "Root URL" ; - rdfs:comment "URL used as a prefix for URIs of all outlook resources. It should begin with outlook://" ; - rdfs:domain :OutlookDataSource ; - rdfs:range xsd:string . - -:rootUrlFormat a fresnel:Format ; - sourceformat:valueWidget [ - a sourceformat:TextFieldWidget - ] ; - fresnel:propertyFormatDomain :rootUrl . \ No newline at end of file Copied: aperture/trunk/core/outlook/src/main/resources/org/semanticdesktop/aperture/outlook/outlookDataSource.ttl (from rev 1755, aperture/trunk/core/outlook/src/main/java/org/semanticdesktop/aperture/outlook/outlookDataSource.ttl) =================================================================== --- aperture/trunk/core/outlook/src/main/resources/org/semanticdesktop/aperture/outlook/outlookDataSource.ttl (rev 0) +++ aperture/trunk/core/outlook/src/main/resources/org/semanticdesktop/aperture/outlook/outlookDataSource.ttl 2009-02-26 15:19:21 UTC (rev 1756) @@ -0,0 +1,30 @@ +@prefix fresnel: <http://www.w3.org/2004/09/fresnel#> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . +@prefix sourceformat: <http://aperture.semanticdesktop.org/ontology/sourceformat#> . +@prefix source: <http://aperture.semanticdesktop.org/ontology/2007/08/12/source#> . +@prefix nie: <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#> . +@prefix : <http://aperture.semanticdesktop.org/ontology/2007/08/12/outlookds#> . + +:OutlookDataSource a rdfs:Class ; + rdfs:subClassOf nie:DataSource ; + rdfs:label " Outlook Data Source" ; + rdfs:comment "Configures a data source for extracting mails, contacts and calendar information from a running Outlook instance" . + +:OutlookDataSourceLens rdf:type fresnel:Lens ; + fresnel:purpose fresnel:defaultLens ; + fresnel:classLensDomain :OutlookDataSource ; + fresnel:showProperties ( :rootUrl ) . + +:rootUrl a rdf:Property ; + rdfs:label "Root URL" ; + rdfs:comment "URL used as a prefix for URIs of all outlook resources. It should begin with outlook://" ; + rdfs:domain :OutlookDataSource ; + rdfs:range xsd:string . + +:rootUrlFormat a fresnel:Format ; + sourceformat:valueWidget [ + a sourceformat:TextFieldWidget + ] ; + fresnel:propertyFormatDomain :rootUrl . \ No newline at end of file Modified: aperture/trunk/core/pom.xml =================================================================== --- aperture/trunk/core/pom.xml 2009-02-26 14:36:12 UTC (rev 1755) +++ aperture/trunk/core/pom.xml 2009-02-26 15:19:21 UTC (rev 1756) @@ -28,6 +28,7 @@ <module>linkextractor</module> <module>mime-identifier</module> <module>opener</module> + <module>outlook</module> <module>rdf</module> <module>security</module> <module>util</module> Modified: aperture/trunk/pom.xml =================================================================== --- aperture/trunk/pom.xml 2009-02-26 14:36:12 UTC (rev 1755) +++ aperture/trunk/pom.xml 2009-02-26 15:19:21 UTC (rev 1756) @@ -370,6 +370,29 @@ <version>0.9.0</version> </dependency> + <!-- Jacob --> + <dependency> + <groupId>net.sf.jacob-project</groupId> + <artifactId>jacob</artifactId> + <version>1.14.3</version> + </dependency> + <dependency> + <groupId>net.sf.jacob-project</groupId> + <artifactId>jacob</artifactId> + <version>1.14.3</version> + <type>dll</type> + <classifier>x86</classifier> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>net.sf.jacob-project</groupId> + <artifactId>jacob</artifactId> + <version>1.14.3</version> + <type>dll</type> + <classifier>x64</classifier> + <scope>runtime</scope> + </dependency> + <!-- Testing --> <dependency> <groupId>junit</groupId> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |