incubator-oodt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfos...@apache.org
Subject svn commit: r1002752 [5/9] - in /incubator/oodt/trunk/catalog: ./ .externalToolBuilders/ .settings/ src/ src/main/ src/main/assembly/ src/main/bin/ src/main/java/ src/main/java/gov/ src/main/java/gov/nasa/ src/main/java/gov/nasa/jpl/ src/main/java/gov/...
Date Wed, 29 Sep 2010 17:19:15 GMT
Added: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/CatalogServiceServerAction.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/CatalogServiceServerAction.java?rev=1002752&view=auto
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/CatalogServiceServerAction.java (added)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/CatalogServiceServerAction.java Wed Sep 29 17:19:09 2010
@@ -0,0 +1,55 @@
+/*
+ * 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.
+ */
+package org.apache.oodt.cas.catalog.server.action;
+
+//Spring imports
+import org.springframework.beans.factory.annotation.Required;
+
+//OODT imports
+import org.apache.oodt.cas.catalog.system.impl.CatalogServiceClient;
+import org.apache.oodt.commons.spring.SpringSetIdInjectionType;
+
+/**
+ * @author bfoster
+ * @version $Revision$
+ *
+ */
+public abstract class CatalogServiceServerAction implements SpringSetIdInjectionType {
+	
+	protected String id;
+	protected String description;
+	
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+	
+	@Required
+	public void setDescription(String description) {
+		this.description = description;
+	}
+	
+	public String getDescription() {
+		return this.description;
+	}
+	
+	public abstract void performAction(CatalogServiceClient csClient) throws Exception;
+	
+}

Added: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/GetSupportedCatalogIds.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/GetSupportedCatalogIds.java?rev=1002752&view=auto
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/GetSupportedCatalogIds.java (added)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/GetSupportedCatalogIds.java Wed Sep 29 17:19:09 2010
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+package org.apache.oodt.cas.catalog.server.action;
+
+//OODT imports
+import org.apache.oodt.cas.catalog.system.impl.CatalogServiceClient;
+
+/**
+ * @author bfoster
+ * @version $Revision$
+ *
+ */
+public class GetSupportedCatalogIds extends CatalogServiceServerAction {
+	
+	public void performAction(CatalogServiceClient csClient) throws Exception {
+		System.out.println("CatalogIDs: " + csClient.getCurrentCatalogIds());
+	}
+
+}

Added: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/LoadCatalogRepositoryServerAction.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/LoadCatalogRepositoryServerAction.java?rev=1002752&view=auto
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/LoadCatalogRepositoryServerAction.java (added)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/LoadCatalogRepositoryServerAction.java Wed Sep 29 17:19:09 2010
@@ -0,0 +1,70 @@
+/*
+ * 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.
+ */
+package org.apache.oodt.cas.catalog.server.action;
+
+//JDK imports
+import java.util.Set;
+
+//OODT imports
+import org.apache.oodt.cas.catalog.repository.CatalogRepository;
+import org.apache.oodt.cas.catalog.repository.CatalogRepositoryFactory;
+import org.apache.oodt.cas.catalog.system.Catalog;
+import org.apache.oodt.cas.catalog.system.impl.CatalogServiceClient;
+import org.apache.oodt.cas.catalog.util.Serializer;
+
+//Spring imports
+import org.springframework.context.support.FileSystemXmlApplicationContext;
+
+
+/**
+ * @author bfoster
+ * @version $Revision$
+ *
+ */
+public class LoadCatalogRepositoryServerAction extends CatalogServiceServerAction {
+
+	protected String beanId;
+	protected String beanRepo;
+	
+	@Override
+	public void performAction(CatalogServiceClient csClient) throws Exception {
+		FileSystemXmlApplicationContext appContext = new FileSystemXmlApplicationContext(new String[] { this.beanRepo }, false);
+		appContext.setClassLoader(new Serializer().getClassLoader());
+		appContext.refresh();
+		CatalogRepositoryFactory factory = (CatalogRepositoryFactory) appContext.getBean(this.beanId, CatalogRepositoryFactory.class);
+		CatalogRepository catalogRepository = factory.createRepository();
+		Set<Catalog> catalogs = catalogRepository.deserializeAllCatalogs();
+		System.out.println("Deserialized Catalogs: " + catalogs.toString());
+		for (Catalog catalog : catalogs) {
+			try {
+				System.out.println("Adding Catalog: " + catalog);
+				csClient.addCatalog(catalog);
+			}catch (Exception e) {
+				e.printStackTrace();
+				System.err.println("Failed to add catalog '" + catalog + "' to server : " + e.getMessage());
+			}
+		}		
+	}
+	
+	public void setBeanId(String beanId) {
+		this.beanId = beanId;
+	}
+	
+	public void setBeanRepo(String beanRepo) {
+		this.beanRepo = beanRepo;
+	}
+}

Added: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/LoadCatalogsServerAction.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/LoadCatalogsServerAction.java?rev=1002752&view=auto
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/LoadCatalogsServerAction.java (added)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/LoadCatalogsServerAction.java Wed Sep 29 17:19:09 2010
@@ -0,0 +1,53 @@
+/*
+ * 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.
+ */
+package org.apache.oodt.cas.catalog.server.action;
+
+//JDK imports
+import java.util.Map;
+
+//OODT imports
+import org.apache.oodt.cas.catalog.system.Catalog;
+import org.apache.oodt.cas.catalog.system.impl.CatalogServiceClient;
+import org.apache.oodt.cas.catalog.util.Serializer;
+
+//Spring imports
+import org.springframework.context.support.FileSystemXmlApplicationContext;
+
+/**
+ * @author bfoster
+ * @version $Revision$
+ *
+ */
+public class LoadCatalogsServerAction extends CatalogServiceServerAction {
+
+	protected String beanRepo;
+	
+	@Override
+	public void performAction(CatalogServiceClient csClient) throws Exception {
+		FileSystemXmlApplicationContext repoAppContext = new FileSystemXmlApplicationContext(new String[] { this.beanRepo }, false);
+		repoAppContext.setClassLoader(new Serializer().getClassLoader());
+		repoAppContext.refresh();
+		Map<String, Catalog> catalogs = repoAppContext.getBeansOfType(Catalog.class);
+		for (Catalog catalog : catalogs.values())
+			csClient.addCatalog(catalog);
+	}
+	
+	public void setBeanRepo(String beanRepo) {
+		this.beanRepo = beanRepo;
+	}
+
+}

Added: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/PagedQueryServerAction.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/PagedQueryServerAction.java?rev=1002752&view=auto
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/PagedQueryServerAction.java (added)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/PagedQueryServerAction.java Wed Sep 29 17:19:09 2010
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+package org.apache.oodt.cas.catalog.server.action;
+
+//JDK imports
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+//OODT imports
+import org.apache.oodt.cas.catalog.metadata.TransactionalMetadata;
+import org.apache.oodt.cas.catalog.page.Page;
+import org.apache.oodt.cas.catalog.page.PageInfo;
+import org.apache.oodt.cas.catalog.query.QueryExpression;
+import org.apache.oodt.cas.catalog.query.parser.QueryParser;
+import org.apache.oodt.cas.catalog.system.impl.CatalogServiceClient;
+
+
+/**
+ * @author bfoster
+ * @version $Revision$
+ *
+ */
+public class PagedQueryServerAction extends CatalogServiceServerAction {
+
+	protected int pageNum;
+	protected int pageSize;
+	protected String query;
+	protected Set<String> catalogIds;
+	
+	public void performAction(CatalogServiceClient csClient) throws Exception {
+		QueryExpression queryExpression = QueryParser.parseQueryExpression(query);
+		Page page = null;
+		if (catalogIds == null) 
+			page = csClient.getPage(new PageInfo(pageSize, pageNum), queryExpression);
+		else
+			page = csClient.getPage(new PageInfo(pageSize, pageNum), queryExpression, catalogIds);
+		List<TransactionalMetadata> transactionMetadatas = csClient.getMetadata(page);
+		for (TransactionalMetadata tMet : transactionMetadatas) {
+			System.out.print("ID: " + tMet.getTransactionId() + " ; CatalogIDs: " + tMet.getCatalogIds() + " ; Metadata: (");
+			StringBuffer sb = new StringBuffer("");
+			for (Object metKey : tMet.getMetadata().getHashtable().keySet()) {
+				sb.append(metKey + "=" + tMet.getMetadata().getAllMetadata((String) metKey).toString().replaceAll("[\\[\\]]", "'") + ", ");
+			}
+			System.out.println(sb.substring(0, sb.length() - 2) + ")");
+		}
+	}
+	
+	public void setPageSize(int pageSize) {
+		this.pageSize = pageSize;
+	}
+	
+	public void setPageNum(int pageNum) {
+		this.pageNum = pageNum;
+	}
+	 
+	public void setQuery(String query) {
+		this.query = query;
+	}
+	
+	public void setCatalogIds(List<String> catalogIds) {
+		this.catalogIds = new HashSet<String>(catalogIds);
+	}
+
+}

