org.eaglei.repository.workflow
Class WorkflowTransition

java.lang.Object
  extended by org.eaglei.repository.workflow.WorkflowTransition

public class WorkflowTransition
extends java.lang.Object

WorkflowTransition object model, reflects the :WorkflowTransition object in RDF database.

Version:
$Id: $
Author:
Larry Stone Started October, 2010

Method Summary
 void commit(javax.servlet.http.HttpServletRequest request)
          commit - commit any changes made to this object (and any others)
static WorkflowTransition create(javax.servlet.http.HttpServletRequest request, org.openrdf.model.URI prefURI, java.lang.String label, java.lang.String comment, org.openrdf.model.URI initialState, org.openrdf.model.URI finalState)
          Make a new WorkflowTransition
 void delete(javax.servlet.http.HttpServletRequest request)
           
static void doExportTransitions(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.openrdf.rio.RDFFormat format, java.util.Set<java.lang.String> includes, java.util.Set<java.lang.String> excludes)
          Export transitions to serialized quad format.
static void doImportTransitions(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.openrdf.repository.RepositoryConnection content, java.util.Set<java.lang.String> includes, java.util.Set<java.lang.String> excludes, ImportExport.DuplicateArg duplicate, boolean transform, boolean ignoreACL)
          Import description of transitions from serialized RDF quads.
 boolean equals(java.lang.Object other)
           Transitions are equal if their subject URI is the same.
static WorkflowTransition find(javax.servlet.http.HttpServletRequest request, org.openrdf.model.URI uri)
          Get the WorkflowTransition for a known URI,
static java.util.Collection<WorkflowTransition> findAccessibleByAttributes(javax.servlet.http.HttpServletRequest request, org.openrdf.model.URI single, org.openrdf.model.URI initialStateMatch, org.openrdf.model.URI workspaceMatch, org.openrdf.model.URI accessible)
          Get all Transitions matching criteria dictated by args; null is a wildcard, so all nulls means get all transactions.
static java.util.Collection<WorkflowTransition> findAll(javax.servlet.http.HttpServletRequest request)
          Get all Transitions in an aesthetic order
 WorkflowAction getAction()
           
 org.openrdf.model.Value getActionParameter()
           
 java.lang.String getComment()
          Getter for the field comment.
 org.openrdf.model.URI getFinal()
           
 java.lang.String getFinalLabel()
           
 org.openrdf.model.URI getInitial()
           
 java.lang.String getInitialLabel()
           
 java.lang.String getLabel()
          Getter for the field label.
 java.lang.String getOrder()
           
 org.openrdf.model.URI getURI()
          getURI
 org.openrdf.model.URI getWorkspace()
           
 java.lang.String getWorkspaceLabel()
           
 int hashCode()
          
 void setAction(javax.servlet.http.HttpServletRequest request, java.lang.String val)
           
 void setActionParameter(javax.servlet.http.HttpServletRequest request, java.lang.String str)
          ActionParameter may be stringified URI or literal; parse out URI or literal from val..
 void setActionParameter(javax.servlet.http.HttpServletRequest request, org.openrdf.model.Value val)
           
 void setComment(javax.servlet.http.HttpServletRequest request, java.lang.String val)
           
 void setFinal(javax.servlet.http.HttpServletRequest request, org.openrdf.model.URI val)
           
 void setInitial(javax.servlet.http.HttpServletRequest request, org.openrdf.model.URI val)
           
 void setLabel(javax.servlet.http.HttpServletRequest request, java.lang.String val)
          Setter for the field label.
 void setOrder(javax.servlet.http.HttpServletRequest request, java.lang.String val)
           
 void setWorkspace(javax.servlet.http.HttpServletRequest request, org.openrdf.model.URI val)
           
 java.lang.String toString()
          toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

find

public static WorkflowTransition find(javax.servlet.http.HttpServletRequest request,
                                      org.openrdf.model.URI uri)
                               throws javax.servlet.ServletException
Get the WorkflowTransition for a known URI,

Parameters:
request - a HttpServletRequest object.
uri - URI of the transition
Returns:
a org.eaglei.repository.WorkflowTransition object
Throws:
javax.servlet.ServletException - if any.

findAll

public static java.util.Collection<WorkflowTransition> findAll(javax.servlet.http.HttpServletRequest request)
                                                        throws javax.servlet.ServletException
Get all Transitions in an aesthetic order

Parameters:
request - a HttpServletRequest object.
Returns:
all transitions in a java.lang.Collection object.
Throws:
javax.servlet.ServletException - if any.

findAccessibleByAttributes

public static java.util.Collection<WorkflowTransition> findAccessibleByAttributes(javax.servlet.http.HttpServletRequest request,
                                                                                  org.openrdf.model.URI single,
                                                                                  org.openrdf.model.URI initialStateMatch,
                                                                                  org.openrdf.model.URI workspaceMatch,
                                                                                  org.openrdf.model.URI accessible)
                                                                           throws javax.servlet.ServletException
Get all Transitions matching criteria dictated by args; null is a wildcard, so all nulls means get all transactions. Note that this does NOT inherently do access control since it only shows internal metadata.

