View Javadoc
1   package org.apache.maven.index;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0    
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import java.util.ArrayList;
23  import java.util.Arrays;
24  import java.util.Collection;
25  import java.util.Comparator;
26  import java.util.HashMap;
27  import java.util.List;
28  import java.util.Map;
29  
30  import org.apache.maven.index.artifact.Gav;
31  import org.apache.maven.index.creator.JarFileContentsIndexCreator;
32  import org.apache.maven.index.creator.MavenPluginArtifactInfoIndexCreator;
33  import org.apache.maven.index.creator.MinimalArtifactInfoIndexCreator;
34  import org.apache.maven.index.creator.OsgiArtifactIndexCreator;
35  import org.eclipse.aether.util.version.GenericVersionScheme;
36  import org.eclipse.aether.version.InvalidVersionSpecificationException;
37  import org.eclipse.aether.version.Version;
38  import org.eclipse.aether.version.VersionScheme;
39  
40  /**
41   * ArtifactInfo holds the values known about an repository artifact. This is a simple Value Object kind of stuff.
42   * Phasing out.
43   * 
44   * @author Jason van Zyl
45   * @author Eugene Kuleshov
46   */
47  public class ArtifactInfo
48      extends ArtifactInfoRecord
49  {
50      private static final long serialVersionUID = 6028843453477511105L;
51  
52      // --
53  
54      public static final String ROOT_GROUPS = "rootGroups";
55  
56      public static final String ROOT_GROUPS_VALUE = "rootGroups";
57  
58      public static final String ROOT_GROUPS_LIST = "rootGroupsList";
59  
60      public static final String ALL_GROUPS = "allGroups";
61  
62      public static final String ALL_GROUPS_VALUE = "allGroups";
63  
64      public static final String ALL_GROUPS_LIST = "allGroupsList";
65  
66      // ----------
67  
68      /**
69       * Unique groupId, artifactId, version, classifier, extension (or packaging). Stored, indexed untokenized
70       */
71      public static final String UINFO = FLD_UINFO.getKey();
72  
73      /**
74       * Field that contains {@link #UINFO} value for deleted artifact
75       */
76      public static final String DELETED = FLD_DELETED.getKey();
77  
78      /**
79       * GroupId. Not stored, indexed untokenized
80       */
81      public static final String GROUP_ID = MinimalArtifactInfoIndexCreator.FLD_GROUP_ID_KW.getKey();
82  
83      /**
84       * ArtifactId. Not stored, indexed tokenized
85       */
86      public static final String ARTIFACT_ID = MinimalArtifactInfoIndexCreator.FLD_ARTIFACT_ID_KW.getKey();
87  
88      /**
89       * Version. Not stored, indexed tokenized
90       */
91      public static final String VERSION = MinimalArtifactInfoIndexCreator.FLD_VERSION_KW.getKey();
92  
93      /**
94       * Packaging. Not stored, indexed untokenized
95       */
96      public static final String PACKAGING = MinimalArtifactInfoIndexCreator.FLD_PACKAGING.getKey();
97  
98      /**
99       * Classifier. Not stored, indexed untokenized
100      */
101     public static final String CLASSIFIER = MinimalArtifactInfoIndexCreator.FLD_CLASSIFIER.getKey();
102 
103     /**
104      * Info: packaging, lastModified, size, sourcesExists, javadocExists, signatureExists. Stored, not indexed.
105      */
106     public static final String INFO = MinimalArtifactInfoIndexCreator.FLD_INFO.getKey();
107 
108     /**
109      * Name. Stored, not indexed
110      */
111     public static final String NAME = MinimalArtifactInfoIndexCreator.FLD_NAME.getKey();
112 
113     /**
114      * Description. Stored, not indexed
115      */
116     public static final String DESCRIPTION = MinimalArtifactInfoIndexCreator.FLD_DESCRIPTION.getKey();
117 
118     /**
119      * Last modified. Stored, not indexed
120      */
121     public static final String LAST_MODIFIED = MinimalArtifactInfoIndexCreator.FLD_LAST_MODIFIED.getKey();
122 
123     /**
124      * SHA1. Stored, indexed untokenized
125      */
126     public static final String SHA1 = MinimalArtifactInfoIndexCreator.FLD_SHA1.getKey();
127 
128     /**
129      * Class names Stored compressed, indexed tokenized
130      */
131     public static final String NAMES = JarFileContentsIndexCreator.FLD_CLASSNAMES_KW.getKey();
132 
133     /**
134      * Plugin prefix. Stored, not indexed
135      */
136     public static final String PLUGIN_PREFIX = MavenPluginArtifactInfoIndexCreator.FLD_PLUGIN_PREFIX.getKey();
137 
138     /**
139      * Plugin goals. Stored, not indexed
140      */
141     public static final String PLUGIN_GOALS = MavenPluginArtifactInfoIndexCreator.FLD_PLUGIN_GOALS.getKey();
142 
143 
144     /**
145      * @since 1.4.2
146      */
147     public static final String BUNDLE_SYMBOLIC_NAME = OsgiArtifactIndexCreator.FLD_BUNDLE_SYMBOLIC_NAME.getKey();
148 
149     /**
150      * @since 1.4.2
151      */
152     public static final String BUNDLE_VERSION = OsgiArtifactIndexCreator.FLD_BUNDLE_VERSION.getKey();
153 
154     /**
155      * @since 1.4.2
156      */
157     public static final String BUNDLE_EXPORT_PACKAGE = OsgiArtifactIndexCreator.FLD_BUNDLE_EXPORT_PACKAGE.getKey();
158     /**
159      * OSGI Provide-Capability header
160      *
161      * @since 5.1.2
162      */
163     public static final String BUNDLE_PROVIDE_CAPABILITY =
164             OsgiArtifactIndexCreator.FLD_BUNDLE_PROVIDE_CAPABILITY.getKey();
165     /**
166      * OSGI Provide-Capability header
167      *
168      * @since 5.1.2
169      */
170     public static final String BUNDLE_REQUIRE_CAPABILITY =
171             OsgiArtifactIndexCreator.FLD_BUNDLE_REQUIRE_CAPABILITY.getKey();
172     public static final Comparator<ArtifactInfo> VERSION_COMPARATOR = new VersionComparator();
173 
174     public static final Comparator<ArtifactInfo> REPOSITORY_VERSION_COMPARATOR = new RepositoryVersionComparator();
175 
176     public static final Comparator<ArtifactInfo> CONTEXT_VERSION_COMPARATOR = new ContextVersionComparator();
177 
178     private String fileName;
179 
180     private String fileExtension;
181 
182     private String groupId;
183 
184     private String artifactId;
185 
186     private String version;
187 
188     private transient Version artifactVersion;
189 
190     private transient float luceneScore;
191 
192     private String classifier;
193 
194     /**
195      * Artifact packaging for the main artifact and extension for secondary artifact (no classifier)
196      */
197     private String packaging;
198 
199     private String name;
200 
201     private String description;
202 
203     private long lastModified = -1;
204 
205     private long size = -1;
206 
207     private String md5;
208 
209     private String sha1;
210 
211     private ArtifactAvailability sourcesExists = ArtifactAvailability.NOT_PRESENT;
212 
213     private ArtifactAvailability javadocExists = ArtifactAvailability.NOT_PRESENT;
214 
215     private ArtifactAvailability signatureExists = ArtifactAvailability.NOT_PRESENT;
216 
217     private String classNames;
218 
219     private String repository;
220 
221     private String path;
222 
223     private String remoteUrl;
224 
225     private String context;
226 
227     /**
228      * Plugin goal prefix (only if packaging is "maven-plugin")
229      */
230     private String prefix;
231 
232     /**
233      * Plugin goals (only if packaging is "maven-plugin")
234      */
235     private List<String> goals;
236 
237     /**
238      * contains osgi metadata Bundle-Version if available
239      * @since 4.1.2
240      */
241     private String bundleVersion;
242 
243     /**
244      * contains osgi metadata Bundle-SymbolicName if available
245      * @since 4.1.2
246      */
247     private String bundleSymbolicName;
248 
249     /**
250      * contains osgi metadata Export-Package if available
251      * @since 4.1.2
252      */
253     private String bundleExportPackage;
254 
255     /**
256      * contains osgi metadata Export-Service if available
257      * @since 4.1.2
258      */
259     private String bundleExportService;
260 
261     /**
262      * contains osgi metadata Bundle-Description if available
263      * @since 4.1.2
264      */
265     private String bundleDescription;
266 
267     /**
268      * contains osgi metadata Bundle-Name if available
269      * @since 4.1.2
270      */
271     private String bundleName;
272 
273     /**
274      * contains osgi metadata Bundle-License if available
275      * @since 4.1.2
276      */
277     private String bundleLicense;
278 
279     /**
280      * contains osgi metadata Bundle-DocURL if available
281      * @since 4.1.2
282      */
283     private String bundleDocUrl;
284 
285     /**
286      * contains osgi metadata Import-Package if available
287      * @since 4.1.2
288      */
289     private String bundleImportPackage;
290 
291     /**
292      * contains osgi metadata Require-Bundle if available
293      * @since 4.1.2
294      */
295     private String bundleRequireBundle;
296 
297 
298     /**
299      * contains osgi metadata Provide-Capability if available
300      *
301      * @since 5.1.2
302      */
303     private String bundleProvideCapability;
304     /**
305      * contains osgi metadata Require-Capability if available
306      *
307      * @since 5.1.2
308      */
309     private String bundleRequireCapability;
310     /**
311      * sha256 digest (for OSGI repository resolvers)
312      *
313      * @since 5.1.2
314      */
315     private String sha256;
316     /**
317      * bundle Fragment Host
318      *
319      * @since 5.1.2
320      */
321     private String bundleFragmentHost;
322 
323 
324     /**
325      * bundle required execution environment
326      *
327      * @since 5.1.2
328      */
329     private String bundleRequiredExecutionEnvironment;
330 
331     private final Map<String, String> attributes = new HashMap<>();
332 
333     private final List<MatchHighlight> matchHighlights = new ArrayList<>();
334 
335     private final transient VersionScheme versionScheme;
336 
337     public ArtifactInfo()
338     {
339         versionScheme = new GenericVersionScheme();
340     }
341 
342     public ArtifactInfo( String repository, String groupId, String artifactId, String version, String classifier,
343                          String extension )
344     {
345         this();
346         this.repository = repository;
347         this.groupId = groupId;
348         this.artifactId = artifactId;
349         this.version = version;
350         this.classifier = classifier;
351         this.fileExtension = extension;
352     }
353 
354     public Version getArtifactVersion()
355     {
356         if ( artifactVersion == null )
357         {
358             try
359             {
360                 artifactVersion = versionScheme.parseVersion( version );
361             }
362             catch ( InvalidVersionSpecificationException e )
363             {
364                 // will not happen, only with version ranges but we should not have those
365                 // we handle POM versions here, not dependency versions
366             }
367         }
368 
369         return artifactVersion;
370     }
371 
372     public float getLuceneScore()
373     {
374         return luceneScore;
375     }
376 
377     public void setLuceneScore( float score )
378     {
379         this.luceneScore = score;
380     }
381 
382     public String getUinfo()
383     {
384         return groupId + FS + artifactId + FS + version + FS + nvl( classifier ) + FS + fileExtension;
385         // extension is stored in the packaging field when classifier is not used
386         // .append( StringUtils.isEmpty( classifier ) || StringUtils.isEmpty( packaging ) ? "" : FS + packaging ) //
387     }
388 
389     public String getRootGroup()
390     {
391         int n = groupId.indexOf( '.' );
392         if ( n > -1 )
393         {
394             return groupId.substring( 0, n );
395         }
396         return groupId;
397     }
398 
399     public Gav calculateGav()
400     {
401         return new Gav( groupId, artifactId, version, classifier, fileExtension, null, // snapshotBuildNumber
402             null, // snapshotTimeStamp
403             fileName, // name
404             false, // hash
405             null, // hashType
406             false, // signature
407             null ); // signatureType
408     }
409 
410     public Map<String, String> getAttributes()
411     {
412         return attributes;
413     }
414 
415     public List<MatchHighlight> getMatchHighlights()
416     {
417         return matchHighlights;
418     }
419 
420     @Override
421     public String toString()
422     {
423         final StringBuilder result = new StringBuilder( getUinfo() );
424         String packaging = getPackaging();
425         if ( packaging != null && !getPackaging().isEmpty() )
426         {
427             result.append( "[" ).append( getPackaging() ).append( "]" );
428         }
429         return result.toString();
430     }
431 
432     private static final List<Field> DEFAULT_FIELDS = new ArrayList<>();
433     static
434     {
435         DEFAULT_FIELDS.add( MAVEN.GROUP_ID );
436         DEFAULT_FIELDS.add( MAVEN.ARTIFACT_ID );
437         DEFAULT_FIELDS.add( MAVEN.VERSION );
438         DEFAULT_FIELDS.add( MAVEN.PACKAGING );
439         DEFAULT_FIELDS.add( MAVEN.CLASSIFIER );
440         DEFAULT_FIELDS.add( MAVEN.SHA1 );
441         DEFAULT_FIELDS.add( MAVEN.NAME );
442         DEFAULT_FIELDS.add( MAVEN.DESCRIPTION );
443         DEFAULT_FIELDS.add( MAVEN.CLASSNAMES );
444         DEFAULT_FIELDS.add( MAVEN.REPOSITORY_ID );
445     }
446 
447     private List<Field> fields;
448 
449     public Collection<Field> getFields()
450     {
451         if ( fields == null )
452         {
453             fields = new ArrayList<>( DEFAULT_FIELDS.size() );
454 
455             fields.addAll( DEFAULT_FIELDS );
456         }
457 
458         return fields;
459     }
460 
461     /**
462      * This method will disappear, once we drop ArtifactInfo.
463      * 
464      * @param field
465      * @return
466      */
467     public String getFieldValue( Field field )
468     {
469         if ( MAVEN.GROUP_ID.equals( field ) )
470         {
471             return groupId;
472         }
473         else if ( MAVEN.ARTIFACT_ID.equals( field ) )
474         {
475             return artifactId;
476         }
477         else if ( MAVEN.VERSION.equals( field ) )
478         {
479             return version;
480         }
481         else if ( MAVEN.PACKAGING.equals( field ) )
482         {
483             return packaging;
484         }
485         else if ( MAVEN.CLASSIFIER.equals( field ) )
486         {
487             return classifier;
488         }
489         else if ( MAVEN.SHA1.equals( field ) )
490         {
491             return sha1;
492         }
493         else if ( MAVEN.NAME.equals( field ) )
494         {
495             return name;
496         }
497         else if ( MAVEN.DESCRIPTION.equals( field ) )
498         {
499             return description;
500         }
501         else if ( MAVEN.CLASSNAMES.equals( field ) )
502         {
503             return classNames;
504         }
505         else if ( MAVEN.REPOSITORY_ID.equals( field ) )
506         {
507             return repository;
508         }
509 
510         // no match
511         return null;
512     }
513 
514     public ArtifactInfo setFieldValue( Field field, String value )
515     {
516         if ( MAVEN.GROUP_ID.equals( field ) )
517         {
518             groupId = value;
519         }
520         else if ( MAVEN.ARTIFACT_ID.equals( field ) )
521         {
522             artifactId = value;
523         }
524         else if ( MAVEN.VERSION.equals( field ) )
525         {
526             version = value;
527         }
528         else if ( MAVEN.PACKAGING.equals( field ) )
529         {
530             packaging = value;
531         }
532         else if ( MAVEN.CLASSIFIER.equals( field ) )
533         {
534             classifier = value;
535         }
536         else if ( MAVEN.SHA1.equals( field ) )
537         {
538             sha1 = value;
539         }
540         else if ( MAVEN.NAME.equals( field ) )
541         {
542             name = value;
543         }
544         else if ( MAVEN.DESCRIPTION.equals( field ) )
545         {
546             description = value;
547         }
548         else if ( MAVEN.CLASSNAMES.equals( field ) )
549         {
550             classNames = value;
551         }
552         else if ( MAVEN.REPOSITORY_ID.equals( field ) )
553         {
554             repository = value;
555         }
556 
557         // no match
558         return this;
559     }
560 
561     // ----------------------------------------------------------------------------
562     // Utils
563     // ----------------------------------------------------------------------------
564 
565     public static String nvl( String v )
566     {
567         return v == null ? NA : v;
568     }
569 
570     public static String renvl( String v )
571     {
572         return NA.equals( v ) ? null : v;
573     }
574 
575     public static String lst2str( Collection<String> list )
576     {
577         StringBuilder sb = new StringBuilder();
578         for ( String s : list )
579         {
580             sb.append( s ).append( ArtifactInfo.FS );
581         }
582         return sb.length() == 0 ? sb.toString() : sb.substring( 0, sb.length() - 1 );
583     }
584 
585     public static List<String> str2lst( String str )
586     {
587         return Arrays.asList( ArtifactInfo.FS_PATTERN.split( str ) );
588     }
589 
590     /**
591      * A version comparator
592      */
593     static class VersionComparator
594         implements Comparator<ArtifactInfo>
595     {
596         public int compare( final ArtifactInfo f1, final ArtifactInfo f2 )
597         {
598             int n = f1.groupId.compareTo( f2.groupId );
599             if ( n != 0 )
600             {
601                 return n;
602             }
603 
604             n = f1.artifactId.compareTo( f2.artifactId );
605             if ( n != 0 )
606             {
607                 return n;
608             }
609 
610             n = -f1.getArtifactVersion().compareTo( f2.getArtifactVersion() );
611             if ( n != 0 )
612             {
613                 return n;
614             }
615 
616             {
617                 final String c1 = f1.classifier;
618                 final String c2 = f2.classifier;
619                 if ( c1 == null )
620                 {
621                     if ( c2 != null )
622                     {
623                         return -1;
624                     }
625                 }
626                 else
627                 {
628                     if ( c2 == null )
629                     {
630                         return 1;
631                     }
632 
633                     n = c1.compareTo( c2 );
634                     if ( n != 0 )
635                     {
636                         return n;
637                     }
638                 }
639             }
640 
641             {
642                 final String p1 = f1.packaging;
643                 final String p2 = f2.packaging;
644                 if ( p1 == null )
645                 {
646                     return p2 == null ? 0 : -1;
647                 }
648                 else
649                 {
650                     return p2 == null ? 1 : p1.compareTo( p2 );
651                 }
652             }
653         }
654     }
655 
656     /**
657      * A repository and version comparator
658      */
659     static class RepositoryVersionComparator
660         extends VersionComparator
661     {
662         @Override
663         public int compare( final ArtifactInfo f1, final ArtifactInfo f2 )
664         {
665             final int n = super.compare( f1, f2 );
666             if ( n != 0 )
667             {
668                 return n;
669             }
670 
671             final String r1 = f1.repository;
672             final String r2 = f2.repository;
673             if ( r1 == null )
674             {
675                 return r2 == null ? 0 : -1;
676             }
677             else
678             {
679                 return r2 == null ? 1 : r1.compareTo( r2 );
680             }
681         }
682     }
683     
684     /**
685      * A context and version comparator
686      */
687     static class ContextVersionComparator
688         extends VersionComparator
689     {
690         @Override
691         public int compare( final ArtifactInfo f1, final ArtifactInfo f2 )
692         {
693             final int n = super.compare( f1, f2 );
694             if ( n != 0 )
695             {
696                 return n;
697             }
698 
699             final String r1 = f1.context;
700             final String r2 = f2.context;
701             if ( r1 == null )
702             {
703                 return r2 == null ? 0 : -1;
704             }
705             else
706             {
707                 return r2 == null ? 1 : r1.compareTo( r2 );
708             }
709         }
710     }
711 
712     public String getFileName( )
713     {
714         return fileName;
715     }
716 
717     public void setFileName( String fileName )
718     {
719         this.fileName = fileName;
720     }
721 
722     public String getFileExtension( )
723     {
724         return fileExtension;
725     }
726 
727     public void setFileExtension( String fileExtension )
728     {
729         this.fileExtension = fileExtension;
730     }
731 
732     public String getGroupId( )
733     {
734         return groupId;
735     }
736 
737     public void setGroupId( String groupId )
738     {
739         this.groupId = groupId;
740     }
741 
742     public String getArtifactId( )
743     {
744         return artifactId;
745     }
746 
747     public void setArtifactId( String artifactId )
748     {
749         this.artifactId = artifactId;
750     }
751 
752     public String getVersion( )
753     {
754         return version;
755     }
756 
757     public void setVersion( String version )
758     {
759         this.version = version;
760     }
761 
762     public void setArtifactVersion( Version artifactVersion )
763     {
764         this.artifactVersion = artifactVersion;
765     }
766 
767     public String getClassifier( )
768     {
769         return classifier;
770     }
771 
772     public void setClassifier( String classifier )
773     {
774         this.classifier = classifier;
775     }
776 
777     public String getPackaging( )
778     {
779         return packaging;
780     }
781 
782     public void setPackaging( String packaging )
783     {
784         this.packaging = packaging;
785     }
786 
787     public String getName( )
788     {
789         return name;
790     }
791 
792     public void setName( String name )
793     {
794         this.name = name;
795     }
796 
797     public String getDescription( )
798     {
799         return description;
800     }
801 
802     public void setDescription( String description )
803     {
804         this.description = description;
805     }
806 
807     public long getLastModified( )
808     {
809         return lastModified;
810     }
811 
812     public void setLastModified( long lastModified )
813     {
814         this.lastModified = lastModified;
815     }
816 
817     public long getSize( )
818     {
819         return size;
820     }
821 
822     public void setSize( long size )
823     {
824         this.size = size;
825     }
826 
827     public String getMd5( )
828     {
829         return md5;
830     }
831 
832     public void setMd5( String md5 )
833     {
834         this.md5 = md5;
835     }
836 
837     public String getSha1( )
838     {
839         return sha1;
840     }
841 
842     public void setSha1( String sha1 )
843     {
844         this.sha1 = sha1;
845     }
846 
847     public ArtifactAvailability getSourcesExists( )
848     {
849         return sourcesExists;
850     }
851 
852     public void setSourcesExists( ArtifactAvailability sourcesExists )
853     {
854         this.sourcesExists = sourcesExists;
855     }
856 
857     public ArtifactAvailability getJavadocExists( )
858     {
859         return javadocExists;
860     }
861 
862     public void setJavadocExists( ArtifactAvailability javadocExists )
863     {
864         this.javadocExists = javadocExists;
865     }
866 
867     public ArtifactAvailability getSignatureExists( )
868     {
869         return signatureExists;
870     }
871 
872     public void setSignatureExists( ArtifactAvailability signatureExists )
873     {
874         this.signatureExists = signatureExists;
875     }
876 
877     public String getClassNames( )
878     {
879         return classNames;
880     }
881 
882     public void setClassNames( String classNames )
883     {
884         this.classNames = classNames;
885     }
886 
887     public String getRepository( )
888     {
889         return repository;
890     }
891 
892     public void setRepository( String repository )
893     {
894         this.repository = repository;
895     }
896 
897     public String getPath( )
898     {
899         return path;
900     }
901 
902     public void setPath( String path )
903     {
904         this.path = path;
905     }
906 
907     public String getRemoteUrl( )
908     {
909         return remoteUrl;
910     }
911 
912     public void setRemoteUrl( String remoteUrl )
913     {
914         this.remoteUrl = remoteUrl;
915     }
916 
917     public String getContext( )
918     {
919         return context;
920     }
921 
922     public void setContext( String context )
923     {
924         this.context = context;
925     }
926 
927     public String getPrefix( )
928     {
929         return prefix;
930     }
931 
932     public void setPrefix( String prefix )
933     {
934         this.prefix = prefix;
935     }
936 
937     public List<String> getGoals( )
938     {
939         return goals;
940     }
941 
942     public void setGoals( List<String> goals )
943     {
944         this.goals = goals;
945     }
946 
947     public String getBundleVersion( )
948     {
949         return bundleVersion;
950     }
951 
952     public void setBundleVersion( String bundleVersion )
953     {
954         this.bundleVersion = bundleVersion;
955     }
956 
957     public String getBundleSymbolicName( )
958     {
959         return bundleSymbolicName;
960     }
961 
962     public void setBundleSymbolicName( String bundleSymbolicName )
963     {
964         this.bundleSymbolicName = bundleSymbolicName;
965     }
966 
967     public String getBundleExportPackage( )
968     {
969         return bundleExportPackage;
970     }
971 
972     public void setBundleExportPackage( String bundleExportPackage )
973     {
974         this.bundleExportPackage = bundleExportPackage;
975     }
976 
977     public String getBundleExportService( )
978     {
979         return bundleExportService;
980     }
981 
982     public void setBundleExportService( String bundleExportService )
983     {
984         this.bundleExportService = bundleExportService;
985     }
986 
987     public String getBundleDescription( )
988     {
989         return bundleDescription;
990     }
991 
992     public void setBundleDescription( String bundleDescription )
993     {
994         this.bundleDescription = bundleDescription;
995     }
996 
997     public String getBundleName( )
998     {
999         return bundleName;
1000     }
1001 
1002     public void setBundleName( String bundleName )
1003     {
1004         this.bundleName = bundleName;
1005     }
1006 
1007     public String getBundleLicense( )
1008     {
1009         return bundleLicense;
1010     }
1011 
1012     public void setBundleLicense( String bundleLicense )
1013     {
1014         this.bundleLicense = bundleLicense;
1015     }
1016 
1017     public String getBundleDocUrl( )
1018     {
1019         return bundleDocUrl;
1020     }
1021 
1022     public void setBundleDocUrl( String bundleDocUrl )
1023     {
1024         this.bundleDocUrl = bundleDocUrl;
1025     }
1026 
1027     public String getBundleImportPackage( )
1028     {
1029         return bundleImportPackage;
1030     }
1031 
1032     public void setBundleImportPackage( String bundleImportPackage )
1033     {
1034         this.bundleImportPackage = bundleImportPackage;
1035     }
1036 
1037     public String getBundleRequireBundle( )
1038     {
1039         return bundleRequireBundle;
1040     }
1041 
1042     public void setBundleRequireBundle( String bundleRequireBundle )
1043     {
1044         this.bundleRequireBundle = bundleRequireBundle;
1045     }
1046 
1047     public VersionScheme getVersionScheme( )
1048     {
1049         return versionScheme;
1050     }
1051 
1052     public void setFields( List<Field> fields )
1053     {
1054         this.fields = fields;
1055     }
1056 
1057     public String getBundleProvideCapability()
1058     {
1059         return bundleProvideCapability;
1060     }
1061 
1062     public void setBundleProvideCapability( String bundleProvideCapability )
1063     {
1064         this.bundleProvideCapability = bundleProvideCapability;
1065     }
1066 
1067     public String getBundleRequireCapability()
1068     {
1069         return bundleRequireCapability;
1070     }
1071 
1072     public void setBundleRequireCapability( String bundleRequireCapability )
1073     {
1074         this.bundleRequireCapability = bundleRequireCapability;
1075     }
1076 
1077     public String getSha256()
1078     {
1079         return sha256;
1080     }
1081 
1082     public void setSha256( String sha256 )
1083     {
1084         this.sha256 = sha256;
1085     }
1086 
1087     public String getBundleFragmentHost()
1088     {
1089         return bundleFragmentHost;
1090     }
1091 
1092     public void setBundleFragmentHost( String bundleFragmentHost )
1093     {
1094         this.bundleFragmentHost = bundleFragmentHost;
1095     }
1096 
1097     public String getBundleRequiredExecutionEnvironment()
1098     {
1099         return bundleRequiredExecutionEnvironment;
1100     }
1101 
1102     public void setBundleRequiredExecutionEnvironment( String bundleRequiredExecutionEnvironment )
1103     {
1104         this.bundleRequiredExecutionEnvironment = bundleRequiredExecutionEnvironment;
1105     }
1106 
1107 }