Examples of DocumentId


Examples of org.apache.ctakes.typesystem.type.structured.DocumentID

   
    File file = docs[index];
    String fn = file.getName();
    logger.info("Reading file: " + fn);
    fn = fn.substring(0, fn.lastIndexOf('.'));
    DocumentID docId = new DocumentID(jcas);
    docId.setDocumentID(fn);
    docId.addToIndexes();
   
    scanner = new Scanner(file);
    int lineNum = 1;
    int charNum = 0;
    while(scanner.hasNextLine()){
View Full Code Here

Examples of org.apache.hadoop.contrib.index.mapred.DocumentID

  /* (non-Javadoc)
   * @see org.apache.hadoop.mapred.RecordReader#createKey()
   */
  public DocumentID createKey() {
    return new DocumentID();
  }
View Full Code Here

Examples of org.hibernate.search.annotations.DocumentId

   */
  private Annotation getIdAnnotation(XProperty member, ConfigContext context) {
    Annotation idAnnotation = null;

    // check for explicit DocumentId
    DocumentId documentIdAnn = member.getAnnotation( DocumentId.class );
    if ( documentIdAnn != null ) {
      idAnnotation = documentIdAnn;
      documentIdAnnotatedMember = member;
    }
    // check for JPA @Id
View Full Code Here

Examples of org.hibernate.search.annotations.DocumentId

  private void checkForField(XClass classHostingMember, XProperty member, PropertiesMetadata propertiesMetadata, String prefix, ConfigContext context, PathsContext pathsContext) {
    org.hibernate.search.annotations.Field fieldAnn =
        member.getAnnotation( org.hibernate.search.annotations.Field.class );
    NumericField numericFieldAnn = member.getAnnotation( NumericField.class );
    DocumentId idAnn = member.getAnnotation( DocumentId.class );
    if ( fieldAnn != null ) {
      if ( isFieldInPath( fieldAnn, member, pathsContext, prefix ) || level <= maxLevel ) {
        bindFieldAnnotation( classHostingMember, member, propertiesMetadata, prefix, fieldAnn, numericFieldAnn, context );
      }
    }
View Full Code Here

Examples of org.hibernate.search.annotations.DocumentId

   */
  private Annotation getIdAnnotation(XProperty member, ConfigContext context) {
    Annotation idAnnotation = null;

    // check for explicit DocumentId
    DocumentId documentIdAnn = member.getAnnotation( DocumentId.class );
    if ( documentIdAnn != null ) {
      idAnnotation = documentIdAnn;
    }
    // check for JPA @Id
    else if ( context.isJpaPresent() ) {
View Full Code Here

Examples of org.hibernate.search.annotations.DocumentId

  private void checkForField(XProperty member, PropertiesMetadata propertiesMetadata, String prefix, ConfigContext context) {
    org.hibernate.search.annotations.Field fieldAnn =
        member.getAnnotation( org.hibernate.search.annotations.Field.class );
    NumericField numericFieldAnn = member.getAnnotation( NumericField.class );
    DocumentId idAnn = member.getAnnotation( DocumentId.class );
    if ( fieldAnn != null ) {
      bindFieldAnnotation( member, propertiesMetadata, prefix, fieldAnn, numericFieldAnn, context );
    }
    if ( ( fieldAnn == null && idAnn == null ) && numericFieldAnn != null ) {
      throw new SearchException( "@NumericField without a @Field on property '" + member.getName() + "'" );
View Full Code Here

Examples of org.hibernate.search.annotations.DocumentId

  }

  private void initializeMember(XProperty member, PropertiesMetadata propertiesMetadata, boolean isRoot,
                  String prefix, Set<XClass> processedClasses, InitContext context) {

    DocumentId documentIdAnn = member.getAnnotation( DocumentId.class );
    if ( documentIdAnn != null ) {
      if ( isRoot ) {
        if ( idKeywordName != null ) {
          throw new AssertionFailure( "Two document id assigned: "
              + idKeywordName + " and " + BinderHelper.getAttributeName( member, documentIdAnn.name() ) );
        }
        idKeywordName = prefix + BinderHelper.getAttributeName( member, documentIdAnn.name() );
        FieldBridge fieldBridge = BridgeFactory.guessType( null, member, reflectionManager );
        if ( fieldBridge instanceof TwoWayFieldBridge ) {
          idBridge = (TwoWayFieldBridge) fieldBridge;
        }
        else {
          throw new SearchException(
              "Bridge for document id does not implement TwoWayFieldBridge: " + member.getName() );
        }
        idBoost = getBoost( member, null );
        setAccessible( member );
        idGetter = member;
      }
      else {
        //component should index their document id
        setAccessible( member );
        propertiesMetadata.fieldGetters.add( member );
        String fieldName = prefix + BinderHelper.getAttributeName( member, documentIdAnn.name() );
        propertiesMetadata.fieldNames.add( fieldName );
        propertiesMetadata.fieldStore.add( getStore( Store.YES ) );
        propertiesMetadata.fieldIndex.add( getIndex( Index.UN_TOKENIZED ) );
        propertiesMetadata.fieldTermVectors.add( getTermVector( TermVector.NO ) );
        propertiesMetadata.fieldBridges.add( BridgeFactory.guessType( null, member, reflectionManager ) );
View Full Code Here

Examples of org.hibernate.search.annotations.DocumentId

   */
  private Annotation getIdAnnotation(XProperty member, TypeMetadata.Builder typeMetadataBuilder, ConfigContext context) {
    Annotation idAnnotation = null;

    // check for explicit DocumentId
    DocumentId documentIdAnnotation = member.getAnnotation( DocumentId.class );
    if ( documentIdAnnotation != null ) {
      idAnnotation = documentIdAnnotation;
    }
    // check for JPA @Id
    if ( context.isJpaPresent() ) {
View Full Code Here

Examples of org.hibernate.search.annotations.DocumentId

      ParseContext parseContext) {

    org.hibernate.search.annotations.Field fieldAnnotation =
        member.getAnnotation( org.hibernate.search.annotations.Field.class );
    NumericField numericFieldAnnotation = member.getAnnotation( NumericField.class );
    DocumentId idAnn = member.getAnnotation( DocumentId.class );
    if ( fieldAnnotation != null ) {
      if ( isFieldInPath( fieldAnnotation, member, pathsContext, prefix ) || !parseContext.isMaxLevelReached() ) {
        PropertyMetadata.Builder propertyMetadataBuilder = new PropertyMetadata.Builder( member )
            .dynamicBoostStrategy( AnnotationProcessingHelper.getDynamicBoost( member ) );
View Full Code Here

Examples of org.hibernate.search.annotations.DocumentId

   */
  private Annotation getIdAnnotation(XProperty member, ConfigContext context) {
    Annotation idAnnotation = null;

    // check for explicit DocumentId
    DocumentId documentIdAnn = member.getAnnotation( DocumentId.class );
    if ( documentIdAnn != null ) {
      idAnnotation = documentIdAnn;
      documentIdAnnotatedMember = member;
    }
    // check for JPA @Id
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.