class Version:
    def getVersionNumber(self):
        raise NotImplementedError

    def getApplicationList(self):
        raise NotImplementedError

class Application:
    def getApplicationName(self):
        raise NotImplementedError

    def getSheetMetadataList(self):
        raise NotImplementedError

    def getLevelList(self):
        raise NotImplementedError

    def getVersion(self):
        raise NotImplementedError

    def getStyleList(self):
        raise NotImplementedError

    def getTableStyleList(self):
        raise NotImplementedError

    def getRangeList(self):
        raise NotImplementedError

    def getSheetMetadata(self,name):
        raise NotImplementedError

    def getSheetMetadataById(self,idVal):
        raise NotImplementedError

    def getAppRoles(self):
        raise NotImplementedError

class SheetMetadata:
    def getSheetMetadataName(self):
        raise NotImplementedError

    def isSystemModel(self):
        raise NotImplementedError

    def getApplication(self):
        raise NotImplementedError

    def getRowMetadataList(self):
        raise NotImplementedError

    def getColumnMetadataList(self):
        raise NotImplementedError

    def getCellMetadataList(self):
        raise NotImplementedError

    def getOneToManyList(self):
       raise NotImplementedError

    def getManyToOneList(self):
        raise NotImplementedError

    def getBranchList(self):
        raise NotImplementedError

    def getSectionList(self):
        raise NotImplementedError

    def getGridViewList(self):
        raise NotImplementedError

    def getPublicCellMetadataDict(self):
        raise NotImplementedError

    def getPublicCellMetadata(self,name):
        raise NotImplementedError

    def getCellMetadataById(self,idVal):
        raise NotImplementedError

    def getWorkFlowRoot(self):
        raise NotImplementedError

    def getActivityDefinitionById(self,actDefId):
        raise NotImplementedError

    def getShortCutList(self):
        raise NotImplementedError

    def getStartActivity(self):
        raise NotImplementedError

    def isMonitorEnabled(self):
        raise NotImplementedError

    def getSearchDefinitionList(self):
        raise NotImplementedError

    def getSearchDefinitionById(self, idVal):
        raise NotImplementedError

    def getMetadataVersion(self):
        raise NotImplementedError

    def isTrash(self):
        raise NotImplementedError

class RowMetadata:
    def getRowNumber(self):
        raise NotImplementedError

    def getRowHeight(self):
        raise NotImplementedError

    def getStyle(self):
        raise NotImplementedError

    def getSheetMetadata(self):
        raise NotImplementedError

    def getCellMetadataList(self):
        raise NotImplementedError

    def getPreviousRef(self):
        raise NotImplementedError

class ColumnMetadata:
    def getColumnName(self):
        raise NotImplementedError

    def getColumnNumber(self):
        raise NotImplementedError

    def getColumnWidth(self):
        raise NotImplementedError

    def getSheetMetadata(self):
        raise NotImplementedError

    def getCellMetadataList(self):
        raise NotImplementedError

    def getPreviousRef(self):
        raise NotImplementedError

class CellMetadata:
    def getCellName(self):
       raise NotImplementedError

    def getCellDisplayName(self):
       raise NotImplementedError

    def getCellType(self):
        raise NotImplementedError

    def getWidgetType(self):
        raise NotImplementedError

    def getStyle(self):
        raise NotImplementedError

    def getRowSpanned(self):
        raise NotImplementedError

    def getColumnSpanned(self):
        raise NotImplementedError

    def getDefaultValue(self):
        raise NotImplementedError

    def getCellValue(self):
        raise NotImplementedError

    def getRowMetadata(self):
        raise NotImplementedError

    def getColumnMetadata(self):
        raise NotImplementedError

    def getSheetMetadata(self):
        raise NotImplementedError

    def getReferredSheetMetadata(self):
        raise NotImplementedError

    def getFormulaList(self):
        raise NotImplementedError

    def getNodeList(self):
        raise NotImplementedError

    def isNamedCell(self):
        raise NotImplementedError

    def isReferenceCell(self):
        raise NotImplementedError

    def isCascade(self):
        raise NotImplementedError

    def isFormula(self):
        raise NotImplementedError

    def getRowSpan(self):
        raise NotImplementedError

    def getRowSpanList(self):
        raise NotImplementedError

    def getColumnNumber(self):
        raise NotImplementedError

    def getRowNumber(self):
        raise NotImplementedError

    def getHeaderList(self):
        raise NotImplementedError

    def getSearchDefinitionList(self):
        raise NotImplementedError

    def isHidden(self):
        raise NotImplementedError

    def isHeader(self):
        raise NotImplementedError

    def getFormat(self):
        raise NotImplementedError

    def getCategory(self):
        raise NotImplementedError

    def getFinalFormat(self):
        raise NotImplementedError

    def getFinalCategory(self):
        raise NotImplementedError

    def getInputportMetadataList(self):
        raise NotImplementedError

    def getOutputportMetadataList(self):
        raise NotImplementedError

    def isStr(self):
        raise NotImplementedError

    def getDescendentNodeList(self):
        raise NotImplementedError

    def isSystemCell(self):
        raise NotImplementedError

    def getCellFloatValue(self):
        raise NotImplementedError

    def getTextLength(self):
        raise NotImplementedError

    def __str__(self):
        return '%s(%s)'%(self.getCellDisplayName(), self.getCellName() or 'Private-Cell')