Added: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/QueryServerAction.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/QueryServerAction.java?rev=1002752&view=auto
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/QueryServerAction.java (added)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/QueryServerAction.java Wed Sep 29 17:19:09 2010
@@ -0,0 +1,68 @@
+/*
+ * 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.
+ */
+package org.apache.oodt.cas.catalog.server.action;
+
+//JDK imports
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+//OODT imports
+import org.apache.oodt.cas.catalog.metadata.TransactionalMetadata;
+import org.apache.oodt.cas.catalog.page.QueryPager;
+import org.apache.oodt.cas.catalog.query.QueryExpression;
+import org.apache.oodt.cas.catalog.query.parser.QueryParser;
+import org.apache.oodt.cas.catalog.system.impl.CatalogServiceClient;
+
+
+/**
+ * @author bfoster
+ * @version $Revision$
+ *
+ */
+public class QueryServerAction extends CatalogServiceServerAction {
+
+	protected String query;
+	protected Set<String> catalogIds;
+	
+	public void performAction(CatalogServiceClient csClient) throws Exception {
+		QueryExpression queryExpression = QueryParser.parseQueryExpression(query);
+		QueryPager queryPager = null;
+		if (catalogIds == null) 
+			queryPager = csClient.query(queryExpression);
+		else
+			queryPager = csClient.query(queryExpression, catalogIds);
+		List<TransactionalMetadata> transactionMetadatas = csClient.getAllPages(queryPager);
+		for (TransactionalMetadata tMet : transactionMetadatas) {
+			System.out.print("ID: " + tMet.getTransactionId() + " ; CatalogIDs: " + tMet.getCatalogIds() + " ; Metadata: (");
+			StringBuffer sb = new StringBuffer("");
+			for (Object metKey : tMet.getMetadata().getHashtable().keySet()) {
+				sb.append(metKey + "=" + tMet.getMetadata().getAllMetadata((String) metKey).toString().replaceAll("[\\[\\]]", "'") + ", ");
+			}
+			System.out.println(sb.substring(0, sb.length() - 2) + ")");
+		}
+	}
+	
+	public void setQuery(String query) {
+		this.query = query;
+	}
+	
+	public void setCatalogIds(List<String> catalogIds) {
+		this.catalogIds = new HashSet<String>(catalogIds);
+	}
+
+}

Added: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/ReducedPagedQueryServerAction.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/ReducedPagedQueryServerAction.java?rev=1002752&view=auto
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/ReducedPagedQueryServerAction.java (added)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/ReducedPagedQueryServerAction.java Wed Sep 29 17:19:09 2010
@@ -0,0 +1,87 @@
+/*
+ * 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.
+ */
+package org.apache.oodt.cas.catalog.server.action;
+
+//JDK imports
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+//APACHE imports
+import org.apache.commons.lang.StringUtils;
+
+//OODT imports
+import org.apache.oodt.cas.catalog.metadata.TransactionalMetadata;
+import org.apache.oodt.cas.catalog.page.Page;
+import org.apache.oodt.cas.catalog.page.PageInfo;
+import org.apache.oodt.cas.catalog.query.QueryExpression;
+import org.apache.oodt.cas.catalog.query.parser.QueryParser;
+import org.apache.oodt.cas.catalog.system.impl.CatalogServiceClient;
+
+
+/**
+ * @author bfoster
+ * @version $Revision$
+ *
+ */
+public class ReducedPagedQueryServerAction extends CatalogServiceServerAction {
+
+	protected int pageNum;
+	protected int pageSize;
+	protected String query;
+	protected Set<String> catalogIds;
+	protected List<String> termNames;
+	
+	public void performAction(CatalogServiceClient csClient) throws Exception {
+		QueryExpression queryExpression = QueryParser.parseQueryExpression(query);
+		Page page = null;
+		if (catalogIds == null) 
+			page = csClient.getPage(new PageInfo(pageSize, pageNum), queryExpression);
+		else
+			page = csClient.getPage(new PageInfo(pageSize, pageNum), queryExpression, catalogIds);
+		List<TransactionalMetadata> transactionMetadatas = csClient.getMetadata(page);
+		for (TransactionalMetadata tMet : transactionMetadatas) {
+			StringBuffer sb = new StringBuffer("");
+			for (String termName : this.termNames) {
+				List<String> values = tMet.getMetadata().getAllMetadata((String) termName);
+				sb.append(termName + " = '" + (values == null ? "null" : StringUtils.join(values.iterator(), ",")) + "', ");
+			}
+			System.out.println(sb.substring(0, sb.length() - 2));
+		}
+	}
+	
+	public void setPageSize(int pageSize) {
+		this.pageSize = pageSize;
+	}
+	
+	public void setPageNum(int pageNum) {
+		this.pageNum = pageNum;
+	}
+	 
+	public void setQuery(String query) {
+		this.query = query;
+	}
+	
+	public void setCatalogIds(List<String> catalogIds) {
+		this.catalogIds = new HashSet<String>(catalogIds);
+	}
+	
+	public void setReducedTerms(List<String> termNames) {
+		this.termNames = termNames;
+	}
+
+}

Added: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/ReducedQueryServerAction.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/ReducedQueryServerAction.java?rev=1002752&view=auto
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/ReducedQueryServerAction.java (added)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/ReducedQueryServerAction.java Wed Sep 29 17:19:09 2010
@@ -0,0 +1,76 @@
+/*
+ * 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.
+ */
+package org.apache.oodt.cas.catalog.server.action;
+
+//JDK imports
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+//APACHE imports
+import org.apache.commons.lang.StringUtils;
+
+//OODT imports
+import org.apache.oodt.cas.catalog.metadata.TransactionalMetadata;
+import org.apache.oodt.cas.catalog.page.QueryPager;
+import org.apache.oodt.cas.catalog.query.QueryExpression;
+import org.apache.oodt.cas.catalog.query.parser.QueryParser;
+import org.apache.oodt.cas.catalog.system.impl.CatalogServiceClient;
+
+
+/**
+ * @author bfoster
+ * @version $Revision$
+ *
+ */
+public class ReducedQueryServerAction extends CatalogServiceServerAction {
+
+	protected String query;
+	protected Set<String> catalogIds;
+	protected List<String> termNames;
+	
+	public void performAction(CatalogServiceClient csClient) throws Exception {
+		QueryExpression queryExpression = QueryParser.parseQueryExpression(query);
+		QueryPager queryPager = null;
+		if (catalogIds == null) 
+			queryPager = csClient.query(queryExpression);
+		else
+			queryPager = csClient.query(queryExpression, catalogIds);
+		List<TransactionalMetadata> transactionMetadatas = csClient.getAllPages(queryPager);
+		for (TransactionalMetadata tMet : transactionMetadatas) {
+			StringBuffer sb = new StringBuffer("");
+			for (String termName : this.termNames) {
+				List<String> values = tMet.getMetadata().getAllMetadata((String) termName);
+				sb.append(termName + " = '" + (values == null ? "null" : StringUtils.join(values.iterator(), ",")) + "', ");
+			}
+			System.out.println(sb.substring(0, sb.length() - 2));
+		}
+	}
+	
+	public void setQuery(String query) {
+		this.query = query;
+	}
+	
+	public void setCatalogIds(List<String> catalogIds) {
+		this.catalogIds = new HashSet<String>(catalogIds);
+	}
+	
+	public void setReducedTerms(List<String> termNames) {
+		this.termNames = termNames;
+	}
+
+}

Added: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/ShutdownServerAction.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/ShutdownServerAction.java?rev=1002752&view=auto
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/ShutdownServerAction.java (added)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/action/ShutdownServerAction.java Wed Sep 29 17:19:09 2010
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+package org.apache.oodt.cas.catalog.server.action;
+
+//OODT imports
+import org.apache.oodt.cas.catalog.system.impl.CatalogServiceClient;
+
+/**
+ * @author bfoster
+ * @version $Revision$
+ *
+ */
+public class ShutdownServerAction extends CatalogServiceServerAction {
+
+	public void performAction(CatalogServiceClient csClient) throws Exception {
+		csClient.shutdown();
+	}
+
+}

Added: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/AbstractCommunicationChannelClient.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/AbstractCommunicationChannelClient.java?rev=1002752&view=auto
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/AbstractCommunicationChannelClient.java (added)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/AbstractCommunicationChannelClient.java Wed Sep 29 17:19:09 2010
@@ -0,0 +1,42 @@
+/*
+ * 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.
+ */
+package org.apache.oodt.cas.catalog.server.channel;
+
+//JDK imports
+import java.util.logging.Logger;
+
+//OODT imports
+import org.apache.oodt.cas.catalog.util.Serializer;
+
+/**
+ * @author bfoster
+ * @version $Revision$
+ *
+ * <p>
+ * An Abstract Communication Channel Client Interface that automatically handles throw execeptions
+ * <p>
+ */
+public abstract class AbstractCommunicationChannelClient implements CommunicationChannelClient {
+	
+	private static Logger LOG = Logger.getLogger(AbstractCommunicationChannelClient.class.getName());
+	protected Serializer serializer;
+
+	public AbstractCommunicationChannelClient() {
+		this.serializer = new Serializer(false);
+	}
+	
+}

Added: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/AbstractCommunicationChannelServer.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/AbstractCommunicationChannelServer.java?rev=1002752&view=auto
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/AbstractCommunicationChannelServer.java (added)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/AbstractCommunicationChannelServer.java Wed Sep 29 17:19:09 2010
@@ -0,0 +1,455 @@
+/*
+ * 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.
+ */
+package org.apache.oodt.cas.catalog.server.channel;
+
+//JDK imports
+import java.net.URL;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+//OODT imports
+import org.apache.oodt.cas.catalog.metadata.TransactionalMetadata;
+import org.apache.oodt.cas.catalog.page.CatalogReceipt;
+import org.apache.oodt.cas.catalog.page.Page;
+import org.apache.oodt.cas.catalog.page.PageInfo;
+import org.apache.oodt.cas.catalog.page.QueryPager;
+import org.apache.oodt.cas.catalog.page.TransactionReceipt;
+import org.apache.oodt.cas.catalog.query.QueryExpression;
+import org.apache.oodt.cas.catalog.struct.Dictionary;
+import org.apache.oodt.cas.catalog.struct.Index;
+import org.apache.oodt.cas.catalog.struct.TransactionId;
+import org.apache.oodt.cas.catalog.system.Catalog;
+import org.apache.oodt.cas.catalog.system.CatalogService;
+import org.apache.oodt.cas.catalog.util.PluginURL;
+import org.apache.oodt.cas.catalog.util.Serializer;
+import org.apache.oodt.cas.metadata.Metadata;
+
+/**
+ * @author bfoster
+ * @version $Revision$
+ *
+ * <p>
+ * An Abstract Communication Channel Server Interface that automatically handles throw exceptions
+ * <p>
+ */
+public abstract class AbstractCommunicationChannelServer implements CommunicationChannelServer {
+	
+	private static Logger LOG = Logger.getLogger(AbstractCommunicationChannelServer.class.getName());
+	
+	protected CatalogService catalogService;
+	protected int port;
+	protected Serializer serializer;
+	
+	public AbstractCommunicationChannelServer() {
+		this.serializer = new Serializer();
+	}
+	
+	public void setCatalogService(CatalogService catalogService) {
+		this.catalogService = catalogService;
+	}
+	
+	public void setPort(int port) { 
+		this.port = port;
+	}
+	
+	public int getPort() {
+		return this.port;
+	}
+
+	public void shutdown() throws Exception {
+		try {
+			this.catalogService.shutdown();
+			this.catalogService = null;
+			System.gc(); // used to speed up shutdown process (gives java a boost-start at cleaning up everything so server will die)
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed to shutdown server : " + e.getMessage(), e);
+			throw new Exception("Failed to shutdown server : " + e.getMessage(), e);
+		}
+	}
+	
+	public boolean isRestrictQueryPermissions() throws Exception {
+		try {
+			return this.catalogService.isRestrictQueryPermissions();
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while checking server query permissions : " + e.getMessage(), e);
+			throw new Exception("Failed while checking server query permissions : " + e.getMessage(), e);
+		}
+	}
+//
+//	public void setRestrictQueryPermissions(boolean restrictQueryPermissions) throws CatalogServiceException {
+//		this.catalogService.setRestrictQueryPermissions(restrictQueryPermissions);
+//	}
+//
+	public boolean isRestrictIngestPermissions() throws Exception {
+		try {
+			return this.catalogService.isRestrictIngestPermissions();
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while checking server ingest permissions : " + e.getMessage(), e);
+			throw new Exception("Failed while checking server ingest permissions : " + e.getMessage(), e);
+		}
+	}
+//
+//	public void setHasIngestPermissions(boolean restrictIngestPermissions) throws CatalogServiceException {
+//		this.catalogService.setHasIngestPermissions(restrictIngestPermissions);
+//	}
+
+//	public Class<? extends TransactionId<?>> getTransactionIdClass() throws CatalogServiceException {
+//		return this.catalogService.getTransactionIdClass();
+//	}
+//
+//	public void setTransactionIdClass(Class<? extends TransactionId<?>> transactionIdClass) throws CatalogServiceException {
+//		this.catalogService.setTransactionIdClass(transactionIdClass);
+//	}
+//
+	public void addCatalog(Catalog catalog) throws Exception {
+		try {
+			this.catalogService.addCatalog(catalog);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while adding catalog '" + catalog + "' to server : " + e.getMessage(), e);
+			throw new Exception("Failed while adding catalog '" + catalog + "' to server : " + e.getMessage(), e);
+		}
+	}
+	
+	public void replaceCatalog(Catalog catalog) throws Exception {
+		try {
+			this.catalogService.replaceCatalog(catalog);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while replacing catalog '" + catalog + "' to server : " + e.getMessage(), e);
+			throw new Exception("Failed while replacing catalog '" + catalog + "' to server : " + e.getMessage(), e);
+		}
+	}
+	
+	public void addCatalog(String catalogId, Index index) throws Exception {
+		try {
+			this.catalogService.addCatalog(catalogId, index);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while adding catalog '" + catalogId + "' with index '" + index + "' to server : " + e.getMessage(), e);
+			throw new Exception("Failed while adding catalog '" + catalogId + "' with index '" + index + "' to server : " + e.getMessage(), e);
+		}
+	}
+	
+	public void addCatalog(String catalogId, Index index, List<Dictionary> dictionaries) throws Exception {
+		try {
+			this.catalogService.addCatalog(catalogId, index, dictionaries);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while adding catalog '" + catalogId + "' with index '" + index + "' and dictionaries '" + dictionaries + "' to server : " + e.getMessage(), e);
+			throw new Exception("Failed while adding catalog '" + catalogId + "' with index '" + index + "' and dictionaries '" + dictionaries + "' to server : " + e.getMessage(), e);
+		}
+	}
+
+	public void addCatalog(String catalogId, Index index, List<Dictionary> dictionaries, boolean restrictQueryPermission, boolean restrictIngestPermission) throws Exception {
+		try {
+			this.catalogService.addCatalog(catalogId, index, dictionaries, restrictQueryPermission, restrictIngestPermission);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while adding catalog '" + catalogId + "' with index '" + index + "' and dictionaries '" + dictionaries + "' and restrictQueryPermission '" + restrictQueryPermission + "' and restrictIngestPermission '" + restrictIngestPermission + "' to server : " + e.getMessage(), e);
+			throw new Exception("Failed while adding catalog '" + catalogId + "' with index '" + index + "' and dictionaries '" + dictionaries + "' and restrictQueryPermission '" + restrictQueryPermission + "' and restrictIngestPermission '" + restrictIngestPermission + "' to server : " + e.getMessage(), e);
+		}
+	}
+
+	public void addDictionary(String catalogId, Dictionary dictionary) throws Exception {
+		try {
+			this.catalogService.addDictionary(catalogId, dictionary);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while adding dictionary '" + dictionary + "' to catalog '" + catalogId + "' : " + e.getMessage(), e);
+			throw new Exception("Failed while adding dictionary '" + dictionary + "' to catalog '" + catalogId + "' : " + e.getMessage(), e);
+		}
+	}
+	
+	public void replaceDictionaries(String catalogId, List<Dictionary> dictionaries) throws Exception {
+		try {
+			this.catalogService.replaceDictionaries(catalogId, dictionaries);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while replacing dictionaries '" + dictionaries + "' in catalog '" + catalogId + "' : " + e.getMessage(), e);
+			throw new Exception("Failed while replacing dictionaries '" + dictionaries + "' in catalog '" + catalogId + "' : " + e.getMessage(), e);
+		}
+	}
+
+	public void replaceIndex(String catalogId, Index index) throws Exception {
+		try {
+			this.catalogService.replaceIndex(catalogId, index);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while replacing index '" + index + "' in catalog '" + catalogId + "' : " + e.getMessage(), e);
+			throw new Exception("Failed while replacing index '" + index + "' in catalog '" + catalogId + "' : " + e.getMessage(), e);
+		}
+	}
+
+	public void modifyIngestPermission(String catalogId, boolean restrictIngestPermission) throws Exception {
+		try {
+			this.catalogService.modifyIngestPermission(catalogId, restrictIngestPermission);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while changing ingest permissions for catalog '" + catalogId + "' to '" + restrictIngestPermission + "' : " + e.getMessage(), e);
+			throw new Exception("Failed while changing ingest permissions for catalog '" + catalogId + "' to '" + restrictIngestPermission + "' : " + e.getMessage(), e);
+		}
+	}
+	
+	public void modifyQueryPermission(String catalogId, boolean restrictQueryPermission) throws Exception {
+		try {
+			this.catalogService.modifyQueryPermission(catalogId, restrictQueryPermission);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while changing query permissions for catalog '" + catalogId + "' to '" + restrictQueryPermission + "' : " + e.getMessage(), e);
+			throw new Exception("Failed while changing query permissions for catalog '" + catalogId + "' to '" + restrictQueryPermission + "' : " + e.getMessage(), e);
+		}
+	}
+	
+	public void removeCatalog(String catalogId) throws Exception {
+		try {
+			this.catalogService.removeCatalog(catalogId);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while removing catalog '" + catalogId + "' : " + e.getMessage(), e);
+			throw new Exception("Failed while removing catalog '" + catalogId + "' : " + e.getMessage(), e);
+		}
+	}
+
+//	public void removeCatalog(String catalogUrn, boolean preserveMapping) throws CatalogServiceException {
+//		this.catalogService.removeCatalog(catalogUrn, preserveMapping);
+//	}
+
+	public List<PluginURL> getPluginUrls() throws Exception {
+		try {
+			return this.catalogService.getPluginUrls();
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while getting plugin URLs : " + e.getMessage(), e);
+			throw new Exception("Failed while getting plugin URLs : " + e.getMessage(), e);
+		}
+	}
+	
+	public void addPluginUrls(List<PluginURL> pluginURLs) throws Exception {
+		try {
+			this.catalogService.addPluginUrls(pluginURLs);
+			this.serializer.refreshClassLoader();
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while adding plugin URLs '" + pluginURLs + "' : " + e.getMessage(), e);
+			throw new Exception("Failed while adding plugin URLs '" + pluginURLs + "' : " + e.getMessage(), e);
+		}
+	}
+	
+	public URL getPluginStorageDir() throws Exception {
+		try {
+			return this.catalogService.getPluginStorageDir();
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while getting plugin storage directory : " + e.getMessage(), e);
+			throw new Exception("Failed while getting plugin storage directory : " + e.getMessage(), e);
+		}
+	}
+	
+//	public Set<Catalog> getCurrentCatalogList() throws CatalogServiceException {
+//		return this.catalogService.getCurrentCatalogList();
+//	}
+//	
+//	public Catalog getCatalog(String catalogUrn) throws CatalogServiceException {
+//		return this.catalogService.getCatalog(catalogUrn);
+//	}
+
+	public Set<String> getCurrentCatalogIds() throws Exception {
+		try {
+			return this.catalogService.getCurrentCatalogIds();
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while getting current catalog ids : " + e.getMessage(), e);
+			throw new Exception("Failed while getting current catalog ids : " + e.getMessage(), e);
+		}	
+	}
+		
+	public TransactionReceipt ingest(Metadata metadata) throws Exception {
+		try {
+			return this.catalogService.ingest(metadata);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while performing ingest : " + e.getMessage(), e);
+			throw new Exception("Failed while performing ingest : " + e.getMessage(), e);
+		}
+	}
+	
+	public void delete(Metadata metadata) throws Exception {
+		try {
+			this.catalogService.delete(metadata);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while performing deletion : " + e.getMessage(), e);
+			throw new Exception("Failed while performing deletion : " + e.getMessage(), e);
+		}	
+	}
+	
+	public List<String> getProperty(String key) throws Exception {
+		try {
+			return this.catalogService.getProperty(key);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while getting property '" + key + "' : " + e.getMessage(), e);
+			throw new Exception("Failed while getting property '" + key + "' : " + e.getMessage(), e);
+		}	
+	}
+
+	public Properties getCalalogProperties() throws Exception {
+		try {
+			return this.catalogService.getCalalogProperties();
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while getting catalog properties : " + e.getMessage(), e);
+			throw new Exception("Failed while getting catalog properties : " + e.getMessage(), e);
+		}		
+	}
+	
+	public Properties getCalalogProperties(String catalogId) throws Exception {
+		try {
+			return this.catalogService.getCalalogProperties(catalogId);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while getting catalog properties for catalog '" + catalogId + "' : " + e.getMessage(), e);
+			throw new Exception("Failed while getting catalog properties for catalog '" + catalogId + "' : " + e.getMessage(), e);
+		}	
+	}
+
+//	public Page getFirstPage(QueryExpression queryExpression) throws Exception {
+//		return this.catalogService.getFirstPage(queryExpression);
+//	}
+//
+//	public Page getFirstPage(QueryExpression queryExpression, Set<String> catalogIds) throws Exception {
+//		return this.catalogService.getFirstPage(queryExpression, catalogIds);
+//	}
+	
+	public Page getNextPage(Page page) throws Exception {
+		try {
+			return this.catalogService.getNextPage(page);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while getting next page : " + e.getMessage(), e);
+			throw new Exception("Failed while getting next page : " + e.getMessage(), e);
+		}	
+	}
+	
+	public Page getPage(PageInfo pageInfo, QueryExpression queryExpression) throws Exception {
+		try {
+			return this.catalogService.getPage(pageInfo, queryExpression);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while getting next page [pageInfo='" + pageInfo + "',query='" + queryExpression + "'] : " + e.getMessage(), e);
+			throw new Exception("Failed while getting next page [pageInfo='" + pageInfo + "',query='" + queryExpression + "'] : " + e.getMessage(), e);
+		}
+	}
+	
+	public Page getPage(PageInfo pageInfo, QueryExpression queryExpression, Set<String> catalogIds) throws Exception {
+		try {
+			return this.catalogService.getPage(pageInfo, queryExpression, catalogIds);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while getting next page [pageInfo='" + pageInfo + "',query='" + queryExpression + "',catalogIds='" + catalogIds + "'] : " + e.getMessage(), e);
+			throw new Exception("Failed while getting next page [pageInfo='" + pageInfo + "',query='" + queryExpression + "',catalogIds='" + catalogIds + "'] : " + e.getMessage(), e);
+		}
+	}
+	
+//	public Page getLastPage(QueryExpression queryExpression) throws Exception {
+//		return this.catalogService.getLastPage(queryExpression);
+//	}
+//	
+//	public Page getLastPage(QueryExpression queryExpression, Set<String> catalogIds) throws Exception {
+//		return this.catalogService.getLastPage(queryExpression, catalogIds);
+//	}
+	
+	public List<TransactionalMetadata> getMetadata(Page page) throws Exception {
+		try {
+			return this.catalogService.getMetadata(page);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while getting metadata for page : " + e.getMessage(), e);
+			throw new Exception("Failed while getting metadata for page : " + e.getMessage(), e);
+		}
+	}
+	
+	public QueryPager query(QueryExpression queryExpression) throws Exception {
+		try {
+			return this.catalogService.query(queryExpression);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while performing query '" + queryExpression + "' : " + e.getMessage(), e);
+			throw new Exception("Failed while performing query '" + queryExpression + "' : " + e.getMessage(), e);
+		}
+	}
+	
+	public QueryPager query(QueryExpression queryExpression, Set<String> catalogIds) throws Exception {
+		try {
+			return this.catalogService.query(queryExpression, catalogIds);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while performing query '" + queryExpression + "' to catalogs '" + catalogIds + "' : " + e.getMessage(), e);
+			throw new Exception("Failed while performing query '" + queryExpression + "' to catalogs '" + catalogIds + "' : " + e.getMessage(), e);
+		}
+	}
+	
+//	public QueryPager query(QueryExpression queryExpression, boolean sortResults) throws CatalogServiceException {
+//		return this.catalogService.query(queryExpression, sortResults);
+//	}
+ 
+	public List<TransactionalMetadata> getNextPage(QueryPager queryPager) throws Exception {
+		try {
+			return this.catalogService.getNextPage(queryPager);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while get next page from query pager : " + e.getMessage(), e);
+			throw new Exception("Failed while get next page from query pager : " + e.getMessage(), e);
+		}	
+	}
+
+//	public List<TransactionId<?>> getTransactionIdsForAllPages(QueryPager queryPager) throws CatalogServiceException {
+//		return this.catalogService.getTransactionIdsForAllPages(queryPager);
+//	}
+	
+	public List<TransactionalMetadata> getAllPages(QueryPager queryPager) throws Exception {
+		try {
+			return this.catalogService.getAllPages(queryPager);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while get all pages from query pager : " + e.getMessage(), e);
+			throw new Exception("Failed while get all pages from query pager : " + e.getMessage(), e);
+		}	
+	}
+	
+	public List<TransactionalMetadata> getMetadataFromTransactionIdStrings(List<String> catalogServiceTransactionIdStrings) throws Exception {
+		try {
+			return this.catalogService.getMetadataFromTransactionIdStrings(catalogServiceTransactionIdStrings);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while getting metadata for catalog service transaction ids '" + catalogServiceTransactionIdStrings + "' : " + e.getMessage(), e);
+			throw new Exception("Failed while getting metadata for catalog service transaction ids '" + catalogServiceTransactionIdStrings + "' : " + e.getMessage(), e);
+		}	
+	}
+	
+	public List<TransactionalMetadata> getMetadataFromTransactionIds(List<TransactionId<?>> catalogServiceTransactionIds) throws Exception {
+		try {
+			return this.catalogService.getMetadataFromTransactionIds(catalogServiceTransactionIds);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while getting metadata for catalog service transaction ids '" + catalogServiceTransactionIds + "' : " + e.getMessage(), e);
+			throw new Exception("Failed while getting metadata for catalog service transaction ids '" + catalogServiceTransactionIds + "' : " + e.getMessage(), e);
+		}	
+	}
+	
+	public List<TransactionId<?>> getCatalogServiceTransactionIds(List<TransactionId<?>> catalogTransactionIds, String catalogId) throws Exception {
+		try {
+			return this.catalogService.getCatalogServiceTransactionIds(catalogTransactionIds, catalogId);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while getting catalog service transaction ids for catalog transaction ids '" + catalogTransactionIds + "' from catalog '" + catalogId + "' : " + e.getMessage(), e);
+			throw new Exception("Failed while getting catalog service transaction ids for catalog transaction ids '" + catalogTransactionIds + "' from catalog '" + catalogId + "' : " + e.getMessage(), e);
+		}	
+	}
+	
+	public TransactionId<?> getCatalogServiceTransactionId(TransactionId<?> catalogTransactionId, String catalogId) throws Exception {
+		try {
+			return this.catalogService.getCatalogServiceTransactionId(catalogTransactionId, catalogId);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while getting catalog service transaction id for catalog transaction id '" + catalogTransactionId + "' from catalog '" + catalogId + "' : " + e.getMessage(), e);
+			throw new Exception("Failed while getting catalog service transaction id for catalog transaction id '" + catalogTransactionId + "' from catalog '" + catalogId + "' : " + e.getMessage(), e);
+		}		
+	}
+	
+	public TransactionId<?> getCatalogServiceTransactionId(CatalogReceipt catalogReceipt, boolean generateNew) throws Exception {
+		try {
+			return this.catalogService.getCatalogServiceTransactionId(catalogReceipt, generateNew);
+		}catch (Exception e) {
+			LOG.log(Level.SEVERE, "Failed while getting metadata for catalog service transaction id for catalog receipt '" + catalogReceipt + "' with generate new equal '" + generateNew + "' : " + e.getMessage(), e);
+			throw new Exception("Failed while getting metadata for catalog service transaction id for catalog receipt '" + catalogReceipt + "' with generate new equal '" + generateNew + "' : " + e.getMessage(), e);
+		}		
+	}
+	
+}

Added: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/CommunicationChannelClient.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/CommunicationChannelClient.java?rev=1002752&view=auto
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/CommunicationChannelClient.java (added)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/CommunicationChannelClient.java Wed Sep 29 17:19:09 2010
@@ -0,0 +1,151 @@
+/*
+ * 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.
+ */
+package org.apache.oodt.cas.catalog.server.channel;
+
+//JDK imports
+import java.net.URL;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+
+//OODT imports
+import org.apache.oodt.cas.catalog.metadata.TransactionalMetadata;
+import org.apache.oodt.cas.catalog.page.CatalogReceipt;
+import org.apache.oodt.cas.catalog.page.Page;
+import org.apache.oodt.cas.catalog.page.PageInfo;
+import org.apache.oodt.cas.catalog.page.QueryPager;
+import org.apache.oodt.cas.catalog.page.TransactionReceipt;
+import org.apache.oodt.cas.catalog.query.QueryExpression;
+import org.apache.oodt.cas.catalog.struct.Dictionary;
+import org.apache.oodt.cas.catalog.struct.Index;
+import org.apache.oodt.cas.catalog.struct.TransactionId;
+import org.apache.oodt.cas.catalog.system.Catalog;
+import org.apache.oodt.cas.catalog.util.PluginURL;
+import org.apache.oodt.cas.metadata.Metadata;
+
+/**
+ * @author bfoster
+ * @version $Revision$
+ *
+ * <p>
+ * A Communication Channel Interface
+ * <p>
+ */
+public interface CommunicationChannelClient {
+
+	public void shutdown() throws Exception;
+	
+	public boolean isRestrictQueryPermissions() throws Exception;
+
+//	public void setRestrictQueryPermissions(boolean restrictQueryPermissions) throws Exception;
+
+	public boolean isRestrictIngestPermissions() throws Exception;
+
+//	public void setHasIngestPermissions(boolean restrictIngestPermissions) throws Exception;
+
+//	public Class<? extends TransactionId<?>> getTransactionIdClass() throws Exception;
+//
+//	public void setTransactionIdClass(Class<? extends TransactionId<?>> transactionIdClass) throws Exception;
+//
+
+	public void addCatalog(Catalog catalog) throws Exception;
+
+	public void replaceCatalog(Catalog catalog) throws Exception;
+
+	public void addCatalog(String catalogId, Index index) throws Exception;
+	
+	public void addCatalog(String catalogId, Index index, List<Dictionary> dictionaries) throws Exception;
+
+	public void addCatalog(String catalogId, Index index, List<Dictionary> dictionaries, boolean restrictQueryPermission, boolean restrictIngestPermission) throws Exception;
+
+	public void addDictionary(String catalogId, Dictionary dictionary) throws Exception;
+
+	public void replaceDictionaries(String catalogId, List<Dictionary> dictionaries) throws Exception;
+
+	public void replaceIndex(String catalogId, Index index) throws Exception;
+
+	public void modifyIngestPermission(String catalogId, boolean restrictIngestPermission) throws Exception;
+	
+	public void modifyQueryPermission(String catalogId, boolean restrictQueryPermission) throws Exception;
+	
+	public void removeCatalog(String catalogUrn) throws Exception;
+
+//	public void removeCatalog(String catalogUrn, boolean preserveMapping) throws Exception;
+
+	public List<PluginURL> getPluginUrls() throws Exception;
+
+	public void addPluginUrls(List<PluginURL> pluginUrls) throws Exception;
+
+	public URL getPluginStorageDir() throws Exception;
+	
+	public void transferUrl(URL fromUrl, URL toUrl) throws Exception;
+	
+//	public Set<Catalog> getCurrentCatalogList() throws Exception;
+//	
+//	public Catalog getCatalog(String catalogUrn) throws Exception;
+
+	public Set<String> getCurrentCatalogIds() throws Exception;
+		
+	public TransactionReceipt ingest(Metadata metadata) throws Exception;
+	
+	public void delete(Metadata metadata) throws Exception;
+	
+	public List<String> getProperty(String key) throws Exception;
+
+	public Properties getCalalogProperties() throws Exception;
+	
+	public Properties getCalalogProperties(String catalogUrn) throws Exception;
+	
+//	public Page getFirstPage(QueryExpression queryExpression) throws Exception;
+//
+//	public Page getFirstPage(QueryExpression queryExpression, Set<String> catalogIds) throws Exception;
+	
+	public Page getNextPage(Page page) throws Exception;
+	
+	public Page getPage(PageInfo pageInfo, QueryExpression queryExpression) throws Exception;
+	
+	public Page getPage(PageInfo pageInfo, QueryExpression queryExpression, Set<String> catalogIds) throws Exception;
+	
+//	public Page getLastPage(QueryExpression queryExpression) throws Exception;
+//
+//	public Page getLastPage(QueryExpression queryExpression, Set<String> catalogIds) throws Exception;
+	
+	public List<TransactionalMetadata> getMetadata(Page page) throws Exception;
+
+	public QueryPager query(QueryExpression queryExpression) throws Exception;
+
+	public QueryPager query(QueryExpression queryExpression, Set<String> catalogIds) throws Exception;
+	
+//	public QueryPager query(QueryExpression queryExpression, boolean sortResults) throws Exception;
+ 
+	public List<TransactionalMetadata> getNextPage(QueryPager queryPager) throws Exception;
+
+	public List<TransactionId<?>> getTransactionIdsForAllPages(QueryPager queryPager) throws Exception;
+	
+	public List<TransactionalMetadata> getAllPages(QueryPager queryPager) throws Exception;
+	
+	public List<TransactionalMetadata> getMetadataFromTransactionIdStrings(List<String> catalogServiceTransactionIdStrings) throws Exception;
+	
+	public List<TransactionalMetadata> getMetadataFromTransactionIds(List<TransactionId<?>> catalogServiceTransactionIds) throws Exception;
+	
+	public List<TransactionId<?>> getCatalogServiceTransactionIds(List<TransactionId<?>> catalogTransactionIds, String catalogUrn) throws Exception;
+	
+	public TransactionId<?> getCatalogServiceTransactionId(TransactionId<?> catalogTransactionId, String catalogUrn) throws Exception;
+	
+	public TransactionId<?> getCatalogServiceTransactionId(CatalogReceipt catalogReceipt, boolean generateNew) throws Exception;
+	
+}
\ No newline at end of file

Added: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/CommunicationChannelClientFactory.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/CommunicationChannelClientFactory.java?rev=1002752&view=auto
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/CommunicationChannelClientFactory.java (added)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/CommunicationChannelClientFactory.java Wed Sep 29 17:19:09 2010
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+package org.apache.oodt.cas.catalog.server.channel;
+
+/**
+ * @author bfoster
+ * @version $Revision$
+ *
+ * <p>
+ * A Factory for creating CommunicationChannelClient
+ * <p>
+ */
+public interface CommunicationChannelClientFactory {
+
+	public CommunicationChannelClient createCommunicationChannelClient();
+	
+	public void setServerUrl(String url);
+	
+	public String getServerUrl();
+	
+}

Added: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/CommunicationChannelServer.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/CommunicationChannelServer.java?rev=1002752&view=auto
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/CommunicationChannelServer.java (added)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/CommunicationChannelServer.java Wed Sep 29 17:19:09 2010
@@ -0,0 +1,158 @@
+/*
+ * 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.
+ */
+package org.apache.oodt.cas.catalog.server.channel;
+
+//JDK imports
+import java.net.URL;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+
+//OODT imports
+import org.apache.oodt.cas.catalog.exception.CatalogServiceException;
+import org.apache.oodt.cas.catalog.metadata.TransactionalMetadata;
+import org.apache.oodt.cas.catalog.page.CatalogReceipt;
+import org.apache.oodt.cas.catalog.page.Page;
+import org.apache.oodt.cas.catalog.page.PageInfo;
+import org.apache.oodt.cas.catalog.page.QueryPager;
+import org.apache.oodt.cas.catalog.page.TransactionReceipt;
+import org.apache.oodt.cas.catalog.query.QueryExpression;
+import org.apache.oodt.cas.catalog.struct.Dictionary;
+import org.apache.oodt.cas.catalog.struct.Index;
+import org.apache.oodt.cas.catalog.struct.TransactionId;
+import org.apache.oodt.cas.catalog.system.Catalog;
+import org.apache.oodt.cas.catalog.system.CatalogService;
+import org.apache.oodt.cas.catalog.util.PluginURL;
+import org.apache.oodt.cas.metadata.Metadata;
+
+/**
+ * @author bfoster
+ * @version $Revision$
+ *
+ * <p>
+ * A Communication Channel Server
+ * <p>
+ */
+public interface CommunicationChannelServer {
+
+	public void setCatalogService(CatalogService catalogService) throws Exception;
+	
+	public void setPort(int port) throws Exception;
+
+	public int getPort();
+	
+	public void startup() throws Exception;
+
+	public void shutdown() throws Exception;
+
+	public boolean isRestrictQueryPermissions() throws Exception;
+//
+//	public void setRestrictQueryPermissions(boolean restrictQueryPermissions) throws Exception;
+//
+	public boolean isRestrictIngestPermissions() throws Exception;
+//
+//	public void setHasIngestPermissions(boolean restrictIngestPermissions) throws Exception;
+
+//	public Class<? extends TransactionId<?>> getTransactionIdClass() throws Exception;
+//
+//	public void setTransactionIdClass(Class<? extends TransactionId<?>> transactionIdClass) throws Exception;
+//	
+	public void addCatalog(Catalog catalog) throws Exception;
+
+	public void replaceCatalog(Catalog catalog) throws Exception;
+	
+	public void addCatalog(String catalogId, Index index) throws Exception;
+	
+	public void addCatalog(String catalogId, Index index, List<Dictionary> dictionaries) throws Exception;
+
+	public void addCatalog(String catalogId, Index index, List<Dictionary> dictionaries, boolean restrictQueryPermission, boolean restrictIngestPermission) throws Exception;
+
+	public void addDictionary(String catalogId, Dictionary dictionary) throws Exception;
+
+	public void replaceDictionaries(String catalogId, List<Dictionary> dictionaries) throws Exception;
+	
+	public void replaceIndex(String catalogId, Index index) throws Exception;
+
+	public void modifyIngestPermission(String catalogId, boolean restrictIngestPermission) throws Exception;
+	
+	public void modifyQueryPermission(String catalogId, boolean restrictQueryPermission) throws Exception;
+		
+	public void removeCatalog(String catalogUrn) throws Exception;
+	
+//	public void removeCatalog(String catalogUrn, boolean preserveMapping) throws Exception;
+
+	public List<PluginURL> getPluginUrls() throws Exception;
+	
+	public void addPluginUrls(List<PluginURL> pluginURLs) throws Exception;
+	
+	public URL getPluginStorageDir() throws Exception;
+	
+//	public Set<Catalog> getCurrentCatalogList() throws Exception;
+//	
+//	public Catalog getCatalog(String catalogUrn) throws Exception;
+
+	public Set<String> getCurrentCatalogIds() throws Exception;
+		
+	public TransactionReceipt ingest(Metadata metadata) throws Exception;
+	
+	public void delete(Metadata metadata) throws Exception;
+	
+	public List<String> getProperty(String key) throws Exception;
+
+	public Properties getCalalogProperties() throws Exception;
+	
+	public Properties getCalalogProperties(String catalogUrn) throws Exception;
+	
+//	public Page getFirstPage(QueryExpression queryExpression) throws Exception;
+//
+//	public Page getFirstPage(QueryExpression queryExpression, Set<String> catalogIds) throws Exception;
+	
+	public Page getNextPage(Page page) throws Exception;
+	
+	public Page getPage(PageInfo pageInfo, QueryExpression queryExpression) throws Exception;
+	
+	public Page getPage(PageInfo pageInfo, QueryExpression queryExpression, Set<String> catalogIds) throws Exception;
+	
+//	public Page getLastPage(QueryExpression queryExpression) throws Exception;
+//
+//	public Page getLastPage(QueryExpression queryExpression, Set<String> catalogIds) throws Exception;
+	
+	public List<TransactionalMetadata> getMetadata(Page page) throws Exception;
+	
+	public QueryPager query(QueryExpression queryExpression) throws Exception;
+
+	public QueryPager query(QueryExpression queryExpression, Set<String> catalogIds) throws Exception;
+
+//	public QueryPager query(QueryExpression queryExpression, boolean sortResults) throws Exception;
+ 
+	public List<TransactionalMetadata> getNextPage(QueryPager queryPager) throws Exception;
+
+//	public List<TransactionId<?>> getTransactionIdsForAllPages(QueryPager queryPager) throws Exception;
+	
+	public List<TransactionalMetadata> getAllPages(QueryPager queryPager) throws Exception;
+	
+	public List<TransactionalMetadata> getMetadataFromTransactionIdStrings(List<String> catalogServiceTransactionIdStrings) throws Exception;
+	
+	public List<TransactionalMetadata> getMetadataFromTransactionIds(List<TransactionId<?>> catalogServiceTransactionIds) throws Exception;
+	
+	public List<TransactionId<?>> getCatalogServiceTransactionIds(List<TransactionId<?>> catalogTransactionIds, String catalogUrn) throws Exception;
+	
+	public TransactionId<?> getCatalogServiceTransactionId(TransactionId<?> catalogTransactionId, String catalogUrn) throws Exception;
+	
+	public TransactionId<?> getCatalogServiceTransactionId(CatalogReceipt catalogReceipt, boolean generateNew) throws Exception;
+	
+}

Added: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/CommunicationChannelServerFactory.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/CommunicationChannelServerFactory.java?rev=1002752&view=auto
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/CommunicationChannelServerFactory.java (added)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/CommunicationChannelServerFactory.java Wed Sep 29 17:19:09 2010
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+package org.apache.oodt.cas.catalog.server.channel;
+
+//OODT imports
+import org.apache.oodt.cas.catalog.system.CatalogServiceFactory;
+
+/**
+ * @author bfoster
+ * @version $Revision$
+ *
+ * <p>
+ * A Factory for creating CommunicationChannelServer
+ * <p>
+ */
+public interface CommunicationChannelServerFactory {
+	
+	public CommunicationChannelServer createCommunicationChannelServer();
+	
+	public void setPort(int port);
+	
+	public int getPort();
+	
+	public void setCatalogServiceFactory(CatalogServiceFactory catalogServiceFactory);
+	
+}

Added: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/rmi/RmiCommunicationChannelClient.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/rmi/RmiCommunicationChannelClient.java?rev=1002752&view=auto
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/rmi/RmiCommunicationChannelClient.java (added)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/rmi/RmiCommunicationChannelClient.java Wed Sep 29 17:19:09 2010
@@ -0,0 +1,269 @@
+/*
+ * 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.
+ */
+package org.apache.oodt.cas.catalog.server.channel.rmi;
+
+//JDK imports
+import java.net.URL;
+import java.rmi.RemoteException;
+import java.rmi.server.UnicastRemoteObject;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+
+//OODT imports
+import org.apache.oodt.cas.catalog.metadata.TransactionalMetadata;
+import org.apache.oodt.cas.catalog.page.CatalogReceipt;
+import org.apache.oodt.cas.catalog.page.Page;
+import org.apache.oodt.cas.catalog.page.PageInfo;
+import org.apache.oodt.cas.catalog.page.QueryPager;
+import org.apache.oodt.cas.catalog.page.TransactionReceipt;
+import org.apache.oodt.cas.catalog.query.QueryExpression;
+import org.apache.oodt.cas.catalog.server.channel.CommunicationChannelClient;
+import org.apache.oodt.cas.catalog.struct.Dictionary;
+import org.apache.oodt.cas.catalog.struct.Index;
+import org.apache.oodt.cas.catalog.struct.TransactionId;
+import org.apache.oodt.cas.catalog.system.Catalog;
+import org.apache.oodt.cas.catalog.util.PluginURL;
+import org.apache.oodt.cas.metadata.Metadata;
+
+/**
+ * 
+ * @author bfoster
+ * @version $Revision$
+ *
+ */
+public class RmiCommunicationChannelClient extends UnicastRemoteObject implements CommunicationChannelClient{
+
+	private static final long serialVersionUID = 4618051069367331679L;
+
+	protected RmiCommunicationChannelClient() throws RemoteException {
+		super();
+	}
+
+	public void addCatalog(Catalog catalog) throws Exception {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void addCatalog(String catalogId, Index index) throws Exception {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void addCatalog(String catalogId, Index index,
+			List<Dictionary> dictionaries) throws Exception {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void addCatalog(String catalogId, Index index,
+			List<Dictionary> dictionaries, boolean restrictQueryPermission,
+			boolean restrictIngestPermission) throws Exception {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void addDictionary(String catalogId, Dictionary dictionary)
+			throws Exception {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void addPluginUrls(List<PluginURL> pluginUrls) throws Exception {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void delete(Metadata metadata) throws Exception {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public List<TransactionalMetadata> getAllPages(QueryPager queryPager)
+			throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public Properties getCalalogProperties() throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public Properties getCalalogProperties(String catalogUrn) throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public TransactionId<?> getCatalogServiceTransactionId(
+			TransactionId<?> catalogTransactionId, String catalogUrn)
+			throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public TransactionId<?> getCatalogServiceTransactionId(
+			CatalogReceipt catalogReceipt, boolean generateNew)
+			throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public List<TransactionId<?>> getCatalogServiceTransactionIds(
+			List<TransactionId<?>> catalogTransactionIds, String catalogUrn)
+			throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public Set<String> getCurrentCatalogIds() throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public List<TransactionalMetadata> getMetadata(Page page) throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public List<TransactionalMetadata> getMetadataFromTransactionIdStrings(
+			List<String> catalogServiceTransactionIdStrings) throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public List<TransactionalMetadata> getMetadataFromTransactionIds(
+			List<TransactionId<?>> catalogServiceTransactionIds)
+			throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public Page getNextPage(Page page) throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public List<TransactionalMetadata> getNextPage(QueryPager queryPager)
+			throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public Page getPage(PageInfo pageInfo, QueryExpression queryExpression)
+			throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public Page getPage(PageInfo pageInfo, QueryExpression queryExpression,
+			Set<String> catalogIds) throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public URL getPluginStorageDir() throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public List<PluginURL> getPluginUrls() throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public List<String> getProperty(String key) throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public List<TransactionId<?>> getTransactionIdsForAllPages(
+			QueryPager queryPager) throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public TransactionReceipt ingest(Metadata metadata) throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public boolean isRestrictIngestPermissions() throws Exception {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean isRestrictQueryPermissions() throws Exception {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public void modifyIngestPermission(String catalogId,
+			boolean restrictIngestPermission) throws Exception {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void modifyQueryPermission(String catalogId,
+			boolean restrictQueryPermission) throws Exception {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public QueryPager query(QueryExpression queryExpression) throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public QueryPager query(QueryExpression queryExpression,
+			Set<String> catalogIds) throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void removeCatalog(String catalogUrn) throws Exception {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void replaceCatalog(Catalog catalog) throws Exception {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void replaceDictionaries(String catalogId,
+			List<Dictionary> dictionaries) throws Exception {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void replaceIndex(String catalogId, Index index) throws Exception {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void shutdown() throws Exception {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void transferUrl(URL fromUrl, URL toUrl) throws Exception {
+		// TODO Auto-generated method stub
+		
+	}
+
+}

Added: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/rmi/RmiCommunicationChannelClientInterface.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/rmi/RmiCommunicationChannelClientInterface.java?rev=1002752&view=auto
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/rmi/RmiCommunicationChannelClientInterface.java (added)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/rmi/RmiCommunicationChannelClientInterface.java Wed Sep 29 17:19:09 2010
@@ -0,0 +1,107 @@
+/*
+ * 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.
+ */
+package org.apache.oodt.cas.catalog.server.channel.rmi;
+
+//JDK imports
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+
+//OODT imports
+import org.apache.oodt.cas.catalog.mapping.IngestMapper;
+import org.apache.oodt.cas.catalog.metadata.TransactionalMetadata;
+import org.apache.oodt.cas.catalog.page.QueryPager;
+import org.apache.oodt.cas.catalog.query.QueryExpression;
+import org.apache.oodt.cas.catalog.repository.CatalogRepository;
+import org.apache.oodt.cas.catalog.struct.TransactionId;
+import org.apache.oodt.cas.catalog.system.Catalog;
+import org.apache.oodt.cas.metadata.Metadata;
+
+/**
+ * 
+ * @author bfoster
+ * @version $Revision$
+ *
+ */
+public interface RmiCommunicationChannelClientInterface extends Remote {
+	
+	public void setCatalogRepository(CatalogRepository catalogRepository);
+	
+	public CatalogRepository getCatalogRepository() throws Exception;
+	
+	public IngestMapper getIngestMapper() throws RemoteException;
+
+	public void setIngestMapper(IngestMapper ingestMapper) throws RemoteException;
+
+	public boolean isRestrictQueryPermissions() throws RemoteException;
+
+	public void setRestrictQueryPermissions(boolean restrictQueryPermissions) throws RemoteException;
+
+	public boolean isHasIngestPermissions() throws RemoteException;
+
+	public void setHasIngestPermissions(boolean restrictIngestPermissions) throws RemoteException;
+
+	public Class<? extends TransactionId<?>> getTransactionIdClass() throws RemoteException;
+
+	public void setTransactionIdClass(Class<? extends TransactionId<?>> transactionIdClass) throws RemoteException;
+
+	public void addCatalog(Catalog catalog) throws RemoteException;
+	
+	public void addCatalog(Catalog catalog, boolean allowOverride) throws RemoteException;
+	
+	public void removeCatalog(String catalogUrn) throws RemoteException;
+
+	public void removeCatalog(String catalogUrn, boolean preserveMapping) throws RemoteException;
+
+	public Set<Catalog> getCurrentCatalogList() throws RemoteException;
+	
+	public Catalog getCatalog(String catalogUrn) throws RemoteException;
+
+	public Set<String> getCurrentCatalogIds() throws RemoteException;
+		
+	public TransactionId<?> ingest(Metadata metadata) throws RemoteException;
+	
+	public void delete(Metadata metadata) throws RemoteException;
+	
+	public List<String> getProperty(String key) throws RemoteException;
+
+	public Properties getCalalogProperties() throws RemoteException;
+	
+	public Properties getCalalogProperties(String catalogUrn) throws RemoteException;
+	
+	public QueryPager query(QueryExpression queryExpression) throws RemoteException;
+	
+	public QueryPager query(QueryExpression queryExpression, boolean sortResults) throws RemoteException;
+ 
+	public Set<TransactionalMetadata> getNextPage(QueryPager queryPager) throws RemoteException;
+
+	public Set<TransactionId<?>> getTransactionIdsForAllPages(QueryPager queryPager) throws RemoteException;
+	
+	public Set<TransactionalMetadata> getAllPages(QueryPager queryPager) throws RemoteException;
+	
+	public Set<TransactionalMetadata> getMetadataFromTransactionIdStrings(List<String> catalogServiceTransactionIdStrings) throws RemoteException;
+	
+	public Set<TransactionalMetadata> getMetadataFromTransactionIds(List<TransactionId<?>> catalogServiceTransactionIds) throws RemoteException;
+	
+	public Set<TransactionId<?>> getCatalogServiceTransactionIds(List<TransactionId<?>> catalogTransactionIds, String catalogUrn) throws RemoteException;
+	
+	public TransactionId<?> getCatalogServiceTransactionId(TransactionId<?> catalogTransactionId, String catalogUrn) throws RemoteException;
+	
+	public TransactionId<?> getCatalogServiceTransactionId(TransactionId<?> catalogTransactionId, String catalogUrn, boolean generateNew) throws RemoteException;
+}

Added: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/rmi/RmiCommunicationChannelClientMBean.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/rmi/RmiCommunicationChannelClientMBean.java?rev=1002752&view=auto
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/rmi/RmiCommunicationChannelClientMBean.java (added)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/rmi/RmiCommunicationChannelClientMBean.java Wed Sep 29 17:19:09 2010
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+package org.apache.oodt.cas.catalog.server.channel.rmi;
+
+/**
+ * 
+ * @author bfoster
+ * @version $Revision$
+ *
+ */
+public interface RmiCommunicationChannelClientMBean {
+
+}



Mime
View raw message