diff --git a/bundles/org.eclipse.passage.loc.yars.api/META-INF/MANIFEST.MF b/bundles/org.eclipse.passage.loc.yars.api/META-INF/MANIFEST.MF new file mode 100644 index 000000000..3e11afd9a --- /dev/null +++ b/bundles/org.eclipse.passage.loc.yars.api/META-INF/MANIFEST.MF @@ -0,0 +1,10 @@ +Manifest-Version: 1.0 +Automatic-Module-Name: org.eclipse.passage.loc.yars.api +Bundle-ManifestVersion: 2 +Bundle-SymbolicName: org.eclipse.passage.loc.yars.api +Bundle-Version: 0.1.0.qualifier +Bundle-Name: %Bundle-Name +Bundle-Vendor: %Bundle-Vendor +Bundle-Copyright: %Bundle-Copyright +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: org.eclipse.passage.loc.yars.internal.api;x-internal:=true diff --git a/bundles/org.eclipse.passage.loc.yars.api/OSGI-INF/l10n/bundle.properties b/bundles/org.eclipse.passage.loc.yars.api/OSGI-INF/l10n/bundle.properties new file mode 100644 index 000000000..a2eeff4c4 --- /dev/null +++ b/bundles/org.eclipse.passage.loc.yars.api/OSGI-INF/l10n/bundle.properties @@ -0,0 +1,23 @@ +#Properties file for org.eclipse.passage.loc.yars.api +############################################################################### +# Copyright (c) 2019 ArSysOp and others +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License 2.0 which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# ArSysOp - initial API and implementation +############################################################################### + +Bundle-Name = Passage LOC YARS API +Bundle-Vendor = Eclipse Passage +Bundle-Copyright = Copyright (c) 2019 ArSysOp and others.\n\ +\n\ +This program and the accompanying materials are made\n\ +available under the terms of the Eclipse Public License 2.0\n\ +which is available at https://www.eclipse.org/legal/epl-2.0/\n\ +\n\ +SPDX-License-Identifier: EPL-2.0\n\ diff --git a/bundles/org.eclipse.passage.loc.yars.api/about.html b/bundles/org.eclipse.passage.loc.yars.api/about.html new file mode 100644 index 000000000..164f781a8 --- /dev/null +++ b/bundles/org.eclipse.passage.loc.yars.api/about.html @@ -0,0 +1,36 @@ + + + + +About + + +

About This Content

+ +

November 30, 2017

+

License

+ +

+ The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at http://www.eclipse.org/legal/epl-2.0. + For purposes of the EPL, "Program" will mean the Content. +

+ +

+ If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at http://www.eclipse.org. +

+ + + \ No newline at end of file diff --git a/bundles/org.eclipse.passage.loc.yars.api/build.properties b/bundles/org.eclipse.passage.loc.yars.api/build.properties new file mode 100644 index 000000000..90d02d2c1 --- /dev/null +++ b/bundles/org.eclipse.passage.loc.yars.api/build.properties @@ -0,0 +1,19 @@ +############################################################################### +# Copyright (c) 2019 ArSysOp and others +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License 2.0 which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# ArSysOp - initial API and implementation +############################################################################### + +source.. = src/ +output.. = target/classes/ +bin.includes = META-INF/,\ + .,\ + OSGI-INF/,\ + about.html diff --git a/bundles/org.eclipse.passage.loc.yars.api/src/org/eclipse/passage/loc/yars/internal/api/ExportData.java b/bundles/org.eclipse.passage.loc.yars.api/src/org/eclipse/passage/loc/yars/internal/api/ExportData.java new file mode 100644 index 000000000..33ebe7262 --- /dev/null +++ b/bundles/org.eclipse.passage.loc.yars.api/src/org/eclipse/passage/loc/yars/internal/api/ExportData.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright (c) 2019 ArSysOp + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * ArSysOp - initial API and implementation + *******************************************************************************/ +package org.eclipse.passage.loc.yars.internal.api; + +/** + *

Represent data ready for export.

+ *

Actual export can be done by {@linkplain ListMedia}