class Formula:
    def getCellMetadata(self):
        raise NotImplementedError

    def getNodeList(self):
        raise NotImplementedError

    def getActivityDefinition(self):
        raise NotImplementedError

    def getBranch(self):
        raise NotImplementedError

    def toString(self):
        return self.getNodeList()[0].toString()

    def __str__(self):
        return self.getNodeList()[0].__str__()

class Node():
    def isString(self):
        raise NotImplementedError

    def getNodeValue(self):
        raise NotImplementedError

    def getFormula(self):
        raise NotImplementedError

    def getNode(self):
        raise NotImplementedError

    def getNodeList(self):
        raise NotImplementedError

    def isRootNode(self):
        raise NotImplementedError

    def getValueType(self):
        raise NotImplementedError

    def isPublicRef(self):
        raise NotImplementedError

    def getNodeFloatValue(self):
        raise NotImplementedError

    def getNodeType(self):
        raise NotImplementedError

    def getCellMetadata(self):
        raise NotImplementedError

    def isSyntacticSugar(self):
        raise NotImplementedError

    def __getFunctionString__(self):
        operators = {'addOper':'+', 'subOper':'-', 'mulOper':'*', 'divOper':'/', 'eqOper':'=', 'ltOper':'<', 'gtOper':'>', 'gtEqOper':'>=', 'notEqOper':'<>', 'ltEqOper':'<=', 'percentageOper':'%', 'powerOper':'^'}
        operator = operators.get(self.getNodeValue())
        if operator:
            if len(self.getNodeList())==2:
                return '%s%s%s'%(self.getNodeList()[0], operator, self.getNodeList()[1])
            if len(self.getNodeList())==1:
                return '%s%s'%(self.getNodeList()[0], operator)
        else:
            return '%s(%s)'%(self.getNodeValue(), ','.join([str(node) for node in self.getNodeList()]))

    def __resolveCell__(self):
        if self.getNodeType()=='3dCellReference':
            return '%s.%s'%(self.getCellMetadata().getSheetMetadata().getSheetName(), self.getCellMetadata().getCellName())
        if self.getNodeType()=='CellReference':
            return self.getCellMetadata().getCellName() or self.getCellMetadata().getCellDisplayName()

    def __constant__(self):
        if self.isString():
            return '"%s"'%(self.getNodeValue())
        return '%s'%(self.getNodeValue())

    def __str__(self):
        if self.getNodeType()=='Fetch3DFunction' or self.getNodeType()=='Aggrigate3DFunction' or self.getNodeType()=='Function':
            return self.__getFunctionString__()
        if self.getNodeType()=='3dCellReference' or self.getNodeType()=='CellReference':
            return self.__resolveCell__()
        if self.getNodeType()=='Constant':
            return self.__constant__()

    def toString(self, sp = '  '):
        value = self.getCellMetadata().getCellName() or self.getCellMetadata().getCellDisplayName() if self.getNodeType()=='CellReference' else ('%s.%s'%(self.getCellMetadata().getSheetMetadata().getSheetName(), self.getCellMetadata().getCellName()) if self.getNodeType()=='3dCellReference' else self.getNodeValue())
        return '%d - %s - %s - %s - %s - %s - %s %s - %s'%(self.getArgNo(), self.getNodeType(), value, self.isString() or 0, self.getNodeFloatValue(), "'"+self.getSheetName()+"'", self.getSheetId(), self.isSyntacticSugar(), ''.join(['\n%s%s'%(sp, cNode.toString(sp+sp)) for cNode in self.getNodeList()]))

