Coverage Report - org.apache.maven.index.ArtifactInfoRecord
 
Classes in this File Line Coverage Branch Coverage Complexity
ArtifactInfoRecord
100 %
4/4
N/A
0
 
 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.io.Serializable;
 23  
 import java.util.regex.Pattern;
 24  
 
 25  
 import org.apache.lucene.document.Field.Index;
 26  
 import org.apache.lucene.document.Field.Store;
 27  
 
 28  
 /**
 29  
  * Pulling out ArtifactInfo, clearing up. TBD. This gonna be extensible "map-like" class with fields.
 30  
  * 
 31  
  * @author cstamas
 32  
  */
 33  239986
 public class ArtifactInfoRecord
 34  
     implements Serializable
 35  
 {
 36  
     private static final long serialVersionUID = -4577081994768263824L;
 37  
 
 38  
     /** Field separator */
 39  
     public static final String FS = "|";
 40  
 
 41  1
     public static final Pattern FS_PATTERN = Pattern.compile( Pattern.quote( FS ) );
 42  
 
 43  
     /** Non available value */
 44  
     public static final String NA = "NA";
 45  
 
 46  
     // ----------
 47  
     // V3 changes
 48  
     // TODO: use getters instead of public fields
 49  
     // ----------
 50  
     // Listing all the fields that ArtifactInfo has on LuceneIndex
 51  
 
 52  
     /**
 53  
      * Unique groupId, artifactId, version, classifier, extension (or packaging). Stored, indexed untokenized
 54  
      */
 55  1
     public static final IndexerField FLD_UINFO = new IndexerField( NEXUS.UINFO, IndexerFieldVersion.V1, "u",
 56  
         "Artifact UINFO (as keyword, stored)", Store.YES, Index.NOT_ANALYZED );
 57  
 
 58  
     /**
 59  
      * Del: contains UINFO to mark record as deleted (needed for incremental updates!). The original document IS
 60  
      * removed, but this marker stays on index to note that fact.
 61  
      */
 62  1
     public static final IndexerField FLD_DELETED = new IndexerField( NEXUS.DELETED, IndexerFieldVersion.V1, "del",
 63  
         "Deleted field, will contain UINFO if document is deleted from index (not indexed, stored)", Store.YES,
 64  
         Index.NO );
 65  
 
 66  
 }