Skip to content

Commit a44a338

Browse files
committed
Add classes from org.eclipse.oomph.p2.core to read eclipse index files
1 parent 80ae655 commit a44a338

File tree

2 files changed

+654
-0
lines changed

2 files changed

+654
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*
2+
* Copyright (c) 2014, 2016 Eike Stepper (Loehne, Germany) and others.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v2.0
5+
* which accompanies this distribution, and is available at
6+
* http://www.eclipse.org/legal/epl-v20.html
7+
*
8+
* Contributors:
9+
* Eike Stepper - initial API and implementation
10+
*/
11+
package org.eclipse.oomph.p2.internal.core;
12+
13+
import org.eclipse.emf.common.util.URI;
14+
15+
import org.eclipse.equinox.p2.metadata.Version;
16+
17+
import java.util.Map;
18+
import java.util.Set;
19+
20+
/**
21+
* @author Eike Stepper
22+
*/
23+
public interface P2Index
24+
{
25+
public static final int SIMPLE_REPOSITORY = 0;
26+
27+
public static final int COMPOSED_REPOSITORY = 1;
28+
29+
public static final P2Index INSTANCE = P2IndexImpl.INSTANCE;
30+
31+
public Repository[] getRepositories();
32+
33+
public Map<String, Set<String>> getCapabilities();
34+
35+
public Map<Repository, Set<Version>> lookupCapabilities(String namespace, String name);
36+
37+
public Map<Repository, Set<Version>> generateCapabilitiesFromComposedRepositories(Map<Repository, Set<Version>> capabilitiesFromSimpleRepositories);
38+
39+
/**
40+
* @author Eike Stepper
41+
*/
42+
public interface Repository extends Comparable<Repository>
43+
{
44+
public URI getLocation();
45+
46+
public int getID();
47+
48+
public boolean isComposed();
49+
50+
public boolean isCompressed();
51+
52+
public long getTimestamp();
53+
54+
public int getCapabilityCount();
55+
56+
public int getUnresolvedChildren();
57+
58+
public Repository[] getChildren();
59+
60+
public Repository[] getComposites();
61+
}
62+
}

0 commit comments

Comments
 (0)