Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.core.search.api.client.indexing.resources.document.impl
Class DocumentIndexableResourceImpl

java.lang.Object
  extended by org.nuxeo.ecm.core.search.api.client.indexing.resources.AbstractIndexableResource
      extended by org.nuxeo.ecm.core.search.api.client.indexing.resources.document.impl.AbstractNXCoreIndexableResource
          extended by org.nuxeo.ecm.core.search.api.client.indexing.resources.document.impl.DocumentIndexableResourceImpl
All Implemented Interfaces:
java.io.Serializable, DocumentIndexableResource, NXCoreIndexableResource, IndexableResource
Direct Known Subclasses:
DocumentBuiltinsIndexableResourceImpl

public class DocumentIndexableResourceImpl
extends AbstractNXCoreIndexableResource
implements DocumentIndexableResource

Document indexable resource implementation.

Author:
Julien Anguenot
See Also:
DocumentIndexableResource, Serialized Form

Field Summary
static java.lang.String BLOB_DATA_KEY
           
static java.lang.String BLOB_DIGEST_KEY
           
static java.lang.String BLOB_ENCODING_KEY
           
static java.lang.String BLOB_LENGTH_KEY
           
static java.lang.String BLOB_MIMETYPE_KEY
           
static java.lang.String BLOB_NAME_KEY
           
 
Constructor Summary
DocumentIndexableResourceImpl()
           
DocumentIndexableResourceImpl(DocumentModel dm, IndexableResourceConf conf, java.lang.String sid)
           
 
Method Summary
 java.lang.String computeId()
          Computes the resource unique id.
 java.lang.String getDocCurrentLifeCycleState()
          Returns the current life cycle state.
 java.util.List<java.lang.String> getDocFacets()
          Returns the facets declared by the document model.
 ACP getDocMergedACP()
          Returns the merged ACP for the bound document.
 java.lang.String getDocName()
          Returns the bound doc name.
 DocumentRef getDocParentRef()
          Returns the parent document reference.
 Path getDocPath()
          Returns the document path.
 DocumentRef getDocRef()
          Returns a the document reference.
 java.lang.String getDocType()
          Returns the document type.
 java.lang.String getDocURL()
          Returns the document URL.
 java.lang.String getDocUUID()
          Returns the document UUID.
 java.lang.String getDocVersionLabel()
          Returns the version label for the bound document.
 java.lang.Long getFlags()
          Returns the flags declared on the document model.
 java.lang.String getQid()
          Returns qualified id.
 java.io.Serializable getValueFor(java.lang.String indexableDataName)
          Returns the value for a given indexable data name.
 java.lang.Boolean isDocProxy()
          Is the document a proxy ?
 java.lang.Boolean isDocVersion()
          Says if this is a checked in version or not.
 java.lang.String toString()
           
 
Methods inherited from class org.nuxeo.ecm.core.search.api.client.indexing.resources.document.impl.AbstractNXCoreIndexableResource
closeCoreSession, getCoreSession, getDocRepositoryName
 
Methods inherited from class org.nuxeo.ecm.core.search.api.client.indexing.resources.AbstractIndexableResource
computeAcp, getConfiguration, getName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.nuxeo.ecm.core.search.api.client.indexing.resources.document.NXCoreIndexableResource
closeCoreSession, getCoreSession, getDocRepositoryName
 
Methods inherited from interface org.nuxeo.ecm.core.search.api.client.indexing.resources.IndexableResource
computeAcp, getConfiguration, getName
 

Field Detail

BLOB_DATA_KEY

public static final java.lang.String BLOB_DATA_KEY
See Also:
Constant Field Values

BLOB_ENCODING_KEY

public static final java.lang.String BLOB_ENCODING_KEY
See Also:
Constant Field Values

BLOB_MIMETYPE_KEY

public static final java.lang.String BLOB_MIMETYPE_KEY
See Also:
Constant Field Values

BLOB_DIGEST_KEY

public static final java.lang.String BLOB_DIGEST_KEY
See Also:
Constant Field Values

BLOB_NAME_KEY

public static final java.lang.String BLOB_NAME_KEY
See Also:
Constant Field Values

BLOB_LENGTH_KEY

public static final java.lang.String BLOB_LENGTH_KEY
See Also:
Constant Field Values
Constructor Detail

DocumentIndexableResourceImpl

public DocumentIndexableResourceImpl()

DocumentIndexableResourceImpl

