com.wewebu.ow.server.ecm
Class OwStandardSearchSpecialNodeOperator

java.lang.Object
  extended by com.wewebu.ow.server.ecm.OwStandardSearchSpecialNodeOperator

public class OwStandardSearchSpecialNodeOperator
extends Object

Standard implementation to scan a search node structure for special nodes, like paths, object stores and classes.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com

Since:
2.5.3.0

Constructor Summary
OwStandardSearchSpecialNodeOperator()
           
 
Method Summary
 Object[] getClasses()
          Array of OwClass, representing the classes defined for the scanned search node
 int getMergeType()
          Get the int representation of the merge type.
 String getMergeTypeRepresentation()
          get the merge type as string representation
 List getObjectStores()
          Retrieve a List of scanned object stores/repositories that the given search node refers.
 Collection getPaths()
          Collection of String representing search-path objects referred by the scanned search node.
 List getSubpaths()
          Returns a list of possible paths to specified in the search node structure.
protected  void handleClasses(OwSearchNode classSearchNode_p)
          (overridable) Handling for search node where the specified classes are contained.
protected  void handleResourcepaths(OwSearchNode pathSearchNode_p)
          (overridable) Handling the paths search node to extract and add it to getPaths() collection.
 void scan(OwSearchNode searchNode_p)
          Traverse the search criteria tree, create and cache the special node information (namely referred paths within object-stores and object classes )
.
protected  void setClasses(Object[] owClassArr_p)
          Method to set the array of OwClass.
protected  void setMergeType(int mergeType_p)
          Method to set the merge type, which is not verifying if given parameter value is valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwStandardSearchSpecialNodeOperator

public OwStandardSearchSpecialNodeOperator()
Method Detail

getClasses

public Object[] getClasses()
Array of OwClass, representing the classes defined for the scanned search node

Returns:
Array of OwClass objects or null if nothing found

getMergeTypeRepresentation

public String getMergeTypeRepresentation()
get the merge type as string representation

OwSearchOperator.MERGE_UNION = "union" OwSearchOperator.MERGE_INTERSECT = "intersection" OwSearchOperator.MERGE_NONE = "none" (default)

Returns:
String representation of the getMergeType() value

getMergeType

public int getMergeType()
Get the int representation of the merge type.

Returns:
int
See Also:
OwSearchOperator.MERGE_*

getObjectStores

public List getObjectStores()
Retrieve a List of scanned object stores/repositories that the given search node refers.

Returns:
list of OwSearchObjectStores representing the object stores/repositories that the scanned search node refers

getPaths

public Collection getPaths()
Collection of String representing search-path objects referred by the scanned search node.

Returns:
Collection of OwSearchPaths

getSubpaths

public List getSubpaths()
Returns a list of possible paths to specified in the search node structure.

Just iterating over the scanned paths (getPaths() and removing the object store/repository only references.

Returns:
List of OwSearchPath subpaths
See Also:


scan

public void scan(OwSearchNode searchNode_p)
          throws Exception
Traverse the search criteria tree, create and cache the special node information (namely referred paths within object-stores and object classes )
.

Parameters:
searchNode_p - OwSearchNode from where the scan should start
Throws:
Exception - if problem occur requesting the FieldDefinition from OwSearchNode

handleResourcepaths

protected void handleResourcepaths(OwSearchNode pathSearchNode_p)
(overridable) Handling the paths search node to extract and add it to getPaths() collection.

This method is called if a search criteria is found form path type.

Parameters:
pathSearchNode_p - OwSearchNode to use for paths extraction.

handleClasses

protected void handleClasses(OwSearchNode classSearchNode_p)
(overridable) Handling for search node where the specified classes are contained.

This method is called by scan(OwSearchNode), if a node with class definition was found.

Parameters:
classSearchNode_p - SearchNode containing the classes

setMergeType

protected void setMergeType(int mergeType_p)
Method to set the merge type, which is not verifying if given parameter value is valid.

Parameters:
mergeType_p - value for the merge type

setClasses

protected void setClasses(Object[] owClassArr_p)
Method to set the array of OwClass.

Parameters:
owClassArr_p - array of OwClass or null


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.