class Task:
    def getTaskName(self):
        raise NotImplementedError

    def getNextTask(self):
        raise NotImplementedError

    def getTaskStatus(self):
        raise NotImplementedError

class ActivityDefinition(Task):

    def getActivityDefinitionName(self):
        raise NotImplementedError

    def getSequenceNo(self):
        raise NotImplementedError

    def getTaskStatus(self):
        raise NotImplementedError

    def getFormulaList(self):
        raise NotImplementedError

    def getBranchList(self):
        raise NotImplementedError

    def getSearchDefinitionList(self):
        raise NotImplementedError

    def getButtonList(self):
        raise NotImplementedError

    def getBranch(self):
        raise NotImplementedError

    def containsFormula(self):
        raise NotImplementedError

    def getParent(self):
        raise NotImplementedError

    def getGridView(self):
        raise NotImplementedError

    def getPreviousRef(self):
        raise NotImplementedError

    def getNodeType(self):
        raise NotImplementedError

    def getAppRole(self):
        raise NotImplementedError

    def isStatic(self):
        raise NotImplementedError

    def getCellMetadata(self):
        raise NotImplementedError

    def getAssignedFor(self):
        raise NotImplementedError

    def getGoTo(self):
        raise NotImplementedError

    def getRoot(self):
        raise NotImplementedError

    def getInputportMetadataList(self):
        raise NotImplementedError

    def getOutputportMetadataList(self):
        raise NotImplementedError

    def getProcessType(self):
        raise NotImplementedError

    def getAllowedFormulaList(self):
        raise NotImplementedError

    def containsAllowedFormula(self):
        raise NotImplementedError

    def isContinueOnError(self):
        raise NotImplementedError

    def getHierarchyList(self):
        raise NotImplementedError

    def getOutputHierarchyList(self):
        raise NotImplementedError

    def getBelongingSheetId(self):
        raise NotImplementedError

    def getAssignedTo(self):
        raise NotImplementedError

    def getActivityTenant(self):
        raise NotImplementedError

    def getFinalInboxGridView(self):
        raise NotImplementedError

    def getFinalEditorGridView(self):
        raise NotImplementedError

    def getFinalEditorForm(self):
        raise NotImplementedError

    def getFinalInboxForm(self):
        raise NotImplementedError

    def getActivityTenantFormulaList(self):
        raise NotImplementedError

    def containsActivityTenantFormula(self):
        raise NotImplementedError

    def toString(self, sp = '-'):
        return '%s.%s-%s-%s%s'%(self.getSequenceNo(), self.getSheetName(), self.getSheetId(), self.getNodeType(), ''.join(['\n%s%s'%(sp, b.toString('-'+sp)) for b in self.getBranchList()]))

class Branch:
    def getBranchName(self):
        raise NotImplementedError

    def getProcessType(self):
        raise NotImplementedError

    def getSequenceNo(self):
        raise NotImplementedError

    def getFormulaList(self):
        raise NotImplementedError

    def getActivityDefinitionList(self):
        raise NotImplementedError

    def getActivityDefinition(self):
        raise NotImplementedError

    def containsFormula(self):
        raise NotImplementedError

    def getRoot(self):
        raise NotImplementedError

    def getSheetMetadata(self):
        raise NotImplementedError

    def getNodeType(self):
        raise NotImplementedError

    def toString(self, sp = ' '):
        return 'Branch %s-%s%s'%(self.getSheetName(), self.getNodeType(), ''.join(['\n%s%s'%(sp, a.toString('-'+sp)) for a in self.getActivityDefinitionList()]))

