1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.repository.legacy.metadata;
20
21 import org.apache.maven.artifact.Artifact;
22
23
24
25
26
27
28 public abstract class AbstractArtifactMetadata implements ArtifactMetadata {
29 protected Artifact artifact;
30
31 protected AbstractArtifactMetadata(Artifact artifact) {
32 this.artifact = artifact;
33 }
34
35 public boolean storedInGroupDirectory() {
36 return false;
37 }
38
39 public String getGroupId() {
40 return artifact.getGroupId();
41 }
42
43 public String getArtifactId() {
44 return artifact.getArtifactId();
45 }
46
47 public String extendedToString() {
48 StringBuilder buffer = new StringBuilder(256);
49
50 buffer.append("\nArtifact Metadata\n--------------------------");
51 buffer.append("\nGroupId: ").append(getGroupId());
52 buffer.append("\nArtifactId: ").append(getArtifactId());
53 buffer.append("\nMetadata Type: ").append(getClass().getName());
54
55 return buffer.toString();
56 }
57 }