org.alfresco.cmis.mapping
Class AbstractProperty

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

public abstract class AbstractProperty
extends java.lang.Object
implements CMISPropertyAccessor, org.alfresco.opencmis.dictionary.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(org.alfresco.repo.search.impl.lucene.AbstractLuceneQueryParser lqp, java.io.Serializable value, org.alfresco.repo.search.impl.querymodel.PredicateMode mode, org.alfresco.repo.search.impl.lucene.LuceneFunction luceneFunction)
           
 org.apache.lucene.search.Query buildLuceneExists(org.alfresco.repo.search.impl.lucene.AbstractLuceneQueryParser lqp, java.lang.Boolean not)
           
 org.apache.lucene.search.Query buildLuceneGreaterThan(org.alfresco.repo.search.impl.lucene.AbstractLuceneQueryParser lqp, java.io.Serializable value, org.alfresco.repo.search.impl.querymodel.PredicateMode mode, org.alfresco.repo.search.impl.lucene.LuceneFunction luceneFunction)
           
 org.apache.lucene.search.Query buildLuceneGreaterThanOrEquals(org.alfresco.repo.search.impl.lucene.AbstractLuceneQueryParser lqp, java.io.Serializable value, org.alfresco.repo.search.impl.querymodel.PredicateMode mode, org.alfresco.repo.search.impl.lucene.LuceneFunction luceneFunction)
           
 org.apache.lucene.search.Query buildLuceneIn(org.alfresco.repo.search.impl.lucene.AbstractLuceneQueryParser lqp, java.util.Collection values, java.lang.Boolean not, org.alfresco.repo.search.impl.querymodel.PredicateMode mode)
           
 org.apache.lucene.search.Query buildLuceneInequality(org.alfresco.repo.search.impl.lucene.AbstractLuceneQueryParser lqp, java.io.Serializable value, org.alfresco.repo.search.impl.querymodel.PredicateMode mode, org.alfresco.repo.search.impl.lucene.LuceneFunction luceneFunction)
           
 org.apache.lucene.search.Query buildLuceneLessThan(org.alfresco.repo.search.impl.lucene.AbstractLuceneQueryParser lqp, java.io.Serializable value, org.alfresco.repo.search.impl.querymodel.PredicateMode mode, org.alfresco.repo.search.impl.lucene.LuceneFunction luceneFunction)
           
 org.apache.lucene.search.Query buildLuceneLessThanOrEquals(org.alfresco.repo.search.impl.lucene.AbstractLuceneQueryParser lqp, java.io.Serializable value, org.alfresco.repo.search.impl.querymodel.PredicateMode mode, org.alfresco.repo.search.impl.lucene.LuceneFunction luceneFunction)
           
 org.apache.lucene.search.Query buildLuceneLike(org.alfresco.repo.search.impl.lucene.AbstractLuceneQueryParser lqp, java.io.Serializable value, java.lang.Boolean not)
           
 java.lang.String getLuceneFieldName()
           
 java.lang.String getLuceneSortField(org.alfresco.repo.search.impl.lucene.AbstractLuceneQueryParser lqp)
           
 org.alfresco.service.namespace.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(org.alfresco.service.cmr.repository.AssociationRef assocRef)
          Get the property value for an association
 java.io.Serializable getValue(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Get the property value for a node or an association
 void setValue(org.alfresco.service.cmr.repository.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 org.alfresco.service.namespace.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(org.alfresco.repo.search.impl.lucene.AbstractLuceneQueryParser lqp,
                                                          java.io.Serializable value,
                                                          org.alfresco.repo.search.impl.querymodel.PredicateMode mode,
                                                          org.alfresco.repo.search.impl.lucene.LuceneFunction luceneFunction)
                                                   throws org.apache.lucene.queryParser.ParseException
Specified by:
buildLuceneEquality in interface org.alfresco.opencmis.dictionary.CMISPropertyLuceneBuilder
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneExists

public org.apache.lucene.search.Query buildLuceneExists(org.alfresco.repo.search.impl.lucene.AbstractLuceneQueryParser lqp,
                                                        java.lang.Boolean not)
                                                 throws org.apache.lucene.queryParser.ParseException
Specified by:
buildLuceneExists in interface org.alfresco.opencmis.dictionary.CMISPropertyLuceneBuilder
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneGreaterThan

public org.apache.lucene.search.Query buildLuceneGreaterThan(org.alfresco.repo.search.impl.lucene.AbstractLuceneQueryParser lqp,
                                                             java.io.Serializable value,
                                                             org.alfresco.repo.search.impl.querymodel.PredicateMode mode,
                                                             org.alfresco.repo.search.impl.lucene.LuceneFunction luceneFunction)
                                                      throws org.apache.lucene.queryParser.ParseException
Specified by:
buildLuceneGreaterThan in interface org.alfresco.opencmis.dictionary.CMISPropertyLuceneBuilder
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneGreaterThanOrEquals

public org.apache.lucene.search.Query buildLuceneGreaterThanOrEquals(org.alfresco.repo.search.impl.lucene.AbstractLuceneQueryParser lqp,
                                                                     java.io.Serializable value,
                                                                     org.alfresco.repo.search.impl.querymodel.PredicateMode mode,
                                                                     org.alfresco.repo.search.impl.lucene.LuceneFunction luceneFunction)
                                                              throws org.apache.lucene.queryParser.ParseException
Specified by:
buildLuceneGreaterThanOrEquals in interface org.alfresco.opencmis.dictionary.CMISPropertyLuceneBuilder
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneIn

public org.apache.lucene.search.Query buildLuceneIn(org.alfresco.repo.search.impl.lucene.AbstractLuceneQueryParser lqp,
                                                    java.util.Collection values,
                                                    java.lang.Boolean not,
                                                    org.alfresco.repo.search.impl.querymodel.PredicateMode mode)
                                             throws org.apache.lucene.queryParser.ParseException
Specified by:
buildLuceneIn in interface org.alfresco.opencmis.dictionary.CMISPropertyLuceneBuilder
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneInequality

public org.apache.lucene.search.Query buildLuceneInequality(org.alfresco.repo.search.impl.lucene.AbstractLuceneQueryParser lqp,
                                                            java.io.Serializable value,
                                                            org.alfresco.repo.search.impl.querymodel.PredicateMode mode,
                                                            org.alfresco.repo.search.impl.lucene.LuceneFunction luceneFunction)
                                                     throws org.apache.lucene.queryParser.ParseException
Specified by:
buildLuceneInequality in interface org.alfresco.opencmis.dictionary.CMISPropertyLuceneBuilder
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneLessThan

public org.apache.lucene.search.Query buildLuceneLessThan(org.alfresco.repo.search.impl.lucene.AbstractLuceneQueryParser lqp,
                                                          java.io.Serializable value,
                                                          org.alfresco.repo.search.impl.querymodel.PredicateMode mode,
                                                          org.alfresco.repo.search.impl.lucene.LuceneFunction luceneFunction)
                                                   throws org.apache.lucene.queryParser.ParseException
Specified by:
buildLuceneLessThan in interface org.alfresco.opencmis.dictionary.CMISPropertyLuceneBuilder
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneLessThanOrEquals

public org.apache.lucene.search.Query buildLuceneLessThanOrEquals(org.alfresco.repo.search.impl.lucene.AbstractLuceneQueryParser lqp,
                                                                  java.io.Serializable value,
                                                                  org.alfresco.repo.search.impl.querymodel.PredicateMode mode,
                                                                  org.alfresco.repo.search.impl.lucene.LuceneFunction luceneFunction)
                                                           throws org.apache.lucene.queryParser.ParseException
Specified by:
buildLuceneLessThanOrEquals in interface org.alfresco.opencmis.dictionary.CMISPropertyLuceneBuilder
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneLike

public org.apache.lucene.search.Query buildLuceneLike(org.alfresco.repo.search.impl.lucene.AbstractLuceneQueryParser lqp,
                                                      java.io.Serializable value,
                                                      java.lang.Boolean not)
                                               throws org.apache.lucene.queryParser.ParseException
Specified by:
buildLuceneLike in interface org.alfresco.opencmis.dictionary.CMISPropertyLuceneBuilder
Throws:
org.apache.lucene.queryParser.ParseException

getLuceneFieldName

public java.lang.String getLuceneFieldName()
Specified by:
getLuceneFieldName in interface org.alfresco.opencmis.dictionary.CMISPropertyLuceneBuilder

getLuceneSortField

public java.lang.String getLuceneSortField(org.alfresco.repo.search.impl.lucene.AbstractLuceneQueryParser lqp)
Specified by:
getLuceneSortField in interface org.alfresco.opencmis.dictionary.CMISPropertyLuceneBuilder

getValue

public java.io.Serializable getValue(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Description copied from interface: CMISPropertyAccessor
Get the property value for a node or an association

Specified by:
getValue in interface CMISPropertyAccessor
Returns:

setValue

public void setValue(org.alfresco.service.cmr.repository.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(org.alfresco.service.cmr.repository.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.