class InputportMetadata():

    def getStringValue(self):
        raise NotImplementedError

    def getFloatValue(self):
        raise NotImplementedError

    def isStr(self):
        raise NotImplementedError

    def getSequenceNo(self):
        raise NotImplementedError

    def getActivityDefinition(self):
        raise NotImplementedError

    def getCellMetadata(self):
        raise NotImplementedError

    def getFormulaList(self):
        raise NotImplementedError

    def containsFormula(self):
        raise NotImplementedError

    def getParamName(self):
        raise NotImplementedError

    def getHierarchy(self):
        raise NotImplementedError

    def getBranch(self):
        raise NotImplementedError

    def getActivityDefinitionRef(self):
        raise NotImplementedError

class OutputportMetadata():

    def getCellMetadata(self):
        raise NotImplementedError

    def getSequenceNo(self):
        raise NotImplementedError

    def getActivityDefinition(self):
        raise NotImplementedError

    def getParamName(self):
        raise NotImplementedError

    def getHierarchy(self):
        raise NotImplementedError

class SubProcess:
    def getParentCellMetadata(self):
        raise NotImplementedError

class SearchDefinition:
    def getSearchDefinitionName(self):
        raise NotImplementedError

    def getActivityDefinition(self):
        raise NotImplementedError

    def getItemsPerPage(self):
        raise NotImplementedError

    def isDefault(self):
        raise NotImplementedError

    def getTableStyle(self):
        raise NotImplementedError

    def getCriteriaList(self):
        raise  NotImplementedError

    def getCellMetadata(self):
        raise NotImplementedError

    def getDisplayCell(self):
        raise NotImplementedError

    def isNotAllowNone(self):
        raise NotImplementedError

    def isDescending(self):
        raise NotImplementedError

    def getParentReferenceCell(self):
        raise NotImplementedError

    def getSearchReferenceCell(self):
        raise NotImplementedError

    def getSheetMetadata(self):
        raise NotImplementedError

    def getFormulaList(self):
        raise NotImplementedError

    def getFinalInboxGridView(self):
        raise NotImplementedError

    def getFinalInboxForm(self):
        raise NotImplementedError

class Hierarchy:
    def getReferenceCell(self):
        raise NotImplementedError

    def getHierarchyList(self):
        raise NotImplementedError

    def getHeaderList(self):
        raise NotImplementedError

    def getActivityDefinition(self):
        raise NotImplementedError

    def getOutputActivityDefinition(self):
        raise NotImplementedError

    def getNodeName(self):
        raise NotImplementedError

    def getInputportMetadataList(self):
        raise NotImplementedError

    def getOutputportMetadataList(self):
        raise NotImplementedError

    def getHierarchy(self):
        raise NotImplementedError

class Header:
    def getHeaderName(self):
        raise NotImplementedError

    def getCellMetadata(self):
        raise NotImplementedError

    def getIndex(self):
        raise NotImplementedError

    def getFormat(self):
        raise NotImplementedError

    def getOrderBy(self):
        raise NotImplementedError

    def getHierarchy(self):
        raise NotImplementedError

    def getWidth(self):
        raise NotImplementedError

class Section:
    def getSectionName(self):
        raise NotImplementedError

    def getFrom(self):
        raise NotImplementedError

    def getTo(self):
        raise NotImplementedError

    def getSheetMetadata(self):
        raise NotImplementedError

class GridView:
    def getGridViewName(self):
        raise NotImplementedError

    def getSheetMetadata(self):
        raise NotImplementedError

    def getGridCell(self):
        raise NotImplementedError

    def getGridRowList(self):
        raise NotImplementedError

    def getGridColumnList(self):
      raise NotImplementedError

    def getJSTLString(self):
        raise NotImplementedError

    def isDefault(self):
        raise NotImplementedError

    def getProperty(self):
        raise NotImplementedError

    def getGridViewHeight(self):
        raise NotImplementedError

    def getGridViewWidth(self):
        raise NotImplementedError

class GridRow:
    def getRowNumber(self):
        raise NotImplementedError

    def getRowHeight(self):
        raise NotImplementedError

    def getStyle(self):
        raise NotImplementedError

    def getReferenceCellMetadata(self):
        raise NotImplementedError

    def getGridView(self):
        raise NotImplementedError

    def getGridCellList(self):
        raise NotImplementedError

    def getFinalHeight(self):
        raise NotImplementedError

