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