COSMOS ${releaseVersion} resource-modeling Project
Internal API Specification

org.eclipse.cosmos.rm.validation.internal.databuilders
Class IdentityConstraintDataBuilder.IdentityConstraintStructure

java.lang.Object
  extended by org.eclipse.cosmos.rm.validation.internal.databuilders.IdentityConstraintDataBuilder.IdentityConstraintStructure
Enclosing class:
IdentityConstraintDataBuilder

public static class IdentityConstraintDataBuilder.IdentityConstraintStructure
extends java.lang.Object

A data structure which stores information about the identity constraints. e.g. The declaration and the instances that require applying the identity constraint to.


Constructor Summary
IdentityConstraintDataBuilder.IdentityConstraintStructure()
           
 
Method Summary
 void addConstrainedInstance(java.lang.String alias, int[] indices)
          Adds a constrained instance to this structure
 void addDeclaration(java.lang.String uri, java.lang.String localName, IdentityConstraintDataBuilder.IdentityConstraintDecl identityDecl)
          Adds a declaration to this structure
 void addOrphanedConstrainedInstance(int orphanInx, int[] indices)
           
 java.util.Map getConstrainedInstances()
           
 java.util.Map getDeclarations()
           
 java.util.Map getOrphanedConstrainedInstances()
           
 boolean isConstrained(java.lang.String uri, java.lang.String localName)
          Retunrns true iff the element with the namespace, 'uri', and local name, 'localName' has an associated identity constraint.
 IdentityConstraintDataBuilder.IdentityConstraintDecl[] retrieveConstraint(java.lang.String uri, java.lang.String localName)
          Retrieves the constraints based on the uri and the local name of an element.
 void setConstrainedInstances(java.util.Map constrainedInstances)
           
 void setDeclarations(java.util.Map declarations)
           
 void setOrphanedConstrainedInstances(java.util.Map orphanedConstrainedInstances)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentityConstraintDataBuilder.IdentityConstraintStructure

public IdentityConstraintDataBuilder.IdentityConstraintStructure()
Method Detail

addDeclaration

public void addDeclaration(java.lang.String uri,
                           java.lang.String localName,
                           IdentityConstraintDataBuilder.IdentityConstraintDecl identityDecl)
Adds a declaration to this structure

Parameters:
uri - The uri of the element
localName - The local name of the element
identityDecl - The identity declaration

addConstrainedInstance

public void addConstrainedInstance(java.lang.String alias,
                                   int[] indices)
Adds a constrained instance to this structure

Parameters:
alias - The alias of the document
indices - The indices leading to the node that has an identity constraint

addOrphanedConstrainedInstance

public void addOrphanedConstrainedInstance(int orphanInx,
                                           int[] indices)

isConstrained

public boolean isConstrained(java.lang.String uri,
                             java.lang.String localName)
Retunrns true iff the element with the namespace, 'uri', and local name, 'localName' has an associated identity constraint.

Parameters:
uri - The URI of the element
localName - The local name of the element
Returns:
true if the element has an associated identity constraint; false otherwise

retrieveConstraint

public IdentityConstraintDataBuilder.IdentityConstraintDecl[] retrieveConstraint(java.lang.String uri,
                                                                                 java.lang.String localName)
Retrieves the constraints based on the uri and the local name of an element.

Parameters:
uri - The uri of an element
localName - The local name of an element
Returns:
The constraints associated with the element or null if no constraints are associated.

getConstrainedInstances

public java.util.Map getConstrainedInstances()
Returns:
the constrainedInstances

getDeclarations

public java.util.Map getDeclarations()
Returns:
the declarations

getOrphanedConstrainedInstances

public java.util.Map getOrphanedConstrainedInstances()
Returns:
the orphanedConstrainedInstances

setConstrainedInstances

public void setConstrainedInstances(java.util.Map constrainedInstances)
Parameters:
constrainedInstances - the constrainedInstances to set

setDeclarations

public void setDeclarations(java.util.Map declarations)
Parameters:
declarations - the declarations to set

setOrphanedConstrainedInstances

public void setOrphanedConstrainedInstances(java.util.Map orphanedConstrainedInstances)
Parameters:
orphanedConstrainedInstances - the orphanedConstrainedInstances to set

COSMOS ${releaseVersion} resource-modeling Project
Internal API Specification