class GridColumn:
    def getColumnNumber(self):
        raise NotImplementedError

    def getColumnWidth(self):
        raise NotImplementedError

    def getReferenceCellMetadata(self):
        raise NotImplementedError

    def getGridView(self):
        raise NotImplementedError

    def getGridCellList(self):
        raise NotImplementedError

    def getFinalWidth(self):
        raise NotImplementedError

class GridCell:
     def getCellValue(self):
        raise NotImplementedError

     def getStyle(self):
        raise NotImplementedError

     def getRowSpanned(self):
        raise NotImplementedError

     def getColumnSpanned(self):
        raise NotImplementedError

     def getGridRow(self):
        raise NotImplementedError

     def getGridColumn(self):
        raise NotImplementedError

     def getSection(self):
        raise NotImplementedError

     def getCellMetadata(self):
        raise NotImplementedError

     def getGridViewList(self):
        raise NotImplementedError

     def getGridRowSpan(self):
        raise NotImplementedError

     def getGridRowSpanList(self):
        raise NotImplementedError

     def getColumnNUmber(self):
        raise NotImplementedError

     def getRowNumber(self):
        raise NotImplementedError

     def isHidden(self):
        raise NotImplementedError

     def getWidgetType(self):
         raise NotImplementedError

     def getActivityPermissionList(self):
         raise NotImplementedError

     def getGridViewHeight(self):
         raise NotImplementedError

     def getGridViewWidth(self):
         raise NotImplementedError

     def getPropertyList(self):
        raise NotImplementedError

     def getCriteriaList(self):
        raise NotImplementedError

     def getHintMessage(self):
        raise NotImplementedError

     def getErrorMessage(self):
        raise NotImplementedError

     def isRead(self):
        raise NotImplementedError

     def isWrite(self):
         raise NotImplementedError

     def isVisible(self):
         raise NotImplementedError

class Style:
    def getStyleName(self):
        raise NotImplementedError

    def getApplication(self):
        raise NotImplementedError

    def getFontFamily(self):
        raise NotImplementedError

    def getFontWeight(self):
        raise NotImplementedError

    def getFontSize(self):
        raise NotImplementedError

    def getFontStyle(self):
        raise NotImplementedError

    def getColor(self):
        raise NotImplementedError

    def getTextAlign(self):
        raise NotImplementedError

    def getTextDecoration(self):
        raise NotImplementedError

    def getBorderTop(self):
        raise NotImplementedError

    def getBorderBottom(self):
        raise NotImplementedError

    def getBorderLeft(self):
        raise NotImplementedError

    def getBorderRight(self):
        raise NotImplementedError

    def getBorderColor(self):
        raise NotImplementedError

    def getBorderStyle(self):
        raise NotImplementedError

    def getTextIndent(self):
        raise NotImplementedError

    def getTextTransform(self):
        raise NotImplementedError

    def getBackgroundColor(self):
        raise NotImplementedError

class Activitylist:
    def read(self,searchDefinitionId,pageNumber = None):
        raise NotImplementedError

    def getNumberOfPages(self):
        raise NotImplementedError

    def getTotalNumberOfItems(self):
        raise NotImplementedError

class Level:
    def getLevelName(self):
        raise NotImplementedError

    def getLevelNumber(self):
        raise NotImplementedError

    def getApplication(self):
        raise NotImplementedError

    def getActivityDefinitionList(self):
        raise NotImplementedError

class MenuGroup:
    def getMenuGroupList(self):
        raise NotImplementedError

    def getParentMenuGroup(self):
        raise NotImplementedError

    def getLayoutViewList(self):
        raise NotImplementedError

    def getMenuGroupName(self):
        raise NotImplementedError

    def getApplication(self):
        raise NotImplementedError

class LayoutView:
    def getApplication(self):
        raise NotImplementedError
    def getLayoutViewName(self):
        raise NotImplementedError
    def getMenuGroup(self):
        raise NotImplementedError
    def getLayoutRowList(self):
        raise NotImplementedError
    def getLayoutColumnList(self):
        raise NotImplementedError
    def getWidth(self):
        raise NotImplementedError

class LayoutRow:
    def getLayoutView(self):
        raise NotImplementedError

    def getLayoutCellList(self):
        raise NotImplementedError

    def getRowHeight(self):
        raise NotImplementedError

    def getRowNumber(self):
        raise NotImplementedError

