Package org.eclipse.tycho.model
Class IU
- java.lang.Object
-
- org.eclipse.tycho.model.IU
-
public class IU extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringARTIFACTprivate static java.lang.StringARTIFACTSprivate static java.lang.StringCLASSIFIERprivate de.pdark.decentxml.Documentdocumentstatic java.lang.StringIDprivate de.pdark.decentxml.ElementiuDomstatic java.lang.StringNAMEstatic java.lang.StringNAMESPACEstatic java.lang.StringP2_IU_NAMESPACEprivate static de.pdark.decentxml.XMLParserparserprivate static java.lang.StringPROPERTIESprivate static java.lang.StringPROPERTYprivate static java.lang.StringPROVIDEDprivate static java.lang.StringPROVIDESstatic java.lang.StringRANGEprivate static java.lang.StringREQUIREDprivate static java.lang.StringREQUIRESstatic java.lang.StringSOURCE_FILE_NAMEprivate static java.lang.StringUNITstatic java.lang.StringVERSION
-
Constructor Summary
Constructors Constructor Description IU(de.pdark.decentxml.Document document, de.pdark.decentxml.Element element)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddArtifact(java.lang.String classifier, java.lang.String id, java.lang.String version)voidaddProperty(java.lang.String name, java.lang.String value)voidaddSelfCapability()java.util.List<de.pdark.decentxml.Element>getArtifacts()java.lang.StringgetId()java.util.List<de.pdark.decentxml.Element>getProperties()java.util.List<de.pdark.decentxml.Element>getProvidedCapabilites()java.util.List<de.pdark.decentxml.Element>getRequiredCapabilites()de.pdark.decentxml.ElementgetSelfArtifact()java.util.List<de.pdark.decentxml.Element>getSelfCapabilities()java.lang.StringgetVersion()static IUloadIU(java.io.File location)Convenience method to load p2iu.xml filestatic IUread(java.io.File file)voidsetVersion(java.lang.String version)static voidwrite(IU iu, java.io.File file)static voidwrite(IU iu, java.io.File file, java.lang.String indent)
-
-
-
Field Detail
-
SOURCE_FILE_NAME
public static final java.lang.String SOURCE_FILE_NAME
- See Also:
- Constant Field Values
-
UNIT
private static final java.lang.String UNIT
- See Also:
- Constant Field Values
-
ID
public static final java.lang.String ID
- See Also:
- Constant Field Values
-
VERSION
public static final java.lang.String VERSION
- See Also:
- Constant Field Values
-
NAMESPACE
public static final java.lang.String NAMESPACE
- See Also:
- Constant Field Values
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
PROPERTIES
private static final java.lang.String PROPERTIES
- See Also:
- Constant Field Values
-
PROPERTY
private static final java.lang.String PROPERTY
- See Also:
- Constant Field Values
-
REQUIRES
private static final java.lang.String REQUIRES
- See Also:
- Constant Field Values
-
REQUIRED
private static final java.lang.String REQUIRED
- See Also:
- Constant Field Values
-
RANGE
public static final java.lang.String RANGE
- See Also:
- Constant Field Values
-
ARTIFACTS
private static final java.lang.String ARTIFACTS
- See Also:
- Constant Field Values
-
CLASSIFIER
private static final java.lang.String CLASSIFIER
- See Also:
- Constant Field Values
-
ARTIFACT
private static final java.lang.String ARTIFACT
- See Also:
- Constant Field Values
-
PROVIDES
private static final java.lang.String PROVIDES
- See Also:
- Constant Field Values
-
PROVIDED
private static final java.lang.String PROVIDED
- See Also:
- Constant Field Values
-
P2_IU_NAMESPACE
public static final java.lang.String P2_IU_NAMESPACE
- See Also:
- Constant Field Values
-
parser
private static de.pdark.decentxml.XMLParser parser
-
document
private final de.pdark.decentxml.Document document
-
iuDom
private final de.pdark.decentxml.Element iuDom
-
-
Method Detail
-
getId
public java.lang.String getId()
-
getVersion
public java.lang.String getVersion()
-
setVersion
public void setVersion(java.lang.String version)
-
getProvidedCapabilites
public java.util.List<de.pdark.decentxml.Element> getProvidedCapabilites()
-
getSelfCapabilities
public java.util.List<de.pdark.decentxml.Element> getSelfCapabilities()
-
addSelfCapability
public void addSelfCapability()
-
getRequiredCapabilites
public java.util.List<de.pdark.decentxml.Element> getRequiredCapabilites()
-
getProperties
public java.util.List<de.pdark.decentxml.Element> getProperties()
-
addProperty
public void addProperty(java.lang.String name, java.lang.String value)
-
getArtifacts
public java.util.List<de.pdark.decentxml.Element> getArtifacts()
-
addArtifact
public void addArtifact(java.lang.String classifier, java.lang.String id, java.lang.String version)
-
getSelfArtifact
public de.pdark.decentxml.Element getSelfArtifact()
-
read
public static IU read(java.io.File file) throws java.io.IOException
- Throws:
java.io.IOException
-
loadIU
public static IU loadIU(java.io.File location)
Convenience method to load p2iu.xml file- Throws:
java.lang.RuntimeException- if iu descriptor can not be read or parsed.
-
write
public static void write(IU iu, java.io.File file) throws java.io.IOException
- Throws:
java.io.IOException
-
write
public static void write(IU iu, java.io.File file, java.lang.String indent) throws java.io.IOException
- Throws:
java.io.IOException
-
-