Package org.apache.maven.index.reader
Class Record
- java.lang.Object
-
- org.apache.maven.index.reader.Record
-
public final class Record extends java.lang.Object
Maven 2 Index record.- Since:
- 5.1.2
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Record.EntryKey<T>
Entry key is field key with some metadata.static class
Record.Type
Types of returned records returned from index.
-
Field Summary
Fields Modifier and Type Field Description static Record.EntryKey<java.lang.String[]>
ALL_GROUPS
Key of all groups list entry, that containsList
.static Record.EntryKey<java.lang.String>
ARTIFACT_ID
Key of artifact artifactId entry, that containsString
.static Record.EntryKey<java.lang.String>
CLASSIFIER
Key of artifact classifier entry, that containsString
.static Record.EntryKey<java.lang.String[]>
CLASSNAMES
Key of artifact contained class names, that containsList
.static Record.EntryKey<java.lang.String>
DESCRIPTION
Key of artifact description (as set in POM), that containsString
.private java.util.Map<Record.EntryKey,java.lang.Object>
expanded
static Record.EntryKey<java.lang.String>
FILE_EXTENSION
Key of artifact file extension, that containsString
.static Record.EntryKey<java.lang.Long>
FILE_MODIFIED
Key of artifact file last modified timestamp, that containsLong
.static Record.EntryKey<java.lang.Long>
FILE_SIZE
Key of artifact file size in bytes, that containsLong
.static Record.EntryKey<java.lang.String>
GROUP_ID
Key of artifact groupId entry, that containsString
.static Record.EntryKey<java.lang.Boolean>
HAS_JAVADOC
Key of artifact Javadoc presence flag, that containsBoolean
.static Record.EntryKey<java.lang.Boolean>
HAS_SIGNATURE
Key of artifact signature presence flag, that containsBoolean
.static Record.EntryKey<java.lang.Boolean>
HAS_SOURCES
Key of artifact Sources presence flag, that containsBoolean
.static Record.EntryKey<java.lang.String>
NAME
Key of artifact name (as set in POM), that containsString
.static Record.EntryKey<java.lang.String>
OSGI_BREE
Key of deprecated OSGi "Bundle-RequiredExecutionEnvironment" manifest entry, that containsString
.static Record.EntryKey<java.lang.String>
OSGI_BUNDLE_DESCRIPTION
Key of OSGi "Bundle-Description" manifest entry, that containsString
.static Record.EntryKey<java.lang.String>
OSGI_BUNDLE_LICENSE
Key of OSGi "Bundle-License" manifest entry, that containsString
.static Record.EntryKey<java.lang.String>
OSGI_BUNDLE_NAME
Key of OSGi "Bundle-Name" manifest entry, that containsString
.static Record.EntryKey<java.lang.String>
OSGI_BUNDLE_SYMBOLIC_NAME
Key of OSGi "Bundle-SymbolicName" manifest entry, that containsString
.static Record.EntryKey<java.lang.String>
OSGI_BUNDLE_VERSION
Key of OSGi "Bundle-Version" manifest entry, that containsString
.static Record.EntryKey<java.lang.String>
OSGI_EXPORT_DOCURL
Key of OSGi "Bundle-DocURL" manifest entry, that containsString
.static Record.EntryKey<java.lang.String>
OSGI_EXPORT_PACKAGE
Key of OSGi "Export-Package" manifest entry, that containsString
.static Record.EntryKey<java.lang.String>
OSGI_EXPORT_SERVICE
Key of OSGi "Export-Service" manifest entry, that containsString
.static Record.EntryKey<java.lang.String>
OSGI_FRAGMENT_HOST
Key of OSGi "Fragment-Host" manifest entry, that containsString
.static Record.EntryKey<java.lang.String>
OSGI_IMPORT_PACKAGE
Key of OSGi "Import-Package" manifest entry, that containsString
.static Record.EntryKey<java.lang.String>
OSGI_PROVIDE_CAPABILITY
Key of OSGi "Provide-Capability" manifest entry, that containsString
.static Record.EntryKey<java.lang.String>
OSGI_REQUIRE_BUNDLE
Key of OSGi "Require-Bundle" manifest entry, that containsString
.static Record.EntryKey<java.lang.String>
OSGI_REQUIRE_CAPABILITY
Key of OSGi "Require-Capability" manifest entry, that containsString
.static Record.EntryKey<java.lang.String>
PACKAGING
Key of artifact packaging entry, that containsString
.static Record.EntryKey<java.lang.String[]>
PLUGIN_GOALS
Key of plugin artifact goals, that containsList
.static Record.EntryKey<java.lang.String>
PLUGIN_PREFIX
Key of plugin artifact prefix, that containsString
.static Record.EntryKey<java.lang.Long>
REC_MODIFIED
Key of index record modification (added to index or removed from index) timestamp entry, that containsLong
.static Record.EntryKey<java.lang.String>
REPOSITORY_ID
Key of repository ID entry, that containsString
.static Record.EntryKey<java.lang.String[]>
ROOT_GROUPS
Key of root groups list entry, that containsList
.static Record.EntryKey<java.lang.String>
SHA_256
Key for SHA-256 checksum needed for OSGI content capability that containsString
.static Record.EntryKey<java.lang.String>
SHA1
Key of artifact SHA1 digest, that containsString
.private Record.Type
type
static Record.EntryKey<java.lang.String>
VERSION
Key of artifact version entry, that containsString
.
-
Constructor Summary
Constructors Constructor Description Record(Record.Type type, java.util.Map<Record.EntryKey,java.lang.Object> expanded)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) boolean
containsKey(Record.EntryKey<?> entryKey)
Returnstrue
if this record contains givenRecord.EntryKey
.<T> T
get(Record.EntryKey<T> entryKey)
Type safe handy method to get value from expanded map.java.util.Map<Record.EntryKey,java.lang.Object>
getExpanded()
Returns the expanded (processed and expanded synthetic fields) record asMap
ready for consumption.Record.Type
getType()
Returns theRecord.Type
of this record.<T> T
put(Record.EntryKey<T> entryKey, T value)
Type safe handy method to put value to expanded map.java.lang.String
toString()
-
-
-
Field Detail
-
REPOSITORY_ID
public static final Record.EntryKey<java.lang.String> REPOSITORY_ID
Key of repository ID entry, that containsString
.
-
ALL_GROUPS
public static final Record.EntryKey<java.lang.String[]> ALL_GROUPS
Key of all groups list entry, that containsList
.
-
ROOT_GROUPS
public static final Record.EntryKey<java.lang.String[]> ROOT_GROUPS
Key of root groups list entry, that containsList
.
-
REC_MODIFIED
public static final Record.EntryKey<java.lang.Long> REC_MODIFIED
Key of index record modification (added to index or removed from index) timestamp entry, that containsLong
.
-
GROUP_ID
public static final Record.EntryKey<java.lang.String> GROUP_ID
Key of artifact groupId entry, that containsString
.
-
ARTIFACT_ID
public static final Record.EntryKey<java.lang.String> ARTIFACT_ID
Key of artifact artifactId entry, that containsString
.
-
VERSION
public static final Record.EntryKey<java.lang.String> VERSION
Key of artifact version entry, that containsString
.
-
CLASSIFIER
public static final Record.EntryKey<java.lang.String> CLASSIFIER
Key of artifact classifier entry, that containsString
.
-
PACKAGING
public static final Record.EntryKey<java.lang.String> PACKAGING
Key of artifact packaging entry, that containsString
.
-
FILE_EXTENSION
public static final Record.EntryKey<java.lang.String> FILE_EXTENSION
Key of artifact file extension, that containsString
.
-
FILE_MODIFIED
public static final Record.EntryKey<java.lang.Long> FILE_MODIFIED
Key of artifact file last modified timestamp, that containsLong
.
-
FILE_SIZE
public static final Record.EntryKey<java.lang.Long> FILE_SIZE
Key of artifact file size in bytes, that containsLong
.
-
HAS_SOURCES
public static final Record.EntryKey<java.lang.Boolean> HAS_SOURCES
Key of artifact Sources presence flag, that containsBoolean
.
-
HAS_JAVADOC
public static final Record.EntryKey<java.lang.Boolean> HAS_JAVADOC
Key of artifact Javadoc presence flag, that containsBoolean
.
-
HAS_SIGNATURE
public static final Record.EntryKey<java.lang.Boolean> HAS_SIGNATURE
Key of artifact signature presence flag, that containsBoolean
.
-
NAME
public static final Record.EntryKey<java.lang.String> NAME
Key of artifact name (as set in POM), that containsString
.
-
DESCRIPTION
public static final Record.EntryKey<java.lang.String> DESCRIPTION
Key of artifact description (as set in POM), that containsString
.
-
SHA1
public static final Record.EntryKey<java.lang.String> SHA1
Key of artifact SHA1 digest, that containsString
.
-
CLASSNAMES
public static final Record.EntryKey<java.lang.String[]> CLASSNAMES
Key of artifact contained class names, that containsList
. Extracted byJarFileContentsIndexCreator
.
-
PLUGIN_PREFIX
public static final Record.EntryKey<java.lang.String> PLUGIN_PREFIX
Key of plugin artifact prefix, that containsString
. Extracted byMavenPluginArtifactInfoIndexCreator
.
-
PLUGIN_GOALS
public static final Record.EntryKey<java.lang.String[]> PLUGIN_GOALS
Key of plugin artifact goals, that containsList
. Extracted byMavenPluginArtifactInfoIndexCreator
.
-
OSGI_BUNDLE_SYMBOLIC_NAME
public static final Record.EntryKey<java.lang.String> OSGI_BUNDLE_SYMBOLIC_NAME
Key of OSGi "Bundle-SymbolicName" manifest entry, that containsString
. Extracted byOsgiArtifactIndexCreator
.
-
OSGI_BUNDLE_VERSION
public static final Record.EntryKey<java.lang.String> OSGI_BUNDLE_VERSION
Key of OSGi "Bundle-Version" manifest entry, that containsString
. Extracted byOsgiArtifactIndexCreator
.
-
OSGI_EXPORT_PACKAGE
public static final Record.EntryKey<java.lang.String> OSGI_EXPORT_PACKAGE
Key of OSGi "Export-Package" manifest entry, that containsString
. Extracted byOsgiArtifactIndexCreator
.
-
OSGI_EXPORT_SERVICE
public static final Record.EntryKey<java.lang.String> OSGI_EXPORT_SERVICE
Key of OSGi "Export-Service" manifest entry, that containsString
. Extracted byOsgiArtifactIndexCreator
.
-
OSGI_BUNDLE_DESCRIPTION
public static final Record.EntryKey<java.lang.String> OSGI_BUNDLE_DESCRIPTION
Key of OSGi "Bundle-Description" manifest entry, that containsString
. Extracted byOsgiArtifactIndexCreator
.
-
OSGI_BUNDLE_NAME
public static final Record.EntryKey<java.lang.String> OSGI_BUNDLE_NAME
Key of OSGi "Bundle-Name" manifest entry, that containsString
. Extracted byOsgiArtifactIndexCreator
.
-
OSGI_BUNDLE_LICENSE
public static final Record.EntryKey<java.lang.String> OSGI_BUNDLE_LICENSE
Key of OSGi "Bundle-License" manifest entry, that containsString
. Extracted byOsgiArtifactIndexCreator
.
-
OSGI_EXPORT_DOCURL
public static final Record.EntryKey<java.lang.String> OSGI_EXPORT_DOCURL
Key of OSGi "Bundle-DocURL" manifest entry, that containsString
. Extracted byOsgiArtifactIndexCreator
.
-
OSGI_IMPORT_PACKAGE
public static final Record.EntryKey<java.lang.String> OSGI_IMPORT_PACKAGE
Key of OSGi "Import-Package" manifest entry, that containsString
. Extracted byOsgiArtifactIndexCreator
.
-
OSGI_REQUIRE_BUNDLE
public static final Record.EntryKey<java.lang.String> OSGI_REQUIRE_BUNDLE
Key of OSGi "Require-Bundle" manifest entry, that containsString
. Extracted byOsgiArtifactIndexCreator
.
-
OSGI_PROVIDE_CAPABILITY
public static final Record.EntryKey<java.lang.String> OSGI_PROVIDE_CAPABILITY
Key of OSGi "Provide-Capability" manifest entry, that containsString
. Extracted byOsgiArtifactIndexCreator
.
-
OSGI_REQUIRE_CAPABILITY
public static final Record.EntryKey<java.lang.String> OSGI_REQUIRE_CAPABILITY
Key of OSGi "Require-Capability" manifest entry, that containsString
. Extracted byOsgiArtifactIndexCreator
.
-
OSGI_FRAGMENT_HOST
public static final Record.EntryKey<java.lang.String> OSGI_FRAGMENT_HOST
Key of OSGi "Fragment-Host" manifest entry, that containsString
. Extracted byOsgiArtifactIndexCreator
.
-
OSGI_BREE
public static final Record.EntryKey<java.lang.String> OSGI_BREE
Key of deprecated OSGi "Bundle-RequiredExecutionEnvironment" manifest entry, that containsString
. Extracted byOsgiArtifactIndexCreator
.
-
SHA_256
public static final Record.EntryKey<java.lang.String> SHA_256
Key for SHA-256 checksum needed for OSGI content capability that containsString
. Extracted byOsgiArtifactIndexCreator
.
-
type
private final Record.Type type
-
expanded
private final java.util.Map<Record.EntryKey,java.lang.Object> expanded
-
-
Constructor Detail
-
Record
public Record(Record.Type type, java.util.Map<Record.EntryKey,java.lang.Object> expanded)
-
-
Method Detail
-
getType
public Record.Type getType()
Returns theRecord.Type
of this record. Usually users would be interested inRecord.Type.ARTIFACT_ADD
andRecord.Type.ARTIFACT_REMOVE
types only to maintain their own index. Still, indexer offers extra records too, seeRecord.Type
for all existing types.
-
getExpanded
public java.util.Map<Record.EntryKey,java.lang.Object> getExpanded()
Returns the expanded (processed and expanded synthetic fields) record asMap
ready for consumption.
-
containsKey
boolean containsKey(Record.EntryKey<?> entryKey)
Returnstrue
if this record contains givenRecord.EntryKey
.
-
get
public <T> T get(Record.EntryKey<T> entryKey)
Type safe handy method to get value from expanded map.
-
put
public <T> T put(Record.EntryKey<T> entryKey, T value)
Type safe handy method to put value to expanded map. Acceptsnull
values, that removes the mapping.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-