Author: sfermigier
Date: Thu Apr 7 11:50:33 2011
New Revision: 1089837
URL: http://svn.apache.org/viewvc?rev=1089837&view=rev
Log:
Cleanup.
Modified:
incubator/stanbol/trunk/commons/installer/bundleprovider/src/main/java/org/apache/stanbol/commons/installer/provider/bundle/BundleInstallerConstants.java
incubator/stanbol/trunk/commons/installer/bundleprovider/src/main/java/org/apache/stanbol/commons/installer/provider/bundle/impl/Activator.java
incubator/stanbol/trunk/commons/installer/bundleprovider/src/main/java/org/apache/stanbol/commons/installer/provider/bundle/impl/BundleInstaller.java
incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/DataFileProvider.java
incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/DataFileProviderEvent.java
incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/DataFileProviderLog.java
incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/impl/MainDataFileProvider.java
incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/impl/WebConsolePlugin.java
incubator/stanbol/trunk/commons/stanboltools/offline/src/main/java/org/apache/stanbol/commons/stanboltools/offline/Activator.java
incubator/stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/WebFragment.java
incubator/stanbol/trunk/commons/web/home/src/main/resources/org/apache/stanbol/commons/web/home/templates/org/apache/stanbol/commons/web/home/resource/StanbolRootResource/index.ftl
incubator/stanbol/trunk/commons/web/ontology/pom.xml
Modified:
incubator/stanbol/trunk/commons/installer/bundleprovider/src/main/java/org/apache/stanbol/commons/installer/provider/bundle/BundleInstallerConstants.java
URL:
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/installer/bundleprovider/src/main/java/org/apache/stanbol/commons/installer/provider/bundle/BundleInstallerConstants.java?rev=1089837&r1=1089836&r2=1089837&view=diff
==============================================================================
---
incubator/stanbol/trunk/commons/installer/bundleprovider/src/main/java/org/apache/stanbol/commons/installer/provider/bundle/BundleInstallerConstants.java
(original)
+++
incubator/stanbol/trunk/commons/installer/bundleprovider/src/main/java/org/apache/stanbol/commons/installer/provider/bundle/BundleInstallerConstants.java
Thu Apr 7 11:50:33 2011
@@ -19,17 +19,19 @@ package org.apache.stanbol.commons.insta
import org.apache.sling.installer.api.InstallableResource;
/**
- * Constants used by the BundleInstaller
- * @author Rupert Westenthaler
+ * Constants used by the BundleInstaller.
*
+ * @author Rupert Westenthaler
*/
-public interface BundleInstallerConstants {
+public class BundleInstallerConstants {
+
/**
* The name of the header field used for the
* <a href="http://www.aqute.biz/Snippets/Extender"> The OSGi extender
* pattern </a>.
*/
public static final String BUNDLE_INSTALLER_HEADER = "Install-Path";
+
/**
* The schema used for {@link InstallableResource}s created by the
* bundle provider.
Modified:
incubator/stanbol/trunk/commons/installer/bundleprovider/src/main/java/org/apache/stanbol/commons/installer/provider/bundle/impl/Activator.java
URL:
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/installer/bundleprovider/src/main/java/org/apache/stanbol/commons/installer/provider/bundle/impl/Activator.java?rev=1089837&r1=1089836&r2=1089837&view=diff
==============================================================================
---
incubator/stanbol/trunk/commons/installer/bundleprovider/src/main/java/org/apache/stanbol/commons/installer/provider/bundle/impl/Activator.java
(original)
+++
incubator/stanbol/trunk/commons/installer/bundleprovider/src/main/java/org/apache/stanbol/commons/installer/provider/bundle/impl/Activator.java
Thu Apr 7 11:50:33 2011
@@ -28,6 +28,7 @@ import org.slf4j.LoggerFactory;
/**
* Simple {@link BundleActivator} that also listens to the {@link
OsgiInstaller}
* service.
+ * <p>
* If the Bundle is active and the {@link OsgiInstaller} is available the
* {@link BundleInstaller} is created. If the bundle is stopped or the
* {@link OsgiInstaller} goes away the {@link BundleInstaller} is closed.
@@ -36,23 +37,23 @@ import org.slf4j.LoggerFactory;
*/
public class Activator implements BundleActivator, ServiceTrackerCustomizer {
+ private static final Logger log = LoggerFactory.getLogger(Activator.class);
private ServiceTracker installerTracker;
- private static final Logger log = LoggerFactory.getLogger(Activator.class);
private BundleContext bundleContext;
private BundleInstaller bundleInstaller;
-
@Override
public void start(BundleContext context) throws Exception {
bundleContext = context;
//Note that this class implements ServiceTrackerCustomizer to init/stop
// the BundleInstaller
- installerTracker = new
ServiceTracker(context,OsgiInstaller.class.getName(),this);
+ installerTracker = new ServiceTracker(context,
OsgiInstaller.class.getName(),this);
installerTracker.open();
}
+
@Override
public void stop(BundleContext context) throws Exception {
closeBundleInstaller();
@@ -70,9 +71,11 @@ public class Activator implements Bundle
return null;
}
}
+
/* not needed for the OsgiInstaller */
@Override
public void modifiedService(ServiceReference arg0, Object arg1) { /*
unused */ }
+
@Override
public void removedService(ServiceReference sr, Object s) {
//stop the BundleInstaller
Modified:
incubator/stanbol/trunk/commons/installer/bundleprovider/src/main/java/org/apache/stanbol/commons/installer/provider/bundle/impl/BundleInstaller.java
URL:
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/installer/bundleprovider/src/main/java/org/apache/stanbol/commons/installer/provider/bundle/impl/BundleInstaller.java?rev=1089837&r1=1089836&r2=1089837&view=diff
==============================================================================
---
incubator/stanbol/trunk/commons/installer/bundleprovider/src/main/java/org/apache/stanbol/commons/installer/provider/bundle/impl/BundleInstaller.java
(original)
+++
incubator/stanbol/trunk/commons/installer/bundleprovider/src/main/java/org/apache/stanbol/commons/installer/provider/bundle/impl/BundleInstaller.java
Thu Apr 7 11:50:33 2011
@@ -41,69 +41,73 @@ import org.slf4j.LoggerFactory;
/**
* Installs resources within bundles by using the Apache Sling Installer
- * framework.<p>
+ * framework.
+ * <p>
* NOTE that currently installed resources are not removed if the bundle is
* deactivated because it is not clear if this is a good thing to do. maybe one
* should use {@link Bundle#UNINSTALLED} for that. However this needs some
* additional testing.
* <p>
- * The OSGi extender pattern (as described at [1]) is used. The value of the
- * {@link BundleInstallerConstants#BUNDLE_INSTALLER_HEADER}
- * ({@value BundleInstallerConstants#BUNDLE_INSTALLER_HEADER}) is used as
relative path within
- * the bundle to search for installable resources. Also files in sub folders
+ * The OSGi extender pattern (as described at [1]) is used. The value of the
+ * {@link BundleInstallerConstants#BUNDLE_INSTALLER_HEADER}
+ * ({@value BundleInstallerConstants#BUNDLE_INSTALLER_HEADER}) is used as
relative path within
+ * the bundle to search for installable resources. Also files in sub folders
* are considered as installable resources.<p>
* The files are installed in the order as returned by
- * {@link Bundle#findEntries(String, String, boolean)}. Directories are
+ * {@link Bundle#findEntries(String, String, boolean)}. Directories are
* ignored.<p>
- * All resources installed by this provider do use
+ * All resources installed by this provider do use
* {@link BundleInstallerConstants#PROVIDER_SCHEME} ({@value
BundleInstallerConstants#PROVIDER_SCHEME}) as
- * scheme and the path additional to the value of
+ * scheme and the path additional to the value of
* {@link BundleInstallerConstants#BUNDLE_INSTALLER_HEADER}.<p>
* To give an example:<p>
* If the Bundle header notes<br>
* <pre><code>
* {@value BundleInstallerConstants#BUNDLE_INSTALLER_HEADER}=resources
* </pre></code><br>
- * and the bundle contains the resource <br>
+ * and the bundle contains the resources: <br>
* <pre><code>
* resources/bundles/10/myBundle.jar
* resources/config/myComponent.cfg
* resoruces/data/myIndex.solrondex.zip
* </pre></code><br>
- * than the following resources will be installed
+ * then the following resources will be installed:
* <pre><code>
* {@value
BundleInstallerConstants#PROVIDER_SCHEME}:bundles/10/myBundle.jar
* {@value BundleInstallerConstants#PROVIDER_SCHEME}:config/myComponent.cfg
* {@value
BundleInstallerConstants#PROVIDER_SCHEME}:data/myIndex.solrondex.zip
- * </pre></code><br>
- * That means that {@link ResourceTransformer}s can both use the original name
+ * </pre></code>
+ * <p>
+ * This means that {@link ResourceTransformer}s can both use the original name
* of the resource and the path relative to the install folder.
* <p>
* [1] <a href="http://www.aqute.biz/Snippets/Extender"> The OSGi extender
pattern </a>
* <p>
- * @author Rupert Westenthaler
*
+ * @author Rupert Westenthaler
*/
public class BundleInstaller implements BundleListener {
private static final Logger log =
LoggerFactory.getLogger(BundleInstaller.class);
- /** The scheme we use to register our resources. */
+ /**
+ * The scheme we use to register our resources.
+ */
private final OsgiInstaller installer;
private final BundleContext context;
-
+
/**
* contains all active bundles as key and the path to the config directory
* as value. A <code>null</code> value indicates that this bundle needs not
- * to be processed.
+ * to be processed.
*/
- private final Map<Bundle,String> activated = new HashMap<Bundle,String>();
+ private final Map<Bundle, String> activated = new HashMap<Bundle,
String>();
- public BundleInstaller(OsgiInstaller installer,BundleContext context){
- if(installer == null){
+ public BundleInstaller(OsgiInstaller installer, BundleContext context) {
+ if (installer == null) {
throw new IllegalArgumentException("The OsgiInstaller service MUST
NOT be NULL");
}
- if(context == null){
+ if (context == null) {
throw new IllegalArgumentException("The BundleContext MUST NOT be
NULL");
}
this.installer = installer;
@@ -112,60 +116,63 @@ public class BundleInstaller implements
//register the already active bundles
registerActive(this.context);
}
+
/**
* Uses the parsed bundle context to register the already active (and
currently
* starting) bundles.
*/
private void registerActive(BundleContext context) {
- for (Bundle bundle : context.getBundles()){
+ for (Bundle bundle : context.getBundles()) {
if ((bundle.getState() & (Bundle.STARTING | Bundle.ACTIVE)) != 0) {
register(bundle);
}
}
}
+
@Override
public void bundleChanged(BundleEvent event) {
switch (event.getType()) {
case BundleEvent.STARTED:
- register(event.getBundle());
- break;
-
+ register(event.getBundle());
+ break;
+
case BundleEvent.STOPPED:
- unregister(event.getBundle());
- break;
-
+ unregister(event.getBundle());
+ break;
+
case BundleEvent.UPDATED:
- unregister(event.getBundle());
- register(event.getBundle());
+ unregister(event.getBundle());
+ register(event.getBundle());
}
}
/**
* Registers the bundle to the {@link #activated} map.
+ *
* @param bundle the bundle to register
*/
@SuppressWarnings("unchecked")
- private void register(Bundle bundle){
+ private void register(Bundle bundle) {
synchronized (activated) {
- if(activated.containsKey(bundle)){
+ if (activated.containsKey(bundle)) {
return;
- }
+ }
}
- log.info("Register Bundle "+bundle.getSymbolicName()+" with
BundleInstaller");
- Dictionary<String,Object> headers =
(Dictionary<String,Object>)bundle.getHeaders();
-// log.info("With Headers:");
-// for(Enumeration<String> keys =
headers.keys();keys.hasMoreElements();){
-// String key = keys.nextElement();
-// log.info(" > "+key+"="+headers.get(key));
-// }
- String path = (String)headers.get(BUNDLE_INSTALLER_HEADER);
+ log.info("Register Bundle " + bundle.getSymbolicName() + " with
BundleInstaller");
+ Dictionary<String, Object> headers = (Dictionary<String, Object>)
bundle.getHeaders();
+ // log.info("With Headers:");
+ // for(Enumeration<String> keys =
headers.keys();keys.hasMoreElements();){
+ // String key = keys.nextElement();
+ // log.info(" > "+key+"="+headers.get(key));
+ // }
+ String path = (String) headers.get(BUNDLE_INSTALLER_HEADER);
activated.put(bundle, path);
- if(path != null){
- log.info(" ... process configuration within path "+path);
+ if (path != null) {
+ log.info(" ... process configuration within path " + path);
ArrayList<InstallableResource> updated = new
ArrayList<InstallableResource>();
- for(Enumeration<URL> resources =
(Enumeration<URL>)bundle.findEntries(path, null,
true);resources.hasMoreElements();){
- InstallableResource resource =
createInstallableResource(bundle, path,resources.nextElement());
- if(resource != null){
+ for (Enumeration<URL> resources = (Enumeration<URL>)
bundle.findEntries(path, null, true); resources.hasMoreElements();) {
+ InstallableResource resource =
createInstallableResource(bundle, path, resources.nextElement());
+ if (resource != null) {
updated.add(resource);
}
}
@@ -174,22 +181,25 @@ public class BundleInstaller implements
log.info(" ... no Configuration to process");
}
}
+
/**
* Creates an {@link InstallableResource} for {@link URL}s of files within
- * the parsed bundle.
+ * the parsed bundle.
+ *
* @param bundle the bundle containing the parsed resource
* @param bundleResource a resource within the bundle that need to be
installed
+ *
* @return the installable resource or <code>null</code> in case of an
error
*/
private InstallableResource createInstallableResource(Bundle bundle,
String path, URL bundleResource) {
//define the id
String id = bundleResource.toString();
- String relPath =
id.substring(id.lastIndexOf(path)+path.length(),id.length());
+ String relPath = id.substring(id.lastIndexOf(path) + path.length(),
id.length());
String name = FilenameUtils.getName(relPath);
- if(name == null || name.isEmpty()){
+ if (name == null || name.isEmpty()) {
return null; //ignore directories!
}
-
+
InstallableResource resource;
try {
/*
@@ -204,35 +214,37 @@ public class BundleInstaller implements
* now parse null than the default priority is used.
*/
resource = new InstallableResource(
- BundleInstallerConstants.PROVIDER_SCHEME+':'+relPath,
- bundleResource.openStream(), null,
- String.valueOf(bundle.getLastModified()), null, null);
- log.info(" ... found installable resource "+id);
+ BundleInstallerConstants.PROVIDER_SCHEME + ':' + relPath,
+ bundleResource.openStream(), null,
+ String.valueOf(bundle.getLastModified()), null, null);
+ log.info(" ... found installable resource " + id);
} catch (IOException e) {
log.error(String.format("Unable to process configuration File %s
from Bundle %s",
- id,bundle.getSymbolicName()),e);
+ id, bundle.getSymbolicName()), e);
return null;
}
return resource;
}
+
private void unregister(Bundle bundle) {
String path;
synchronized (activated) {
- if (!activated.containsKey(bundle)){
+ if (!activated.containsKey(bundle)) {
return;
}
path = activated.remove(bundle);
}
- if(path != null) {
+ if (path != null) {
//remove the files ...
//TODO: Maybe removing installed stuff when the bundle is stopped
is
// not so a good Idea! Maybe it is ?!
}
}
+
/**
* removes the bundle listener
*/
- public void close(){
+ public void close() {
context.removeBundleListener(this);
}
}
Modified:
incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/DataFileProvider.java
URL:
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/DataFileProvider.java?rev=1089837&r1=1089836&r2=1089837&view=diff
==============================================================================
---
incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/DataFileProvider.java
(original)
+++
incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/DataFileProvider.java
Thu Apr 7 11:50:33 2011
@@ -24,25 +24,28 @@ import java.util.Map;
* Used to provide read-only data files (indexes, models etc.) from various
* locations (bundle resources, filesystem folders etc.) allowing users to
* overrides default data files with their own.
- *
+ *
* See STANBOL-146 for requirements.
*/
public interface DataFileProvider {
- /** Get the InputStream of the specified
- * data file, according to this provider's
- * priority rules.
- *
- * @param bundleSymbolicName can be used to differentiate
- * between files which have the same name
- * @param filename name of the file to open
- * @param comments Optional - how to get a more complete version
- * of the data file, licensing information, etc.
- * @return InputStream to read the file, must be closed by
- * caller when done
+
+ /**
+ * Get the InputStream of the specified data file, according to this
provider's
+ * priority rules.
+ *
+ * @param bundleSymbolicName can be used to differentiate
+ * between files which have the same name
+ * @param filename name of the file to open
+ * @param comments Optional - how to get a more complete version
+ * of the data file, licensing information, etc.
+ *
+ * @return InputStream to read the file, must be closed by
+ * caller when done
+ *
* @throws IOException problem finding or reading the file
*/
InputStream getInputStream(
- String bundleSymbolicName,
+ String bundleSymbolicName,
String filename,
Map<String, String> comments) throws IOException;
}
Modified:
incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/DataFileProviderEvent.java
URL:
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/DataFileProviderEvent.java?rev=1089837&r1=1089836&r2=1089837&view=diff
==============================================================================
---
incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/DataFileProviderEvent.java
(original)
+++
incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/DataFileProviderEvent.java
Thu Apr 7 11:50:33 2011
@@ -21,17 +21,20 @@ import java.util.HashMap;
import java.util.Map;
-/** Used to record a log of {@link DataFileProvider} operations */
+/**
+ * Used to record a log of {@link DataFileProvider} operations.
+ */
public class DataFileProviderEvent {
+
+ private static final Map<String, String> EMPTY_COMMENTS = new
HashMap<String, String>();
+
private final Date timestamp;
private final String bundleSymbolicName;
private final String filename;
private final Map<String, String> comments;
private final String actualFileLocation;
- private static final Map<String, String> EMPTY_COMMENTS = new
HashMap<String, String>();
-
- public DataFileProviderEvent(String bundleSymbolicName, String filename,
Map<String, String> comments,
+ public DataFileProviderEvent(String bundleSymbolicName, String filename,
Map<String, String> comments,
String actualFileLocation) {
this.timestamp = new Date();
this.bundleSymbolicName = bundleSymbolicName;
@@ -42,7 +45,6 @@ public class DataFileProviderEvent {
@Override
public String toString() {
-
final StringBuilder sb = new StringBuilder();
sb.append(getClass().getName());
Modified:
incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/DataFileProviderLog.java
URL:
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/DataFileProviderLog.java?rev=1089837&r1=1089836&r2=1089837&view=diff
==============================================================================
---
incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/DataFileProviderLog.java
(original)
+++
incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/DataFileProviderLog.java
Thu Apr 7 11:50:33 2011
@@ -16,16 +16,21 @@
*/
package org.apache.stanbol.commons.stanboltools.datafileprovider;
-/** Holds the {@link DataFileProviderEvent}s generated
- * by the main {@link DataFileProvider}
+/**
+ * Holds the {@link DataFileProviderEvent}s generated
+ * by the main {@link DataFileProvider}.
*/
public interface DataFileProviderLog extends Iterable<DataFileProviderEvent> {
- /** @return the maximum number of events that this service holds.
- * If the current size() is greater or equal than this, events
- * might have been discarded.
+
+ /**
+ * @return the maximum number of events that this service holds.
+ * If the current size() is greater or equal than this, events
+ * might have been discarded.
*/
int maxEventsCount();
-
- /** @return the actual number of events stored */
+
+ /**
+ * @return the actual number of events stored
+ */
int size();
}
Modified:
incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/impl/MainDataFileProvider.java
URL:
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/impl/MainDataFileProvider.java?rev=1089837&r1=1089836&r2=1089837&view=diff
==============================================================================
---
incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/impl/MainDataFileProvider.java
(original)
+++
incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/impl/MainDataFileProvider.java
Thu Apr 7 11:50:33 2011
@@ -58,20 +58,22 @@ import org.slf4j.LoggerFactory;
@Property(name=Constants.SERVICE_RANKING, intValue=Integer.MAX_VALUE)
public class MainDataFileProvider implements DataFileProvider,
DataFileProviderLog {
- private final Logger log = LoggerFactory.getLogger(getClass());
-
@Property(value="datafiles")
public static final String DATA_FILES_FOLDER_PROP = "data.files.folder";
- private File dataFilesFolder;
-
+
@Property(intValue=100)
public static final String MAX_EVENTS_PROP = "max.events";
+
+ private static final Logger log =
LoggerFactory.getLogger(MainDataFileProvider.class);
+
+ private File dataFilesFolder;
+
private int maxEvents;
/** List of past events, up to maxEvents in size */
private final List<DataFileProviderEvent> events = new
LinkedList<DataFileProviderEvent>();
- /** Track providers to which we can delegate */
+ /** Tracks providers to which we can delegate */
private ServiceTracker providersTracker;
@Activate
Modified:
incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/impl/WebConsolePlugin.java
URL:
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/impl/WebConsolePlugin.java?rev=1089837&r1=1089836&r2=1089837&view=diff
==============================================================================
---
incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/impl/WebConsolePlugin.java
(original)
+++
incubator/stanbol/trunk/commons/stanboltools/datafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/impl/WebConsolePlugin.java
Thu Apr 7 11:50:33 2011
@@ -91,13 +91,11 @@ public class WebConsolePlugin extends Ht
for(DataFileProviderEvent e : dataFileProviderLog) {
pw.println("<tr>");
cell(pw, null, fmt.format(e.getTimestamp()));
- cell(pw,
- null, e.getBundleSymbolicName(),
- "b", e.getFilename());
-
+ cell(pw, null, e.getBundleSymbolicName(), "b", e.getFilename());
+
final StringBuilder sb = new StringBuilder();
for(Map.Entry<String, String> comment :
e.getComments().entrySet()) {
- if(sb.length() > 0) {
+ if (sb.length() > 0) {
sb.append("<br/>");
}
sb.append(comment.getKey());
Modified:
incubator/stanbol/trunk/commons/stanboltools/offline/src/main/java/org/apache/stanbol/commons/stanboltools/offline/Activator.java
URL:
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/stanboltools/offline/src/main/java/org/apache/stanbol/commons/stanboltools/offline/Activator.java?rev=1089837&r1=1089836&r2=1089837&view=diff
==============================================================================
---
incubator/stanbol/trunk/commons/stanboltools/offline/src/main/java/org/apache/stanbol/commons/stanboltools/offline/Activator.java
(original)
+++
incubator/stanbol/trunk/commons/stanboltools/offline/src/main/java/org/apache/stanbol/commons/stanboltools/offline/Activator.java
Thu Apr 7 11:50:33 2011
@@ -27,8 +27,9 @@ import org.slf4j.LoggerFactory;
*/
public class Activator implements BundleActivator {
- private final Logger log = LoggerFactory.getLogger(getClass());
public static final String OFFLINE_MODE_PROPERTY =
"org.apache.stanbol.offline.mode";
+ private static final Logger log = LoggerFactory.getLogger(Activator.class);
+
private ServiceRegistration serviceReg;
@Override
Modified:
incubator/stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/WebFragment.java
URL:
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/WebFragment.java?rev=1089837&r1=1089836&r2=1089837&view=diff
==============================================================================
---
incubator/stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/WebFragment.java
(original)
+++
incubator/stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/WebFragment.java
Thu Apr 7 11:50:33 2011
@@ -23,15 +23,15 @@ public interface WebFragment {
/**
* Java package name that is the classloading root of the static resources
of the fragment to be published
- * by the OSGi HttpService under /static-url-root/fragment-name/
- *
+ * by the OSGi HttpService under {@code /static-url-root/fragment-name/}
+ * <p>
* Note: this package should be exported by the bundle.
*/
String getStaticResourceClassPath();
/**
* Set of JAX-RS resources provided as classes.
- *
+ * <p>
* Note: those classes should be visible: use the Export-Package bundle
declaration to export their
* packages.
*/
@@ -39,7 +39,7 @@ public interface WebFragment {
/**
* Set of JAX-RS resources provided as singleton instances.
- *
+ * <p>
* Note: those objects should be visible: use the Export-Package bundle
declaration to export their
* packages.
*/
Modified:
incubator/stanbol/trunk/commons/web/home/src/main/resources/org/apache/stanbol/commons/web/home/templates/org/apache/stanbol/commons/web/home/resource/StanbolRootResource/index.ftl
URL:
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/web/home/src/main/resources/org/apache/stanbol/commons/web/home/templates/org/apache/stanbol/commons/web/home/resource/StanbolRootResource/index.ftl?rev=1089837&r1=1089836&r2=1089837&view=diff
==============================================================================
---
incubator/stanbol/trunk/commons/web/home/src/main/resources/org/apache/stanbol/commons/web/home/templates/org/apache/stanbol/commons/web/home/resource/StanbolRootResource/index.ftl
(original)
+++
incubator/stanbol/trunk/commons/web/home/src/main/resources/org/apache/stanbol/commons/web/home/templates/org/apache/stanbol/commons/web/home/resource/StanbolRootResource/index.ftl
Thu Apr 7 11:50:33 2011
@@ -31,7 +31,8 @@ view that documents the matching RESTful
For instance to re-deploy a new version of this web interface, go to
the <tt>$STANBOL_HOME/enhancer/jersey</tt>
source folder and run the following command:</p>
<pre>
-mvn install -o -DskipTests -PinstallBundle
-Dsling.url=${it.publicBaseUri}system/console
+mvn install -o -DskipTests -PinstallBundle \
+ -Dsling.url=${it.publicBaseUri}system/console
</pre>
</dd>
Modified: incubator/stanbol/trunk/commons/web/ontology/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/web/ontology/pom.xml?rev=1089837&r1=1089836&r2=1089837&view=diff
==============================================================================
--- incubator/stanbol/trunk/commons/web/ontology/pom.xml (original)
+++ incubator/stanbol/trunk/commons/web/ontology/pom.xml Thu Apr 7 11:50:33
2011
@@ -1,127 +1,127 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.stanbol</groupId>
- <artifactId>stanbol-parent</artifactId>
- <version>0.9-SNAPSHOT</version>
- <relativePath>../../parent</relativePath>
- </parent>
-
- <groupId>org.apache.stanbol</groupId>
- <artifactId>org.apache.stanbol.commons.web.ontology</artifactId>
- <packaging>bundle</packaging>
-
- <name>Apache Stanbol Commons Web Ontology</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
-
<Service-Component>OSGI-INF/serviceComponents.xml</Service-Component>
- <Import-Package>
- <!-- apache derby -->
- org.apache.derby.jdbc,
- *
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-scr-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-
- <dependencies>
- <!-- Version will be removed once dependencies are added to
stanbol-parent -->
- <dependency>
- <groupId>org.apache.stanbol</groupId>
-
<artifactId>org.apache.stanbol.ontologymanager.store.api</artifactId>
- <version>0.9-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.stanbol</groupId>
-
<artifactId>org.apache.stanbol.commons.web.base</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.scr</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
-
<artifactId>org.apache.felix.scr.annotations</artifactId>
- </dependency>
-
- <dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-server</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-core</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-json</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.freemarker</groupId>
- <artifactId>freemarker</artifactId>
- </dependency>
- <dependency>
- <groupId>com.hp.hpl.jena</groupId>
- <artifactId>jena</artifactId>
- </dependency>
-
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty</artifactId>
- <scope>test</scope>
- </dependency>
- <!-- Version will be removed once dependencies are added to
stanbol-parent -->
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <version>10.7.1.1</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
+ <parent>
+ <groupId>org.apache.stanbol</groupId>
+ <artifactId>stanbol-parent</artifactId>
+ <version>0.9-SNAPSHOT</version>
+ <relativePath>../../parent</relativePath>
+ </parent>
+
+ <groupId>org.apache.stanbol</groupId>
+ <artifactId>org.apache.stanbol.commons.web.ontology</artifactId>
+ <packaging>bundle</packaging>
+
+ <name>Apache Stanbol Commons Web Ontology</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+
<Service-Component>OSGI-INF/serviceComponents.xml</Service-Component>
+ <Import-Package>
+ <!-- apache derby -->
+ org.apache.derby.jdbc,
+ *
+ </Import-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-scr-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <!-- Version will be removed once dependencies are added to stanbol-parent
-->
+ <dependency>
+ <groupId>org.apache.stanbol</groupId>
+ <artifactId>org.apache.stanbol.ontologymanager.store.api</artifactId>
+ <version>0.9-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.stanbol</groupId>
+ <artifactId>org.apache.stanbol.commons.web.base</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.scr</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.scr.annotations</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>jsr311-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.compendium</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-server</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-json</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.freemarker</groupId>
+ <artifactId>freemarker</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.hp.hpl.jena</groupId>
+ <artifactId>jena</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <!-- Version will be removed once dependencies are added to stanbol-parent
-->
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derby</artifactId>
+ <version>10.7.1.1</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
</project>