diff --git a/CHANGELOG.md b/CHANGELOG.md index e4b5245dbc12a643c35bf1be072f50876ff15b45..28485a6443649cbb9105d5c242e6c77b07b6a228 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 c0da6fc8e29fce2015a753e2b009dfa9ce4f6545..0000000000000000000000000000000000000000 --- 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 0f1f6f67fa47fec8bdede30d9b8ff0f7cafbc6a9..0000000000000000000000000000000000000000 --- 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 5e41046e37670a201efe7ba57f17295331190b7e..0000000000000000000000000000000000000000 --- 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 89bf0160f0d44654f17912ccd6684254ec0d3e19..0000000000000000000000000000000000000000 --- 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 459214e5d2d87e515ec6ec5193851f71d07ce4a3..0000000000000000000000000000000000000000 --- 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 9a9b2abfa3c18fbe835f43fd76b6c1b2eedbcf5a..0000000000000000000000000000000000000000 --- 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); -}