Class CmisOutputConnectorUtils


  • public class CmisOutputConnectorUtils
    extends java.lang.Object
    Author:
    Piergiorgio Lucidi
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String REPLACE  
      static java.lang.String SELECT_FOR_REMOVAL  
      static java.lang.String SEP  
      static java.lang.String SLASH  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addValuesOfProperties​(java.util.List<org.apache.chemistry.opencmis.client.api.Property<?>> props, org.apache.manifoldcf.agents.interfaces.RepositoryDocument rd, java.lang.String cmisQuery)  
      static void addValuesOfProperty​(java.util.List<org.apache.chemistry.opencmis.client.api.Property<?>> props, boolean isWildcardQuery, java.util.Map<java.lang.String,​java.lang.String> cmisQueryColumns, org.apache.manifoldcf.agents.interfaces.RepositoryDocument rd)  
      static boolean existsInSelectClause​(java.lang.String cmisQuery, java.lang.String propertyId)
      Utility method to understand if a property must be indexed or not
      static java.lang.String getCmisQueryWithObjectId​(java.lang.String cmisQuery)
      Utility method to consider the objectId whenever it is not present in the select clause
      static java.lang.String getDocumentURL​(org.apache.chemistry.opencmis.client.api.Document document, org.apache.chemistry.opencmis.client.api.Session session)  
      static java.util.Map<java.lang.String,​java.lang.String> getSelectMap​(java.lang.String cmisQuery)  
      static boolean isWildcardQuery​(java.lang.String selectClause)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CmisOutputConnectorUtils

        public CmisOutputConnectorUtils()
    • Method Detail

      • getDocumentURL

        public static final java.lang.String getDocumentURL​(org.apache.chemistry.opencmis.client.api.Document document,
                                                            org.apache.chemistry.opencmis.client.api.Session session)
                                                     throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
        Throws:
        org.apache.manifoldcf.core.interfaces.ManifoldCFException
      • getCmisQueryWithObjectId

        public static java.lang.String getCmisQueryWithObjectId​(java.lang.String cmisQuery)
        Utility method to consider the objectId whenever it is not present in the select clause
        Parameters:
        cmisQuery -
        Returns:
        the cmisQuery with the cmis:objectId property added in the select clause
      • existsInSelectClause

        public static boolean existsInSelectClause​(java.lang.String cmisQuery,
                                                   java.lang.String propertyId)
        Utility method to understand if a property must be indexed or not
        Parameters:
        cmisQuery -
        propertyId -
        Returns:
        TRUE if the property is included in the select clause of the query, otherwise it will return FALSE
      • addValuesOfProperties

        public static void addValuesOfProperties​(java.util.List<org.apache.chemistry.opencmis.client.api.Property<?>> props,
                                                 org.apache.manifoldcf.agents.interfaces.RepositoryDocument rd,
                                                 java.lang.String cmisQuery)
        Parameters:
        props - : list properties of a document
        rd - : object that contains the properties to pass to connector
        cmisQuery - : cmis query
      • addValuesOfProperty

        public static void addValuesOfProperty​(java.util.List<org.apache.chemistry.opencmis.client.api.Property<?>> props,
                                               boolean isWildcardQuery,
                                               java.util.Map<java.lang.String,​java.lang.String> cmisQueryColumns,
                                               org.apache.manifoldcf.agents.interfaces.RepositoryDocument rd)
        Parameters:
        props - : list properties of a document
        isWildcardQuery - : if the query select is of type '*'
        cmisQueryColumns - : selectors query
        rd - : object that contains the properties to pass to connector
      • getSelectMap

        public static java.util.Map<java.lang.String,​java.lang.String> getSelectMap​(java.lang.String cmisQuery)
      • isWildcardQuery

        public static boolean isWildcardQuery​(java.lang.String selectClause)