class LayoutColumn:
    def getLayoutView(self):
        raise NotImplementedError

    def getLayoutCellList(self):
        raise NotImplementedError

    def getColumnWidth(self):
        raise NotImplementedError

    def getColumnNumber(self):
        raise NotImplementedError

class LayoutCell:
    def getLayoutRow(self):
        raise NotImplementedError

    def getRowSpanned(self):
        raise NotImplementedError

    def getLayoutColumn(self):
        raise NotImplementedError

    def getColumnSpanned(self):
        raise NotImplementedError

    def getActivityDefinitionList(self):
        raise NotImplementedError

    def getType(self):
        raise NotImplementedError

class RowSpan:
    def getCellMetadata(self):
        raise NotImplementedError

    def getCellMetadataList(self):
        raise NotImplementedError

    def getColumnSpanned(self):
        raise NotImplementedError

class GridRowSpan:
    def getGridCell(self):
        raise NotImplementedError

    def getGridColumnSpanned(self):
        raise NotImplementedError

class TableStyle:
    def getTableStyleName(self):
        raise NotImplementedError

    def getApplication(self):
        raise NotImplementedError

    def getCategory(self):
        raise NotImplementedError

    def getFirstRowBGColor(self):
        raise NotImplementedError

    def getRowFontStyle(self):
        raise NotImplementedError

    def getRowFontWeight(self):
        raise NotImplementedError

    def getRowFontSize(self):
        raise NotImplementedError

    def getRowFontFace(self):
        raise NotImplementedError

    def getSecondRowBGColor(self):
        raise NotImplementedError

    def getHeaderBGColor(self):
        raise NotImplementedError

    def getHeaderFontColor(self):
        raise NotImplementedError

    def getHeaderFontStyle(self):
        raise NotImplementedError

    def getHeaderFontWeight(self):
        raise NotImplementedError

    def getHeaderFontSize(self):
        raise NotImplementedError

    def getHeaderFontFace(self):
        raise NotImplementedError

class Criteria:
    def getCriteria(self):
        raise NotImplementedError

    def getCriteriaList(self):
        raise NotImplementedError

    def getConditionList(self):
        raise NotImplementedError

    def isAndOper(self):
        raise NotImplementedError

    def isOrOper(self):
        raise NotImplementedError

    def getSearchDefinition(self):
        raise NotImplementedError

    def getGridCell(self):
        raise NotImplementedError

    def getGridCell_Read(self):
        raise NotImplementedError

    def getGridCell_Write(self):
        raise NotImplementedError

    def getGridCell_Visible(self):
        raise NotImplementedError

    def getActivityPermission_Read(self):
        raise NotImplementedError

    def getActivityPermission_Write(self):
        raise NotImplementedError

    def getActivityPermission_Visible(self):
        raise NotImplementedError

class Condition:
    def getCriteria(self):
        raise NotImplementedError

    def getRHSFormulaList(self):
        raise NotImplementedError

    def getLHSFormulaList(self):
        raise NotImplementedError

    def getOperator(self):
        raise NotImplementedError

    def getLHSValue(self):
        raise NotImplementedError

    def getRHSValue(self):
        raise NotImplementedError

    def getLHSCellMetadata(self):
        raise NotImplementedError

    def getRHSParentReferenceCellMetadata(self):
        raise NotImplementedError

    def getRHSReferenceCellMetadata(self):
        raise NotImplementedError

    def getRHSCellMetadata(self):
        raise NotImplementedError

    def getRHSParamType(self):
        raise NotImplementedError

    def getSearchDefinition(self):
         raise NotImplementedError

class Range:
    def getApplication(self):
        raise NotImplementedError

    def getRangeValueList(self):
        raise NotImplementedError

class RangeValue:
    def getValue(self):
        raise  NotImplementedError

    def getRange(self):
        raise NotImplementedError

class ProcessInstance:
    def getMetadataId(self):
        raise NotImplementedError

    def getInstanceId(self):
        raise NotImplementedError

    def getLevel(self):
        raise NotImplementedError

    def getActivityDefinition(self):
        raise NotImplementedError

