org.alfresco.cmis.mapping
Class AbstractProperty

java.lang.Object
  extended by org.alfresco.cmis.mapping.AbstractProperty
All Implemented Interfaces:
CMISPropertyAccessor, CMISPropertyLuceneBuilder
Direct Known Subclasses:
AbstractSimpleProperty, AbstractVersioningProperty, BaseTypeIdProperty, ContentStreamIdProperty, FixedValueProperty, ObjectTypeIdProperty, ParentProperty, PathProperty, SourceIdProperty, TargetIdProperty

public abstract class AbstractProperty
extends java.lang.Object
implements CMISPropertyAccessor, CMISPropertyLuceneBuilder

Base class for all property accessors


Constructor Summary
protected AbstractProperty(ServiceRegistry serviceRegistry, java.lang.String propertyName)
          Construct
 
Method Summary
 org.apache.lucene.search.Query buildLuceneEquality(LuceneQueryParser lqp, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
           
 org.apache.lucene.search.Query buildLuceneExists(LuceneQueryParser lqp, java.lang.Boolean not)
           
 org.apache.lucene.search.Query buildLuceneGreaterThan(LuceneQueryParser lqp, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
           
 org.apache.lucene.search.Query buildLuceneGreaterThanOrEquals(LuceneQueryParser lqp, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
           
 org.apache.lucene.search.Query buildLuceneIn(LuceneQueryParser lqp, java.util.Collection values, java.lang.Boolean not, PredicateMode mode)
           
 org.apache.lucene.search.Query buildLuceneInequality(LuceneQueryParser lqp, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
           
 org.apache.lucene.search.Query buildLuceneLessThan(LuceneQueryParser lqp, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
           
 org.apache.lucene.search.Query buildLuceneLessThanOrEquals(LuceneQueryParser lqp, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
           
 org.apache.lucene.search.Query buildLuceneLike(LuceneQueryParser lqp, java.io.Serializable value, java.lang.Boolean not)
           
 java.lang.String getLuceneFieldName()
           
 java.lang.String getLuceneSortField(LuceneQueryParser lqp)
           
 QName getMappedProperty()
          Get the (directly) mapped Alfresco property (if a direct mapping exists)
 java.lang.String getName()
          Get the CMIS Property Name
protected  ServiceRegistry getServiceRegistry()
           
 java.io.Serializable getValue(AssociationRef assocRef)
          Get the property value for an association
 java.io.Serializable getValue(NodeRef nodeRef)
          Get the property value for a node
 void setValue(NodeRef nodeRef, java.io.Serializable value)
          Set the property value for a node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractProperty

protected AbstractProperty(ServiceRegistry serviceRegistry,
                           java.lang.String propertyName)
Construct

Parameters:
serviceRegistry -
propertyName -
Method Detail

getServiceRegistry

protected ServiceRegistry getServiceRegistry()
Returns:
service registry

getName

public java.lang.String getName()
Description copied from interface: CMISPropertyAccessor
Get the CMIS Property Name

Specified by:
getName in interface CMISPropertyAccessor
Returns:

getMappedProperty

public QName getMappedProperty()
Description copied from interface: CMISPropertyAccessor
Get the (directly) mapped Alfresco property (if a direct mapping exists)

Specified by:
getMappedProperty in interface CMISPropertyAccessor
Returns:

buildLuceneEquality

public org.apache.lucene.search.Query buildLuceneEquality(LuceneQueryParser lqp,
                                                          java.io.Serializable value,
                                                          PredicateMode mode,
                                                          LuceneFunction luceneFunction)
                                                   throws org.apache.lucene.queryParser.ParseException
Specified by:
buildLuceneEquality in interface CMISPropertyLuceneBuilder
Returns:
the query
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneExists

public org.apache.lucene.search.Query buildLuceneExists(LuceneQueryParser lqp,
                                                        java.lang.Boolean not)
                                                 throws org.apache.lucene.queryParser.ParseException
Specified by:
buildLuceneExists in interface CMISPropertyLuceneBuilder
Returns:
the query
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneGreaterThan

public org.apache.lucene.search.Query buildLuceneGreaterThan(LuceneQueryParser lqp,
                                                             java.io.Serializable value,
                                                             PredicateMode mode,
                                                             LuceneFunction luceneFunction)
                                                      throws org.apache.lucene.queryParser.ParseException
Specified by:
buildLuceneGreaterThan in interface CMISPropertyLuceneBuilder
Returns:
the query
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneGreaterThanOrEquals

public org.apache.lucene.search.Query buildLuceneGreaterThanOrEquals(LuceneQueryParser lqp,
                                                                     java.io.Serializable value,
                                                                     PredicateMode mode,
                                                                     LuceneFunction luceneFunction)
                                                              throws org.apache.lucene.queryParser.ParseException
Specified by:
buildLuceneGreaterThanOrEquals in interface CMISPropertyLuceneBuilder
Returns:
the query
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneIn

public org.apache.lucene.search.Query buildLuceneIn(LuceneQueryParser lqp,
                                                    java.util.Collection values,
                                                    java.lang.Boolean not,
                                                    PredicateMode mode)
                                             throws org.apache.lucene.queryParser.ParseException
Specified by:
buildLuceneIn in interface CMISPropertyLuceneBuilder
Returns:
the query
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneInequality

public org.apache.lucene.search.Query buildLuceneInequality(LuceneQueryParser lqp,
                                                            java.io.Serializable value,
                                                            PredicateMode mode,
                                                            LuceneFunction luceneFunction)
                                                     throws org.apache.lucene.queryParser.ParseException
Specified by:
buildLuceneInequality in interface CMISPropertyLuceneBuilder
Returns:
the query
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneLessThan

public org.apache.lucene.search.Query buildLuceneLessThan(LuceneQueryParser lqp,
                                                          java.io.Serializable value,
                                                          PredicateMode mode,
                                                          LuceneFunction luceneFunction)
                                                   throws org.apache.lucene.queryParser.ParseException
Specified by:
buildLuceneLessThan in interface CMISPropertyLuceneBuilder
Returns:
the query
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneLessThanOrEquals

public org.apache.lucene.search.Query buildLuceneLessThanOrEquals(LuceneQueryParser lqp,
                                                                  java.io.Serializable value,
                                                                  PredicateMode mode,
                                                                  LuceneFunction luceneFunction)
                                                           throws org.apache.lucene.queryParser.ParseException
Specified by:
buildLuceneLessThanOrEquals in interface CMISPropertyLuceneBuilder
Returns:
the query
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneLike

public org.apache.lucene.search.Query buildLuceneLike(LuceneQueryParser lqp,
                                                      java.io.Serializable value,
                                                      java.lang.Boolean not)
                                               throws org.apache.lucene.queryParser.ParseException
Specified by:
buildLuceneLike in interface CMISPropertyLuceneBuilder
Returns:
the query
Throws:
org.apache.lucene.queryParser.ParseException

getLuceneFieldName

public java.lang.String getLuceneFieldName()
Specified by:
getLuceneFieldName in interface CMISPropertyLuceneBuilder
Returns:
the field name

getLuceneSortField

public java.lang.String getLuceneSortField(LuceneQueryParser lqp)
Specified by:
getLuceneSortField in interface CMISPropertyLuceneBuilder
Parameters:
lqp - TODO
Returns:
the sort field

getValue

public java.io.Serializable getValue(NodeRef nodeRef)
Description copied from interface: CMISPropertyAccessor
Get the property value for a node

Specified by:
getValue in interface CMISPropertyAccessor
Returns:

setValue

public void setValue(NodeRef nodeRef,
                     java.io.Serializable value)
Description copied from interface: CMISPropertyAccessor
Set the property value for a node

Specified by:
setValue in interface CMISPropertyAccessor

getValue

public java.io.Serializable getValue(AssociationRef assocRef)
Description copied from interface: CMISPropertyAccessor
Get the property value for an association

Specified by:
getValue in interface CMISPropertyAccessor
Returns:


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.