+ * + * @since 0.1 + */ +public interface ExportData { + + void write(ListMedia media); + +} diff --git a/bundles/org.eclipse.passage.loc.yars.api/src/org/eclipse/passage/loc/yars/internal/api/FetchParams.java b/bundles/org.eclipse.passage.loc.yars.api/src/org/eclipse/passage/loc/yars/internal/api/FetchParams.java new file mode 100644 index 000000000..76af6dc0b --- /dev/null +++ b/bundles/org.eclipse.passage.loc.yars.api/src/org/eclipse/passage/loc/yars/internal/api/FetchParams.java @@ -0,0 +1,20 @@ +/******************************************************************************* + * Copyright (c) 2019 ArSysOp + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * ArSysOp - initial API and implementation + *******************************************************************************/ +package org.eclipse.passage.loc.yars.internal.api; + +public interface FetchParams { + + final class Empty implements FetchParams{ + + } +} diff --git a/bundles/org.eclipse.passage.loc.yars.api/src/org/eclipse/passage/loc/yars/internal/api/FetchedData.java b/bundles/org.eclipse.passage.loc.yars.api/src/org/eclipse/passage/loc/yars/internal/api/FetchedData.java new file mode 100644 index 000000000..521be9946 --- /dev/null +++ b/bundles/org.eclipse.passage.loc.yars.api/src/org/eclipse/passage/loc/yars/internal/api/FetchedData.java @@ -0,0 +1,28 @@ +/******************************************************************************* + * Copyright (c) 2019 ArSysOp + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * ArSysOp - initial API and implementation + *******************************************************************************/ +package org.eclipse.passage.loc.yars.internal.api; + +import java.util.List; + +/** + * Aware of a particular {@linkplain Storage} structure, able to fetch data from + * it according to encapsulated business logic. + * + * @since 0.1 + */ +@SuppressWarnings("unused") +public interface FetchedData, R> { + + List get(); + +} diff --git a/bundles/org.eclipse.passage.loc.yars.api/src/org/eclipse/passage/loc/yars/internal/api/ListMedia.java b/bundles/org.eclipse.passage.loc.yars.api/src/org/eclipse/passage/loc/yars/internal/api/ListMedia.java new file mode 100644 index 000000000..c9fc62826 --- /dev/null +++ b/bundles/org.eclipse.passage.loc.yars.api/src/org/eclipse/passage/loc/yars/internal/api/ListMedia.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2019 ArSysOp + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * ArSysOp - initial API and implementation + *******************************************************************************/ +package org.eclipse.passage.loc.yars.internal.api; + +public interface ListMedia { + + default ListMedia start() { + return this; + } + + default ListMedia finish() { + return this; + } + + default ListMedia startNode(@SuppressWarnings("unused") T node) { + return this; + } + + default ListMedia finishNode(@SuppressWarnings("unused") T node) { + return this; + } + + default ListMedia inner(// + @SuppressWarnings("unused") String data, // + @SuppressWarnings("unused") String name) { + return this; + } + + C content(); + +} diff --git a/bundles/org.eclipse.passage.loc.yars.api/src/org/eclipse/passage/loc/yars/internal/api/Query.java b/bundles/org.eclipse.passage.loc.yars.api/src/org/eclipse/passage/loc/yars/internal/api/Query.java new file mode 100644 index 000000000..6efd886c3 --- /dev/null +++ b/bundles/org.eclipse.passage.loc.yars.api/src/org/eclipse/passage/loc/yars/internal/api/Query.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright (c) 2019 ArSysOp + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * ArSysOp - initial API and implementation + *******************************************************************************/ +package org.eclipse.passage.loc.yars.internal.api; + +public interface Query, R, P extends FetchParams> { + + String id(); + + String description(); + + FetchedData data(S storage, P properties); + +} diff --git a/bundles/org.eclipse.passage.loc.yars.api/src/org/eclipse/passage/loc/yars/internal/api/Storage.java b/bundles/org.eclipse.passage.loc.yars.api/src/org/eclipse/passage/loc/yars/internal/api/Storage.java new file mode 100644 index 000000000..a4c94aea8 --- /dev/null +++ b/bundles/org.eclipse.passage.loc.yars.api/src/org/eclipse/passage/loc/yars/internal/api/Storage.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright (c) 2019 ArSysOp + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * ArSysOp - initial API and implementation + *******************************************************************************/ +package org.eclipse.passage.loc.yars.internal.api; + +/** + *

+ * Base is an abstraction of an information storage. + *

+ *

+ * The interface is parameterized with the type of a single unit of an + * information. + *

+ *

+ * A base can cover user registry or set of files, or be physically organized as + * the author desires. + *

+ *

+ * The only contract here is the type of core entity. + *

+ * + * @since 0.1 + */ +@SuppressWarnings("unused") +public interface Storage { + +} diff --git a/releng/org.eclipse.passage.loc.aggregator/pom.xml b/releng/org.eclipse.passage.loc.aggregator/pom.xml index 0103b0501..621de35a2 100644 --- a/releng/org.eclipse.passage.loc.aggregator/pom.xml +++ b/releng/org.eclipse.passage.loc.aggregator/pom.xml @@ -68,6 +68,9 @@ ../../releng/org.eclipse.passage.loc.repository ../../products/org.eclipse.passage.loc.operator.product + + ../../bundles/org.eclipse.passage.loc.yars.api + \ No newline at end of file