CLEREZZA-1058: Fix doc blocks and code formatting
diff --git a/dataset/src/main/java/org/apache/clerezza/dataset/EntityAlreadyExistsException.java b/dataset/src/main/java/org/apache/clerezza/dataset/EntityAlreadyExistsException.java
index 3e08bb9..39ce3e9 100644
--- a/dataset/src/main/java/org/apache/clerezza/dataset/EntityAlreadyExistsException.java
+++ b/dataset/src/main/java/org/apache/clerezza/dataset/EntityAlreadyExistsException.java
@@ -1,20 +1,19 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
*/
package org.apache.clerezza.dataset;
diff --git a/dataset/src/main/java/org/apache/clerezza/dataset/EntityUndeletableException.java b/dataset/src/main/java/org/apache/clerezza/dataset/EntityUndeletableException.java
index 7d9fe0c..d8f6021 100644
--- a/dataset/src/main/java/org/apache/clerezza/dataset/EntityUndeletableException.java
+++ b/dataset/src/main/java/org/apache/clerezza/dataset/EntityUndeletableException.java
@@ -1,20 +1,19 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
*/
package org.apache.clerezza.dataset;
diff --git a/dataset/src/main/java/org/apache/clerezza/dataset/ImmutableGraphServiceFactory.java b/dataset/src/main/java/org/apache/clerezza/dataset/ImmutableGraphServiceFactory.java
index be1e325..fc54e7e 100644
--- a/dataset/src/main/java/org/apache/clerezza/dataset/ImmutableGraphServiceFactory.java
+++ b/dataset/src/main/java/org/apache/clerezza/dataset/ImmutableGraphServiceFactory.java
@@ -1,20 +1,19 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
*/
package org.apache.clerezza.dataset;
diff --git a/dataset/src/main/java/org/apache/clerezza/dataset/MGraphServiceFactory.java b/dataset/src/main/java/org/apache/clerezza/dataset/MGraphServiceFactory.java
index e287f4a..70620ee 100644
--- a/dataset/src/main/java/org/apache/clerezza/dataset/MGraphServiceFactory.java
+++ b/dataset/src/main/java/org/apache/clerezza/dataset/MGraphServiceFactory.java
@@ -1,20 +1,19 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
*/
package org.apache.clerezza.dataset;
diff --git a/dataset/src/main/java/org/apache/clerezza/dataset/NoSuchEntityException.java b/dataset/src/main/java/org/apache/clerezza/dataset/NoSuchEntityException.java
index c8e61c1..b52c39d 100644
--- a/dataset/src/main/java/org/apache/clerezza/dataset/NoSuchEntityException.java
+++ b/dataset/src/main/java/org/apache/clerezza/dataset/NoSuchEntityException.java
@@ -1,20 +1,19 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
*/
package org.apache.clerezza.dataset;
diff --git a/dataset/src/main/java/org/apache/clerezza/dataset/QueryableTcProvider.java b/dataset/src/main/java/org/apache/clerezza/dataset/QueryableTcProvider.java
index 6abc615..5d38340 100644
--- a/dataset/src/main/java/org/apache/clerezza/dataset/QueryableTcProvider.java
+++ b/dataset/src/main/java/org/apache/clerezza/dataset/QueryableTcProvider.java
@@ -1,20 +1,19 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
*/
package org.apache.clerezza.dataset;
@@ -31,7 +30,7 @@
*
* @param query
* the sparql query to execute
- * @param defaultGraph
+ * @param defaultGraphUri
* the default ImmutableGraph against which to execute the query if not
* FROM clause is present
* @return the resulting ResultSet, ImmutableGraph or Boolean value
diff --git a/dataset/src/main/java/org/apache/clerezza/dataset/SecuredGraph.java b/dataset/src/main/java/org/apache/clerezza/dataset/SecuredGraph.java
index c265673..f59c05e 100644
--- a/dataset/src/main/java/org/apache/clerezza/dataset/SecuredGraph.java
+++ b/dataset/src/main/java/org/apache/clerezza/dataset/SecuredGraph.java
@@ -1,20 +1,19 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
*/
package org.apache.clerezza.dataset;
diff --git a/dataset/src/main/java/org/apache/clerezza/dataset/TcManager.java b/dataset/src/main/java/org/apache/clerezza/dataset/TcManager.java
index 514daa7..ddbeeee 100644
--- a/dataset/src/main/java/org/apache/clerezza/dataset/TcManager.java
+++ b/dataset/src/main/java/org/apache/clerezza/dataset/TcManager.java
@@ -1,20 +1,19 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
*/
package org.apache.clerezza.dataset;
@@ -38,15 +37,11 @@
import java.util.*;
/**
- * This class implements
- * <code>TcManager</code>, delegating the actual provision and creation of
- * Graphs or MGraphs to registered
- * <code>TcProvider</code>s. The class attempts to satisfy the request using the
- * register
- * <code>WeightedTcProvider</code> in decreasing order of weight. If multiple
- * providers have the same weight the lexicographical order of the fully
- * qualified class name determines which one is used, namely the one that occurs
- * earlier. If a call to a registered provider causes an
+ * This class extends <code>TcProviderMultiplexer</code>, delegating the actual provision and creation of
+ * Graphs or MGraphs to registered <code>WeightedTcProvider</code>s. The class attempts to satisfy the
+ * request using the registered <code>WeightedTcProvider</code> in decreasing order of weight. If multiple
+ * providers have the same weight the lexicographical order of the fully qualified class name determines
+ * which one is used, namely the one that occurs earlier. If a call to a registered provider causes an
* <code>IllegalArgumentException</code>,
* <code>NoSuchEntityException</code> or
* <code>UnsupportedOperationException</code> then the call is delegated to the
@@ -133,21 +128,16 @@
if (instance == null) {
instance = new TcManager();
instance.isActivated = true;
- Iterator<WeightedTcProvider> weightedProviders = ServiceLoader
- .load(WeightedTcProvider.class).iterator();
+ Iterator<WeightedTcProvider> weightedProviders = ServiceLoader.load(WeightedTcProvider.class).iterator();
while (weightedProviders.hasNext()) {
- WeightedTcProvider weightedProvider = weightedProviders
- .next();
- instance
- .bindWeightedTcProvider(weightedProvider);
+ WeightedTcProvider weightedProvider = weightedProviders.next();
+ instance.bindWeightedTcProvider(weightedProvider);
}
- Iterator<QueryEngine> queryEngines = ServiceLoader.load(
- QueryEngine.class).iterator();
+ Iterator<QueryEngine> queryEngines = ServiceLoader.load(QueryEngine.class).iterator();
System.out.println("looking for QE");
if (queryEngines.hasNext()) {
instance.queryEngine = queryEngines.next();
- System.out.println("QE: "
- + instance.queryEngine.getClass());
+ System.out.println("QE: " + instance.queryEngine.getClass());
}
}
}
@@ -208,8 +198,7 @@
tcAccessController.checkReadWritePermission(name);
} catch (AccessControlException e) {
tcAccessController.checkReadPermission(name);
- return new WriteBlockedGraph(
- super.getGraph(name));
+ return new WriteBlockedGraph(super.getGraph(name));
}
return super.getGraph(name);
}
@@ -360,7 +349,7 @@
* in this TcManages executeSparqlQuery(String, UriRef) should be used instead.
*
* @param query the sparql query to execute
- * @param defaultGraph the ImmutableGraph to be used as default ImmutableGraph in the Sparql ImmutableGraph Store
+ * @param defaultGraphName the ImmutableGraph to be used as default ImmutableGraph in the Sparql ImmutableGraph Store
* @param forceFastlane indicate whether to force fastlane usage.
* @return the resulting ResultSet, ImmutableGraph or Boolean value
*/
diff --git a/dataset/src/main/java/org/apache/clerezza/dataset/TcProvider.java b/dataset/src/main/java/org/apache/clerezza/dataset/TcProvider.java
index 8e33ebb..4aaed8f 100644
--- a/dataset/src/main/java/org/apache/clerezza/dataset/TcProvider.java
+++ b/dataset/src/main/java/org/apache/clerezza/dataset/TcProvider.java
@@ -1,20 +1,19 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
*/
package org.apache.clerezza.dataset;
@@ -46,8 +45,8 @@
* Get an <code>Graph</code> taht is not <code>ImmutableGrah</code>. The instances
* returned in different invocations are <code>equals</code>.
*
- * @param the name of the <code>Graph</code>
- * @return name the <code>Graph</code> with the specified name
+ * @param name the name of the <code>Graph</code>
+ * @return <code>Graph</code> with the specified name
* @throws NoSuchEntityException if there is no <code>Graph</code>
* with the specified name
*/
@@ -143,7 +142,7 @@
/**
* get a set of the names of a <code>ImmutableGraph</code>
*
- * @param ImmutableGraph
+ * @param immutableGraph
* @return the set names of <code>ImmutableGraph</code>, the set is empty if
* <code>ImmutableGraph</code> is unknown
*/
diff --git a/dataset/src/main/java/org/apache/clerezza/dataset/TcProviderMultiplexer.java b/dataset/src/main/java/org/apache/clerezza/dataset/TcProviderMultiplexer.java
index 8a1d444..4f324b4 100644
--- a/dataset/src/main/java/org/apache/clerezza/dataset/TcProviderMultiplexer.java
+++ b/dataset/src/main/java/org/apache/clerezza/dataset/TcProviderMultiplexer.java
@@ -1,20 +1,19 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
*/
package org.apache.clerezza.dataset;
diff --git a/dataset/src/main/java/org/apache/clerezza/dataset/WeightedProviderComparator.java b/dataset/src/main/java/org/apache/clerezza/dataset/WeightedProviderComparator.java
index 66752f3..3a3b3e7 100644
--- a/dataset/src/main/java/org/apache/clerezza/dataset/WeightedProviderComparator.java
+++ b/dataset/src/main/java/org/apache/clerezza/dataset/WeightedProviderComparator.java
@@ -1,25 +1,21 @@
-package org.apache.clerezza.dataset;
/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
+ */
+package org.apache.clerezza.dataset;
import java.util.Comparator;
diff --git a/dataset/src/main/java/org/apache/clerezza/dataset/WeightedTcProvider.java b/dataset/src/main/java/org/apache/clerezza/dataset/WeightedTcProvider.java
index e50514d..20da5a4 100644
--- a/dataset/src/main/java/org/apache/clerezza/dataset/WeightedTcProvider.java
+++ b/dataset/src/main/java/org/apache/clerezza/dataset/WeightedTcProvider.java
@@ -1,25 +1,24 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
*/
package org.apache.clerezza.dataset;
/**
- * This interface is implemented by providers to which {@link TcManagerImpl}
+ * This interface is implemented by providers to which {@link TcManager}
* delegates.
*
* @author reto
diff --git a/dataset/src/main/java/org/apache/clerezza/dataset/package.html b/dataset/src/main/java/org/apache/clerezza/dataset/package.html
index 8d136ed..5133e90 100644
--- a/dataset/src/main/java/org/apache/clerezza/dataset/package.html
+++ b/dataset/src/main/java/org/apache/clerezza/dataset/package.html
@@ -1,56 +1,52 @@
-
- <!--
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
--->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
- <head>
- <title>org.apache.clerezza.dataset</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- </head>
- <body>
- <p>This package provides access to named {@link
- org.apache.clerezza.api.ImmutableGraph}S and {@link
- org.apache.clerezza.api.Graph}S that may originate from various
- implementations.</p>
- <h3>Accessing</h3>
- <p>
- If running in a dependency injection system you should get an instance
- of
- <code>TcManager</code>
- by the framework, otherwise use the static method
- <code>TcManager.getInstance</code>
- .
- </p>
- <h3>Adding a provider</h3>
- <p>A provider implements {@link WeightedTcProvider}.</p>
- <p>
- To work outside a component injection framework it contains a file
- <code>META-INF/services/org.apache.clerezza.dataset.WeightedTcProvider</code>
- containing the name of the implementing class.
- </p>
- <p>
- To work in a OSGi-DS context the provider register a component
- exposing
- <code>org.apache.clerezza.dataset.WeightedTcProvider</code>
- as service interface.
- </p>
- </body>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed
+ with this work for additional information regarding copyright
+ ownership. The ASF licenses this file to you under the Apache
+ License, Version 2.0 (the "License"); you may not use this file
+ except in compliance with the License. You may obtain a copy of
+ the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ either express or implied. See the License for the specific
+ language governing permissions and limitations under the License.
+-->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <title>org.apache.clerezza.dataset</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ </head>
+ <body>
+ <p>This package provides access to named {@link
+ org.apache.clerezza.ImmutableGraph}S and {@link
+ org.apache.clerezza.Graph}S that may originate from various
+ implementations.</p>
+ <h3>Accessing</h3>
+ <p>
+ If running in a dependency injection system you should get an instance
+ of
+ <code>TcManager</code>
+ by the framework, otherwise use the static method
+ <code>TcManager.getInstance</code>
+ .
+ </p>
+ <h3>Adding a provider</h3>
+ <p>A provider implements {@link org.apache.clerezza.dataset.WeightedTcProvider}.</p>
+ <p>
+ To work outside a component injection framework it contains a file
+ <code>META-INF/services/org.apache.clerezza.dataset.WeightedTcProvider</code>
+ containing the name of the implementing class.
+ </p>
+ <p>
+ To work in a OSGi-DS context the provider register a component
+ exposing
+ <code>org.apache.clerezza.dataset.WeightedTcProvider</code>
+ as service interface.
+ </p>
+ </body>
</html>
\ No newline at end of file
diff --git a/dataset/src/main/java/org/apache/clerezza/dataset/security/PermissionParser.java b/dataset/src/main/java/org/apache/clerezza/dataset/security/PermissionParser.java
index 465ee03..7433c14 100644
--- a/dataset/src/main/java/org/apache/clerezza/dataset/security/PermissionParser.java
+++ b/dataset/src/main/java/org/apache/clerezza/dataset/security/PermissionParser.java
@@ -42,7 +42,7 @@
* the ClassLoader of this class.
*
* @param permissionDescription
- * @return
+ * @return Permission
*/
public static Permission getPermission(String permissionDescription) {
return getPermission(permissionDescription, PermissionParser.class.getClassLoader());
@@ -54,7 +54,7 @@
*
* @param permissionDescription
* @param classLoader
- * @return
+ * @return Permission
*/
public static Permission getPermission(String permissionDescription, ClassLoader classLoader) {
PermissionInfo permissionInfo = parse(permissionDescription);
diff --git a/dataset/src/main/java/org/apache/clerezza/dataset/security/TcAccessController.java b/dataset/src/main/java/org/apache/clerezza/dataset/security/TcAccessController.java
index 19b85d0..be56e76 100644
--- a/dataset/src/main/java/org/apache/clerezza/dataset/security/TcAccessController.java
+++ b/dataset/src/main/java/org/apache/clerezza/dataset/security/TcAccessController.java
@@ -64,10 +64,6 @@
private final Map<IRI, Collection<Permission>> readWritePermissionCache =
Collections.synchronizedMap(new HashMap<IRI, Collection<Permission>>());
- /**
- *
- * @param tcManager the tcManager used to locate urn:x-localinstance:/graph-access.graph
- */
public TcAccessController() {
this.tcManager = getTcManager();
}
@@ -149,16 +145,16 @@
* Set the set of permissions required for read access to a triple-collection, if
* the set is non-empty the default TCPermisson is no longer required.
*
- * @param GraphUri
- * @param permissionDescriptions
+ * @param graphUri
+ * @param permissions
*/
- public void setRequiredReadPermissions(IRI GraphUri,
+ public void setRequiredReadPermissions(IRI graphUri,
Collection<Permission> permissions) {
Collection<String> permissionStrings = new ArrayList<String>();
for (Permission permission : permissions) {
permissionStrings.add(permission.toString());
}
- setRequiredReadPermissionStrings(GraphUri, permissionStrings);
+ setRequiredReadPermissionStrings(graphUri, permissionStrings);
}
/**
@@ -166,19 +162,19 @@
* triple-collection, if
* the set is non-empty the default TCPermisson is no longer required.
*
- * @param GraphUri
+ * @param graphUri
* @param permissionDescriptions
*/
- public void setRequiredReadWritePermissionStrings(IRI GraphUri,
+ public void setRequiredReadWritePermissionStrings(IRI graphUri,
Collection<String> permissionDescriptions) {
- readWritePermissionCache.remove(GraphUri);
+ readWritePermissionCache.remove(graphUri);
final Graph permissionMGraph = getOrCreatePermisionGraph();
Lock l = permissionMGraph.getLock().writeLock();
l.lock();
try {
- removeExistingRequiredReadPermissions(GraphUri, permissionMGraph);
+ removeExistingRequiredReadPermissions(graphUri, permissionMGraph);
final BlankNodeOrIRI permissionList = createList(permissionDescriptions.iterator(), permissionMGraph);
- permissionMGraph.add(new TripleImpl(GraphUri,
+ permissionMGraph.add(new TripleImpl(graphUri,
readWritePermissionListProperty, permissionList));
} finally {
l.unlock();
@@ -190,16 +186,16 @@
* triple-collection, if
* the set is non-empty the default TCPermisson is no longer required.
*
- * @param GraphUri
- * @param permissionDescriptions
+ * @param graphUri
+ * @param permissions
*/
- public void setRequiredReadWritePermissions(IRI GraphUri,
+ public void setRequiredReadWritePermissions(IRI graphUri,
Collection<Permission> permissions) {
Collection<String> permissionStrings = new ArrayList<String>();
for (Permission permission : permissions) {
permissionStrings.add(permission.toString());
}
- setRequiredReadWritePermissionStrings(GraphUri, permissionStrings);
+ setRequiredReadWritePermissionStrings(graphUri, permissionStrings);
}
/**
@@ -207,18 +203,18 @@
* triple-collection, the set may be empty meaning that the default
* TCPermission is required.
*
- * @param GraphUri
+ * @param graphUri
* @return the collection of permissions
*/
- public Collection<Permission> getRequiredReadPermissions(IRI GraphUri) {
- Collection<Permission> result = readPermissionCache.get(GraphUri);
+ public Collection<Permission> getRequiredReadPermissions(IRI graphUri) {
+ Collection<Permission> result = readPermissionCache.get(graphUri);
if (result == null) {
result = new ArrayList<Permission>();
- Collection<String> permissionStrings = getRequiredReadPermissionStrings(GraphUri);
+ Collection<String> permissionStrings = getRequiredReadPermissionStrings(graphUri);
for (String string : permissionStrings) {
result.add(PermissionParser.getPermission(string, getClass().getClassLoader()));
}
- readPermissionCache.put(GraphUri, result);
+ readPermissionCache.put(graphUri, result);
}
return result;
}
@@ -228,18 +224,18 @@
* triple-collection, the set may be empty meaning that the default
* TCPermission is required.
*
- * @param GraphUri
+ * @param graphUri
* @return the collection of permissions
*/
- public Collection<Permission> getRequiredReadWritePermissions(IRI GraphUri) {
- Collection<Permission> result = readWritePermissionCache.get(GraphUri);
+ public Collection<Permission> getRequiredReadWritePermissions(IRI graphUri) {
+ Collection<Permission> result = readWritePermissionCache.get(graphUri);
if (result == null) {
result = new ArrayList<Permission>();
- Collection<String> permissionStrings = getRequiredReadWritePermissionStrings(GraphUri);
+ Collection<String> permissionStrings = getRequiredReadWritePermissionStrings(graphUri);
for (String string : permissionStrings) {
result.add(PermissionParser.getPermission(string, getClass().getClassLoader()));
}
- readWritePermissionCache.put(GraphUri, result);
+ readWritePermissionCache.put(graphUri, result);
}
return result;
}
@@ -258,10 +254,10 @@
}
//called withiong write-lock
- private void removeExistingRequiredReadPermissions(IRI GraphUri,
+ private void removeExistingRequiredReadPermissions(IRI graphUri,
Graph permissionMGraph) {
try {
- Triple t = permissionMGraph.filter(GraphUri, readPermissionListProperty, null).next();
+ Triple t = permissionMGraph.filter(graphUri, readPermissionListProperty, null).next();
RDFTerm list = t.getObject();
removeList((BlankNodeOrIRI) list, permissionMGraph);
permissionMGraph.remove(t);
@@ -284,19 +280,19 @@
}
}
- private Collection<String> getRequiredReadWritePermissionStrings(final IRI GraphUri) {
- return getRequiredPermissionStrings(GraphUri, readWritePermissionListProperty);
+ private Collection<String> getRequiredReadWritePermissionStrings(final IRI graphUri) {
+ return getRequiredPermissionStrings(graphUri, readWritePermissionListProperty);
}
- private Collection<String> getRequiredReadPermissionStrings(final IRI GraphUri) {
- return getRequiredPermissionStrings(GraphUri, readPermissionListProperty);
+ private Collection<String> getRequiredReadPermissionStrings(final IRI graphUri) {
+ return getRequiredPermissionStrings(graphUri, readPermissionListProperty);
}
- private Collection<String> getRequiredPermissionStrings(final IRI GraphUri, IRI property) {
+ private Collection<String> getRequiredPermissionStrings(final IRI graphUri, IRI property) {
try {
final Graph permissionMGraph = tcManager.getMGraph(permissionGraphName);
Lock l = permissionMGraph.getLock().readLock();
l.lock();
try {
- Triple t = permissionMGraph.filter(GraphUri, property, null).next();
+ Triple t = permissionMGraph.filter(graphUri, property, null).next();
BlankNodeOrIRI list = (BlankNodeOrIRI) t.getObject();
LinkedList<String> result = new LinkedList<String>();
readList(list, permissionMGraph, result);
@@ -334,7 +330,7 @@
/**
* Note that this will only be invoked once
- * @return
+ * @return TcManager
*/
protected abstract TcManager getTcManager();
}
diff --git a/dataset/src/main/java/org/apache/clerezza/dataset/security/TcPermission.java b/dataset/src/main/java/org/apache/clerezza/dataset/security/TcPermission.java
index c218dd9..9ff336e 100644
--- a/dataset/src/main/java/org/apache/clerezza/dataset/security/TcPermission.java
+++ b/dataset/src/main/java/org/apache/clerezza/dataset/security/TcPermission.java
@@ -1,20 +1,19 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
*/
package org.apache.clerezza.dataset.security;