class ProcessAudit:
    def getProcessInstance(self):
        raise NotImplementedError

    def getMetadataId(self):
        raise NotImplementedError

    def getInstanceId(self):
        raise NotImplementedError

class UserInboxlist:
    def getUserModel(self):
        raise NotImplementedError

    def getUserLogin(self):
        raise NotImplementedError

class UserLoginModel:
    def getUserLoggedIn(self):
        raise NotImplementedError

    def getLoginDate(self):
        raise NotImplementedError

class SubscribedUser:
    def getUser(self):
        raise NotImplementedError

    def getPrimaryUser(self):
        raise NotImplementedError

    def getSecondaryUser(self):
        raise NotImplementedError

class Instance:
    def create(self,url):
        raise NotImplementedError
    def new(self,sheetMetadataid):
        raise NotImplementedError
    def read(self,url):
        raise NotImplementedError
    def update(self,url):
        raise NotImplementedError
    def delete(self,url):
        raise NotImplementedError
    def submit(self,action):
        raise NotImplementedError
    def invoke(self,action,values):
        raise NotImplementedError

class LevelRowSpan:
    def getColumnSpanned(self):
        raise NotImplementedError

class Button:
    def getAction(self):
        raise NotImplementedError

    def getIcon(self):
        raise NotImplementedError

    def getSize(self):
        raise NotImplementedError

    def getGoTo(self):
        raise NotImplementedError

    def getIndex(self):
        raise NotImplementedError

    def getActivityDefinition(self):
        raise NotImplementedError

class BaseNode(Node):
    node = None
    str = False
    nodeValue = None
    nodeType = None
    formula = None
    nodeList = None
    publicRef = False
    argNo = float()
    cellMetadata = None
    nodeFloatValue = float()

    def __init__(self, formula = None, node=None, nodeType = None, argNo = None, isStr=None, nodeValue=None, nodeFloatValue = None):
        self.nodeList = list()
        self.formula = formula
        self.node = node
        self.nodeType = nodeType
        self.argNo = argNo
        self.str = isStr
        self.nodeValue = nodeValue
        self.nodeFloatValue = nodeFloatValue

    def isString(self):
        return self.str

    def getNodeValue(self):
        return self.nodeValue

    def getFormula(self):
        return self.formula

    def getNode(self):
        return self.node

    def getNodeList(self):
        self.nodeList.sort(lambda x, y: cmp(x.argNo,y.argNo))
        return self.nodeList

    def isRootNode(self):
        return self.formula is not None

    def getValueType(self):
        raise NotImplementedError

    def isPublicRef(self):
        return self.publicRef

    def getArgNo(self):
        return self.argNo

    def getNodeType(self):
        return self.nodeType

    def getCellMetadata(self):
        return self.cellMetadata

    def getNodeFloatValue(self):
        return self.nodeFloatValue

class ActivityPermission:
    def isRead(self):
        raise NotImplementedError

    def isWrite(self):
        raise NotImplementedError

    def isVisible(self):
        raise NotImplementedError


    def getGridCell(self):
        raise NotImplementedError

    def getActivityDefinition(self):
        raise NotImplementedError

class Property:
    def getGridCell(self):
        raise NotImplementedError

    def getAttributeName(self):
        raise NotImplementedError

    def getStaticValue(self):
        raise NotImplementedError

    def getFormulaValue(self):
        raise NotImplementedError

class DescendantNode(Node):
    def __init__(self, valueDict):
        self.synchronous = valueDict.get('Sync')
        self.refCellMetadata = valueDict.get('ReferenceCellMetadata')
        self.nodeType = valueDict.get('NodeType')
        self.cellMetadata = valueDict.get('CellMetadata')#this is a formula cell

    def getSheetId(self):
        return None

    def getSheetName(self):
        return None

    def getCellMetadata(self):
        return self.cellMetadata

    def getNodeType(self):
        return self.nodeType

    def getReferenceCellMetadata(self):
        return self.refCellMetadata

    def isSynchronous(self):
        return not not self.synchronous

class Folder:
    def getShortCutList(self):
        raise NotImplementedError

class ShortCut:
    def getFolder(self):
        raise NotImplementedError
    def getSheetMetadata(self):
        raise NotImplementedError
    def getGridView(self):
        raise NotImplementedError


