Skip to content

Commit

Permalink
Add classes from org.eclipse.oomph.p2.core to read eclipse index files
Browse files Browse the repository at this point in the history
  • Loading branch information
laeubi committed Jan 17, 2025
1 parent 80ae655 commit db64bb9
Show file tree
Hide file tree
Showing 2 changed files with 654 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* Copyright (c) 2014, 2016 Eike Stepper (Loehne, Germany) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* Eike Stepper - initial API and implementation
*/
package org.eclipse.oomph.p2.internal.core;

import org.eclipse.emf.common.util.URI;

import org.eclipse.equinox.p2.metadata.Version;

import java.util.Map;
import java.util.Set;

/**
* @author Eike Stepper
*/
public interface P2Index
{
public static final int SIMPLE_REPOSITORY = 0;

public static final int COMPOSED_REPOSITORY = 1;

public static final P2Index INSTANCE = P2IndexImpl.INSTANCE;

public Repository[] getRepositories();

public Map<String, Set<String>> getCapabilities();

public Map<Repository, Set<Version>> lookupCapabilities(String namespace, String name);

public Map<Repository, Set<Version>> generateCapabilitiesFromComposedRepositories(Map<Repository, Set<Version>> capabilitiesFromSimpleRepositories);

/**
* @author Eike Stepper
*/
public interface Repository extends Comparable<Repository>
{
public URI getLocation();

public int getID();

public boolean isComposed();

public boolean isCompressed();

public long getTimestamp();

public int getCapabilityCount();

public int getUnresolvedChildren();

public Repository[] getChildren();

public Repository[] getComposites();
}
}
Loading

0 comments on commit db64bb9

Please sign in to comment.