public DocumentIndexableResourceImpl(DocumentModel dm,
                                     IndexableResourceConf conf,
                                     java.lang.String sid)
Method Detail

getDocRef

public DocumentRef getDocRef()
Description copied from interface: DocumentIndexableResource
Returns a the document reference.

Specified by:
getDocRef in interface DocumentIndexableResource
Returns:
a Nuxeo Core DocumenRef instance.

getValueFor

public java.io.Serializable getValueFor(java.lang.String indexableDataName)
                                 throws IndexingException
Description copied from interface: IndexableResource
Returns the value for a given indexable data name.

Specified by:
getValueFor in interface IndexableResource
Parameters:
indexableDataName - the actual indexable data name resource side.
Returns:
a serializable object holding the value.
Throws:
IndexingException - TODO

getDocParentRef

public DocumentRef getDocParentRef()
Description copied from interface: DocumentIndexableResource
Returns the parent document reference.

Useful for the backend while returning result items so that DocumentModel can be generated out.

Specified by:
getDocParentRef in interface DocumentIndexableResource
Returns:
a Nuxeo Core DocumentRef instance.

getDocPath

public Path getDocPath()
Description copied from interface: DocumentIndexableResource
Returns the document path.

Specified by:
getDocPath in interface DocumentIndexableResource
Returns:
the document path

getDocType

public java.lang.String getDocType()
Description copied from interface: DocumentIndexableResource
Returns the document type.

Specified by:
getDocType in interface DocumentIndexableResource
Returns:
the document type

getDocURL

public java.lang.String getDocURL()
Description copied from interface: DocumentIndexableResource
Returns the document URL.

Specified by:
getDocURL in interface DocumentIndexableResource
Returns:
the document URL

getDocMergedACP

public ACP getDocMergedACP()
                    throws IndexingException
Description copied from interface: DocumentIndexableResource
Returns the merged ACP for the bound document.

Specified by:
getDocMergedACP in interface DocumentIndexableResource
Returns:
a Nuxeo Core API ACP instance.
Throws:
IndexingException

getDocCurrentLifeCycleState

public java.lang.String getDocCurrentLifeCycleState()
Description copied from interface: DocumentIndexableResource
Returns the current life cycle state.

Specified by:
getDocCurrentLifeCycleState in interface DocumentIndexableResource
Returns:
the current life cycle state name.

getDocUUID

public java.lang.String getDocUUID()
Description copied from interface: DocumentIndexableResource
Returns the document UUID.

Specified by:
getDocUUID in interface DocumentIndexableResource
Returns:
the document UUID

computeId

public java.lang.String computeId()
Description copied from interface: IndexableResource
Computes the resource unique id. This can be costly, since it may involve fetching data, computing hash codes, etc.

Specified by:
computeId in interface IndexableResource
Returns:
the resource id

getDocVersionLabel

public java.lang.String getDocVersionLabel()
Description copied from interface: DocumentIndexableResource
Returns the version label for the bound document.

Specified by:
getDocVersionLabel in interface DocumentIndexableResource
Returns:
the version label for the bound document.

isDocVersion

public java.lang.Boolean isDocVersion()
Description copied from interface: DocumentIndexableResource
Says if this is a checked in version or not.

Specified by:
isDocVersion in interface DocumentIndexableResource
Returns:
true if the bound document is a version.

getQid

public java.lang.String getQid()
Description copied from interface: DocumentIndexableResource
Returns qualified id. TODO

Specified by:
getQid in interface DocumentIndexableResource
Returns:
the qualified identifier.

getDocName

public java.lang.String getDocName()
Description copied from interface: DocumentIndexableResource
Returns the bound doc name.

Specified by:
getDocName in interface DocumentIndexableResource
Returns:
the bound doc name.

isDocProxy

public java.lang.Boolean isDocProxy()
Description copied from interface: DocumentIndexableResource
Is the document a proxy ?

Specified by:
isDocProxy in interface DocumentIndexableResource
Returns:

getDocFacets

public java.util.List<java.lang.String> getDocFacets()
Description copied from interface: DocumentIndexableResource
Returns the facets declared by the document model.

Specified by:
getDocFacets in interface DocumentIndexableResource
Returns:
the facets declared by the document model.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getFlags

public java.lang.Long getFlags()
Description copied from interface: DocumentIndexableResource
Returns the flags declared on the document model.

Specified by:
getFlags in interface DocumentIndexableResource
Returns:
a long value (depending on the DocumentModelImpl for now.

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.