From: <her...@us...> - 2009-02-17 12:12:46
|
Revision: 1650 http://aperture.svn.sourceforge.net/aperture/?rev=1650&view=rev Author: herko_ter_horst Date: 2009-02-17 12:12:10 +0000 (Tue, 17 Feb 2009) Log Message: ----------- Fixed poms, reverted changes to UriUtil for now. Modified Paths: -------------- aperture/trunk/core/accessor/core/pom.xml aperture/trunk/core/crawler/core/pom.xml aperture/trunk/core/crawler/core/src/main/java/org/semanticdesktop/aperture/subcrawler/base/AbstractArchiverSubCrawler.java aperture/trunk/core/datasource/pom.xml aperture/trunk/core/extractor/core/pom.xml aperture/trunk/core/mime-identifier/core/pom.xml aperture/trunk/core/mime-identifier/magic/pom.xml aperture/trunk/core/util/pom.xml aperture/trunk/core/util/src/main/java/org/semanticdesktop/aperture/util/UriUtil.java Modified: aperture/trunk/core/accessor/core/pom.xml =================================================================== --- aperture/trunk/core/accessor/core/pom.xml 2009-02-17 12:01:49 UTC (rev 1649) +++ aperture/trunk/core/accessor/core/pom.xml 2009-02-17 12:12:10 UTC (rev 1650) @@ -48,6 +48,10 @@ <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-jdk14</artifactId> + </dependency> <dependency> <groupId>junit</groupId> Modified: aperture/trunk/core/crawler/core/pom.xml =================================================================== --- aperture/trunk/core/crawler/core/pom.xml 2009-02-17 12:01:49 UTC (rev 1649) +++ aperture/trunk/core/crawler/core/pom.xml 2009-02-17 12:12:10 UTC (rev 1650) @@ -56,6 +56,10 @@ <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-jdk14</artifactId> + </dependency> <dependency> <groupId>junit</groupId> Modified: aperture/trunk/core/crawler/core/src/main/java/org/semanticdesktop/aperture/subcrawler/base/AbstractArchiverSubCrawler.java =================================================================== --- aperture/trunk/core/crawler/core/src/main/java/org/semanticdesktop/aperture/subcrawler/base/AbstractArchiverSubCrawler.java 2009-02-17 12:01:49 UTC (rev 1649) +++ aperture/trunk/core/crawler/core/src/main/java/org/semanticdesktop/aperture/subcrawler/base/AbstractArchiverSubCrawler.java 2009-02-17 12:12:10 UTC (rev 1650) @@ -24,11 +24,11 @@ import org.semanticdesktop.aperture.accessor.base.FolderDataObjectBase; import org.semanticdesktop.aperture.datasource.DataSource; import org.semanticdesktop.aperture.rdf.RDFContainer; +import org.semanticdesktop.aperture.rdf.util.ModelUtil; import org.semanticdesktop.aperture.subcrawler.PathNotFoundException; import org.semanticdesktop.aperture.subcrawler.SubCrawler; import org.semanticdesktop.aperture.subcrawler.SubCrawlerException; import org.semanticdesktop.aperture.subcrawler.SubCrawlerHandler; -import org.semanticdesktop.aperture.util.UriUtil; import org.semanticdesktop.aperture.vocabulary.NFO; import org.semanticdesktop.aperture.vocabulary.NIE; @@ -237,7 +237,7 @@ } if (archiveEntry.getCrc() != -1) { Model model = container.getModel(); - Resource hashResource = UriUtil.generateRandomResource(model); + Resource hashResource = ModelUtil.generateRandomResource(model); model.addStatement(hashResource, RDF.type, NFO.FileHash); model.addStatement(hashResource, NFO.hashAlgorithm, "CRC-32"); model.addStatement(hashResource, NFO.hashValue, String.valueOf(archiveEntry.getCrc())); Modified: aperture/trunk/core/datasource/pom.xml =================================================================== --- aperture/trunk/core/datasource/pom.xml 2009-02-17 12:01:49 UTC (rev 1649) +++ aperture/trunk/core/datasource/pom.xml 2009-02-17 12:12:10 UTC (rev 1650) @@ -14,7 +14,7 @@ <artifactId>aperture-datasource</artifactId> <packaging>pom</packaging> - <name>Aperture Core: Datasource</name> + <name>Aperture Core: Datasources</name> <description>Definition of various data sources</description> <modules> Modified: aperture/trunk/core/extractor/core/pom.xml =================================================================== --- aperture/trunk/core/extractor/core/pom.xml 2009-02-17 12:01:49 UTC (rev 1649) +++ aperture/trunk/core/extractor/core/pom.xml 2009-02-17 12:12:10 UTC (rev 1650) @@ -44,6 +44,10 @@ <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-jdk14</artifactId> + </dependency> <dependency> <groupId>junit</groupId> Modified: aperture/trunk/core/mime-identifier/core/pom.xml =================================================================== --- aperture/trunk/core/mime-identifier/core/pom.xml 2009-02-17 12:01:49 UTC (rev 1649) +++ aperture/trunk/core/mime-identifier/core/pom.xml 2009-02-17 12:12:10 UTC (rev 1650) @@ -61,7 +61,7 @@ <instructions> <Export-Package>org.semanticdesktop.aperture.mime.identifier</Export-Package> <Private-Package>org.semanticdesktop.aperture.mime.identifier.impl,org.semanticdesktop.aperture.mime.identifier.bundle</Private-Package> - <Bundle-Activator>org.semanticdesktop.aperture.mime.identifier.bundle.MimeTypeIdentifierServiceActivator</Bundle-Activator> + <Bundle-Activator>org.semanticdesktop.aperture.mime.identifier.bundle.MimeIdentifierServiceActivator</Bundle-Activator> </instructions> </configuration> </plugin> Modified: aperture/trunk/core/mime-identifier/magic/pom.xml =================================================================== --- aperture/trunk/core/mime-identifier/magic/pom.xml 2009-02-17 12:01:49 UTC (rev 1649) +++ aperture/trunk/core/mime-identifier/magic/pom.xml 2009-02-17 12:12:10 UTC (rev 1650) @@ -65,7 +65,7 @@ <instructions> <Export-Package>org.semanticdesktop.aperture.mime.identifier.magic</Export-Package> <Private-Package>org.semanticdesktop.aperture.mime.identifier.magic.bundle</Private-Package> - <Bundle-Activator>org.semanticdesktop.aperture.mime.identifier.magic.bundle.MagicMimeTypeIdentifierActivator</Bundle-Activator> + <Bundle-Activator>org.semanticdesktop.aperture.mime.identifier.magic.bundle.MagicMimeIdentifierActivator</Bundle-Activator> </instructions> </configuration> </plugin> Modified: aperture/trunk/core/util/pom.xml =================================================================== --- aperture/trunk/core/util/pom.xml 2009-02-17 12:01:49 UTC (rev 1649) +++ aperture/trunk/core/util/pom.xml 2009-02-17 12:12:10 UTC (rev 1650) @@ -18,20 +18,9 @@ <dependencies> <dependency> - <groupId>org.semweb4j</groupId> - <artifactId>rdf2go.api</artifactId> - </dependency> - - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - </dependency> - - <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> </dependency> - </dependencies> <build> Modified: aperture/trunk/core/util/src/main/java/org/semanticdesktop/aperture/util/UriUtil.java =================================================================== --- aperture/trunk/core/util/src/main/java/org/semanticdesktop/aperture/util/UriUtil.java 2009-02-17 12:01:49 UTC (rev 1649) +++ aperture/trunk/core/util/src/main/java/org/semanticdesktop/aperture/util/UriUtil.java 2009-02-17 12:12:10 UTC (rev 1650) @@ -6,12 +6,7 @@ */ package org.semanticdesktop.aperture.util; -import java.util.UUID; -import org.ontoware.rdf2go.model.Model; -import org.ontoware.rdf2go.model.node.Resource; -import org.ontoware.rdf2go.model.node.URI; - /** * Methods related to actions on URIs. The definition of a URI is taken from <a * href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396: URI Generic Syntax</a>. @@ -109,47 +104,4 @@ buffer.append(uri.substring(startIdx)); } - - /** - * Returns the file name from the uri. More specifically the substring before the first hash, but after - * the last slash. - * - * @param uri - * @return the last path element - */ - public static String getFileName(URI uri) { - String string = uri.toString(); - if (string.contains("#")) { - string = string.substring(0, string.indexOf("#")); - } - if (string.contains("/")) { - string = string.substring(string.lastIndexOf("/") + 1); - } - return string; - } - - /** - * This method creates resources that are used by the framework wherever a blank node is needed. This - * method currently creates uris of the form urn:uuid: with a random UUID at the end. In the future some - * way to configure the behaviour of this method may be implemented. For instance blank nodes may be used. - * - * @param model a model for which the random resource should be generated - * @return a random resource. - */ - public static Resource generateRandomResource(Model model) { - return generateRandomURI(model); - } - - /** - * This method creates URIs that are used by the framework wherever a random URI is needed. This method - * currently creates uris of the form urn:uuid: with a random UUID at the end, hence they are globally - * unique. In the future some way to configure the behaviour of this method may be implemented, generating - * different algorithms or URI prefixes. - * - * @param model a model for which the random URI should be generated - * @return a random URI. - */ - public static URI generateRandomURI(Model model) { - return model.createURI("urn:uuid:" + UUID.randomUUID().toString()); - } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |