From 0d462cf35d042f080779cdd71b523c925bc36c63 Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman <jeffrey.freeman@syncleus.com> Date: Wed, 26 Oct 2016 21:23:21 -0400 Subject: [PATCH] Removed several deprecated classes. Change-Id: Ifad9c13df7ccd0e750288ef793c262627c4343cd --- CHANGELOG.md | 2 +- .../com/syncleus/ferma/FramingIterable.java | 75 ------------ .../syncleus/ferma/FramingVertexIterable.java | 29 ----- src/main/java/com/syncleus/ferma/Path.java | 40 ------- src/main/java/com/syncleus/ferma/RunMe.java | 26 ----- src/main/java/com/syncleus/ferma/Storage.java | 109 ------------------ .../java/com/syncleus/ferma/VoidFunction.java | 20 ---- 7 files changed, 1 insertion(+), 300 deletions(-) delete mode 100644 src/main/java/com/syncleus/ferma/FramingIterable.java delete mode 100644 src/main/java/com/syncleus/ferma/FramingVertexIterable.java delete mode 100644 src/main/java/com/syncleus/ferma/Path.java delete mode 100644 src/main/java/com/syncleus/ferma/RunMe.java delete mode 100644 src/main/java/com/syncleus/ferma/Storage.java delete mode 100644 src/main/java/com/syncleus/ferma/VoidFunction.java diff --git a/CHANGELOG.md b/CHANGELOG.md index e4b5245d..28485a64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## 3.0.1 - +* Removed the following deprecated classes: FramingIterable, FramingVertexIterable, Path, RunMe, Storage, and VoidFunction. ## 3.0.0 diff --git a/src/main/java/com/syncleus/ferma/FramingIterable.java b/src/main/java/com/syncleus/ferma/FramingIterable.java deleted file mode 100644 index c0da6fc8..00000000 --- a/src/main/java/com/syncleus/ferma/FramingIterable.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright 2004 - 2016 Syncleus, Inc. - * - * Licensed 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. - */ -/* - * Part or all of this source file was forked from a third-party project, the details of which are listed below. - * - * Source Project: TinkerPop Frames - * Source URL: https://github.com/tinkerpop/frames - * Source License: BSD 3-clause - * When: November, 25th 2014 - */ -package com.syncleus.ferma; - -import org.apache.tinkerpop.gremlin.structure.Element; - -import java.util.Iterator; - -public abstract class FramingIterable<T, E extends Element> implements Iterable<T> { - - private final Class<T> kind; - private final Iterable<E> iterable; - private final FramedGraph framedGraph; - private final boolean explicit; - - public FramingIterable(final FramedGraph framedGraph, final Iterable<E> iterable, final Class<T> kind) { - this.framedGraph = framedGraph; - this.iterable = iterable; - this.kind = kind; - this.explicit = false; - } - - public FramingIterable(final FramedGraph framedGraph, final Iterable<E> iterable, final Class<T> kind, final boolean explicit) { - this.framedGraph = framedGraph; - this.iterable = iterable; - this.kind = kind; - this.explicit = explicit; - } - - @Override - public Iterator<T> iterator() { - return new Iterator<T>() { - private final Iterator<E> iterator = iterable.iterator(); - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - - @Override - public boolean hasNext() { - return this.iterator.hasNext(); - } - - @Override - public T next() { - if (explicit) - return framedGraph.frameElementExplicit(this.iterator.next(), kind); - else - return framedGraph.frameElement(this.iterator.next(), kind); - } - }; - } -} diff --git a/src/main/java/com/syncleus/ferma/FramingVertexIterable.java b/src/main/java/com/syncleus/ferma/FramingVertexIterable.java deleted file mode 100644 index 0f1f6f67..00000000 --- a/src/main/java/com/syncleus/ferma/FramingVertexIterable.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright 2004 - 2016 Syncleus, Inc. - * - * Licensed 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 com.syncleus.ferma; - -import org.apache.tinkerpop.gremlin.structure.Vertex; - -public class FramingVertexIterable<T> extends FramingIterable<T, Vertex> { - - public FramingVertexIterable(final FramedGraph framedGraph, final Iterable<Vertex> iterable, final Class<T> kind) { - super(framedGraph, iterable, kind); - } - - public FramingVertexIterable(final FramedGraph framedGraph, final Iterable<Vertex> iterable, final Class<T> kind, final boolean explicit) { - super(framedGraph, iterable, kind, explicit); - } -} diff --git a/src/main/java/com/syncleus/ferma/Path.java b/src/main/java/com/syncleus/ferma/Path.java deleted file mode 100644 index 5e41046e..00000000 --- a/src/main/java/com/syncleus/ferma/Path.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright 2004 - 2016 Syncleus, Inc. - * - * Licensed 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. - */ -/* - * Part or all of this source file was forked from a third-party project, the details of which are listed below. - * - * Source Project: Totorom - * Source URL: https://github.com/BrynCooke/totorom - * Source License: Apache Public License v2.0 - * When: November, 20th 2014 - */ -package com.syncleus.ferma; - -import java.util.ArrayList; - -public class Path extends ArrayList<Object> { - - public <T> T get(final int index, final Class<T> clazz) { - - final T object = (T) get(index); - if (object instanceof TVertex) - return (T) ((TVertex) object).reframe((Class) clazz); - if (object instanceof TEdge) - return (T) ((TEdge) object).reframe((Class) clazz); - return object; - } - -} diff --git a/src/main/java/com/syncleus/ferma/RunMe.java b/src/main/java/com/syncleus/ferma/RunMe.java deleted file mode 100644 index 89bf0160..00000000 --- a/src/main/java/com/syncleus/ferma/RunMe.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright 2004 - 2016 Syncleus, Inc. - * - * Licensed 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 com.syncleus.ferma; - -public class RunMe { - public static void main(final String[] args) { - System.out.println("implementation version: " + RunMe.class.getPackage().getImplementationVersion()); - System.out.println("implementation vendor: " + RunMe.class.getPackage().getImplementationVendor()); - System.out.println("implementation title: " + RunMe.class.getPackage().getImplementationTitle()); - System.out.println("Specification version: " + RunMe.class.getPackage().getSpecificationVersion()); - System.out.println("Specification vendor: " + RunMe.class.getPackage().getSpecificationVendor()); - } -} diff --git a/src/main/java/com/syncleus/ferma/Storage.java b/src/main/java/com/syncleus/ferma/Storage.java deleted file mode 100644 index 459214e5..00000000 --- a/src/main/java/com/syncleus/ferma/Storage.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright 2004 - 2016 Syncleus, Inc. - * - * Licensed 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. - */ -/* - * Part or all of this source file was forked from a third-party project, the details of which are listed below. - * - * Source Project: Totorom - * Source URL: https://github.com/BrynCooke/totorom - * Source License: Apache Public License v2.0 - * When: November, 20th 2014 - */ -package com.syncleus.ferma; - -import java.util.Collection; -import java.util.Iterator; - -/** - * Used to store a single value. Useful for the store step. - * - * @param <T> The type of the value stored in this collection. - */ -public class Storage<T> implements Collection<T> { - - private T e; - - @Override - public int size() { - throw new UnsupportedOperationException(); - } - - @Override - public boolean isEmpty() { - throw new UnsupportedOperationException(); - } - - @Override - public boolean contains(final Object o) { - throw new UnsupportedOperationException(); - } - - @Override - public Iterator<T> iterator() { - throw new UnsupportedOperationException(); - } - - @Override - public Object[] toArray() { - throw new UnsupportedOperationException(); - } - - @Override - public <Z> Z[] toArray(final Z[] ts) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean add(final T e) { - this.e = e; - return true; - } - - @Override - public boolean remove(final Object o) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean containsAll(final Collection<?> collection) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean addAll(final Collection<? extends T> collection) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean removeAll(final Collection<?> collection) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean retainAll(final Collection<?> collection) { - throw new UnsupportedOperationException(); - } - - @Override - public void clear() { - throw new UnsupportedOperationException(); - } - - public T get() { - - return e; - } - -} diff --git a/src/main/java/com/syncleus/ferma/VoidFunction.java b/src/main/java/com/syncleus/ferma/VoidFunction.java deleted file mode 100644 index 9a9b2abf..00000000 --- a/src/main/java/com/syncleus/ferma/VoidFunction.java +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright 2004 - 2016 Syncleus, Inc. - * - * Licensed 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 com.syncleus.ferma; - -public interface VoidFunction<T> { - void apply(T input); -} -- GitLab