aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/metadata/metadata-model/src
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2010-03-09 08:00:25 +0000
committerBrett Porter <brett@apache.org>2010-03-09 08:00:25 +0000
commitcd9c1097d1aa5ef92dcd66002c125d33dfa13895 (patch)
treeb0f8f5eb22c3c36b6d40d4879308b11bb9495079 /archiva-modules/metadata/metadata-model/src
parentaf2a929978a21ddd615ab84e3b1bb4ebe3c7f3b7 (diff)
downloadarchiva-cd9c1097d1aa5ef92dcd66002c125d33dfa13895.tar.gz
archiva-cd9c1097d1aa5ef92dcd66002c125d33dfa13895.zip
[MRM-1282] start to implement maven metadata for artifacts, splitting from existing sources
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@920722 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/metadata/metadata-model/src')
-rw-r--r--archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ArtifactMetadata.java1
-rw-r--r--archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/FacetedMetadata.java54
-rw-r--r--archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java31
3 files changed, 56 insertions, 30 deletions
diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ArtifactMetadata.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ArtifactMetadata.java
index aee6c4b6b..b5b7307cd 100644
--- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ArtifactMetadata.java
+++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ArtifactMetadata.java
@@ -22,6 +22,7 @@ package org.apache.archiva.metadata.model;
import java.util.Date;
public class ArtifactMetadata
+ extends FacetedMetadata
{
private String id;
diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/FacetedMetadata.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/FacetedMetadata.java
new file mode 100644
index 000000000..a3df5e339
--- /dev/null
+++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/FacetedMetadata.java
@@ -0,0 +1,54 @@
+package org.apache.archiva.metadata.model;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+public class FacetedMetadata
+{
+ private Map<String, MetadataFacet> facets = new HashMap<String, MetadataFacet>();
+
+ public void addFacet( MetadataFacet metadataFacet )
+ {
+ this.facets.put( metadataFacet.getFacetId(), metadataFacet );
+ }
+
+ public MetadataFacet getFacet( String facetId )
+ {
+ return this.facets.get( facetId );
+ }
+
+ public Map<String, MetadataFacet> getFacets()
+ {
+ return facets;
+ }
+
+ public Collection<MetadataFacet> getFacetList()
+ {
+ return this.facets.values();
+ }
+
+ public Collection<String> getFacetIds()
+ {
+ return this.facets.keySet();
+ }
+}
diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java
index 9973c45c4..b61135e78 100644
--- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java
+++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java
@@ -20,12 +20,10 @@ package org.apache.archiva.metadata.model;
*/
import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
public class ProjectVersionMetadata
+ extends FacetedMetadata
{
private String id;
@@ -45,8 +43,6 @@ public class ProjectVersionMetadata
private List<License> licenses = new ArrayList<License>();
- private Map<String, MetadataFacet> facets = new HashMap<String, MetadataFacet>();
-
private List<MailingList> mailingLists = new ArrayList<MailingList>();
private List<Dependency> dependencies = new ArrayList<Dependency>();
@@ -153,31 +149,6 @@ public class ProjectVersionMetadata
this.licenses.add( license );
}
- public void addFacet( MetadataFacet metadataFacet )
- {
- this.facets.put( metadataFacet.getFacetId(), metadataFacet );
- }
-
- public MetadataFacet getFacet( String facetId )
- {
- return this.facets.get( facetId );
- }
-
- public Map<String, MetadataFacet> getFacets()
- {
- return facets;
- }
-
- public Collection<MetadataFacet> getFacetList()
- {
- return this.facets.values();
- }
-
- public Collection<String> getFacetIds()
- {
- return this.facets.keySet();
- }
-
public void setMailingLists( List<MailingList> mailingLists )
{
this.mailingLists = mailingLists;