Parameters:
request - a HttpServletRequest object.
single - if not null, then only find transition whose subject matches that URI
initialStateMatch - filter only transitions with given initial state
workspaceMatch - filter only transitions on either ALL workspaces or this one
accessible - filter transitions accessible to this user or Role URI
Returns:
all matching transitions in a java.lang.Collection object.
Throws:
javax.servlet.ServletException - if any.

getURI

public org.openrdf.model.URI getURI()

getURI

Returns:
URI subject of the WorkflowTransition, a URI object.

getLabel

public java.lang.String getLabel()

Getter for the field label.

Returns:
label of the WorkflowTransition, a String object.

getComment

public java.lang.String getComment()

Getter for the field comment.

Returns:
comment of the WorkflowTransition, a String object, MIGHT be null.

getWorkspace

public org.openrdf.model.URI getWorkspace()

getWorkspaceLabel

public java.lang.String getWorkspaceLabel()

getInitial

public org.openrdf.model.URI getInitial()

getInitialLabel

public java.lang.String getInitialLabel()

getFinal

public org.openrdf.model.URI getFinal()

getFinalLabel

public java.lang.String getFinalLabel()

getOrder

public java.lang.String getOrder()

getAction

public WorkflowAction getAction()

getActionParameter

public org.openrdf.model.Value getActionParameter()

create

public static WorkflowTransition create(javax.servlet.http.HttpServletRequest request,
                                        org.openrdf.model.URI prefURI,
                                        java.lang.String label,
                                        java.lang.String comment,
                                        org.openrdf.model.URI initialState,
                                        org.openrdf.model.URI finalState)
                                 throws javax.servlet.ServletException

Make a new WorkflowTransition

including creating a URI for it.

Parameters:
request - a HttpServletRequest object.
label - short name for Transition. SHOULD be non-null
comment - longer description of WorkflowTransition may be null
Throws:
javax.servlet.ServletException - if any.

delete

public void delete(javax.servlet.http.HttpServletRequest request)
            throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

setLabel

public void setLabel(javax.servlet.http.HttpServletRequest request,
                     java.lang.String val)
              throws javax.servlet.ServletException

Setter for the field label.

Parameters:
request - a HttpServletRequest object.
label - a new label value
Throws:
javax.servlet.ServletException - if any.

setComment

public void setComment(javax.servlet.http.HttpServletRequest request,
                       java.lang.String val)
                throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

setWorkspace

public void setWorkspace(javax.servlet.http.HttpServletRequest request,
                         org.openrdf.model.URI val)
                  throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

setInitial

public void setInitial(javax.servlet.http.HttpServletRequest request,
                       org.openrdf.model.URI val)
                throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

setFinal

public void setFinal(javax.servlet.http.HttpServletRequest request,
                     org.openrdf.model.URI val)
              throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

setOrder

public void setOrder(javax.servlet.http.HttpServletRequest request,
                     java.lang.String val)
              throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

setAction

public void setAction(javax.servlet.http.HttpServletRequest request,
                      java.lang.String val)
               throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

setActionParameter

public void setActionParameter(javax.servlet.http.HttpServletRequest request,
                               java.lang.String str)
                        throws javax.servlet.ServletException
ActionParameter may be stringified URI or literal; parse out URI or literal from val..

Throws:
javax.servlet.ServletException

setActionParameter

public void setActionParameter(javax.servlet.http.HttpServletRequest request,
                               org.openrdf.model.Value val)
                        throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

commit

public void commit(javax.servlet.http.HttpServletRequest request)
            throws javax.servlet.ServletException

commit - commit any changes made to this object (and any others)

Parameters:
request - a HttpServletRequest object.
Throws:
javax.servlet.ServletException - if any.

toString

public java.lang.String toString()

toString

Overrides:
toString in class java.lang.Object
Returns:
a detailed String representation of the object.

equals

public boolean equals(java.lang.Object other)
Transitions are equal if their subject URI is the same.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

doExportTransitions

public static void doExportTransitions(javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response,
                                       org.openrdf.rio.RDFFormat format,
                                       java.util.Set<java.lang.String> includes,
                                       java.util.Set<java.lang.String> excludes)
                                throws javax.servlet.ServletException,
                                       java.io.IOException
Export transitions to serialized quad format. Since a transition is simply a subject with certain required and optional properties, we can manage this by dumping out all statements about each relevant subject.

Throws:
javax.servlet.ServletException
java.io.IOException

doImportTransitions

public static void doImportTransitions(javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response,
                                       org.openrdf.repository.RepositoryConnection content,
                                       java.util.Set<java.lang.String> includes,
                                       java.util.Set<java.lang.String> excludes,
                                       ImportExport.DuplicateArg duplicate,
                                       boolean transform,
                                       boolean ignoreACL)
                                throws javax.servlet.ServletException,
                                       java.io.IOException
Import description of transitions from serialized RDF quads.

Throws:
javax.servlet.ServletException
java.io.IOException


Copyright © 2009-2011 Eagle-I. All Rights Reserved.