com.xerox.jxip
Class XipDependency

java.lang.Object
  extended by com.xerox.jxip.XipDependency

public class XipDependency
extends java.lang.Object

XipDependency class


Constructor Summary
XipDependency(java.lang.String name, long index)
          Constructor
 
Method Summary
 XipNode getArg(int n)
          Gets the Nth node argument of this dependency.
 java.lang.String getFeature(java.lang.String name)
          Gets the value of the specified feature
 java.util.Vector<XipFeature> getFeatures()
          Gets the features
 long getIndex()
          Gets the node index
 java.lang.String getName()
          Gets the dependency name
 java.lang.String getNameAndParamName()
          Gets the nameAndParamName attribute of the XipDependency object
 java.util.Vector<XipNode> getParameters()
          Gets the parameters
 boolean hasFeature(java.lang.String name, java.lang.String value)
          Tests if the dependency has a given feature.
 boolean hasFeatures(java.lang.String features)
          Tests if the dependency has given features.
 void setFeatures(java.util.Vector<XipFeature> feat)
          Sets the features The features: a Vector of XipFeatures
 java.lang.String toString()
          return the dependency name
 java.lang.String toString(boolean withFeature)
          return XipDependency data as a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XipDependency

public XipDependency(java.lang.String name,
                     long index)
Constructor

Parameters:
name - name of the dependency
index -
Method Detail

getName

public java.lang.String getName()
Gets the dependency name

Returns:
The name

getNameAndParamName

public java.lang.String getNameAndParamName()
Gets the nameAndParamName attribute of the XipDependency object

Returns:
The nameAndParamName value

getIndex

public long getIndex()
Gets the node index

Returns:
The index value

getFeatures

public java.util.Vector<XipFeature> getFeatures()
Gets the features

Returns:
The features: a Vector of XipFeatures

getFeature

public java.lang.String getFeature(java.lang.String name)
Gets the value of the specified feature

Parameters:
name -
Returns:
a String value of the specified feature, or null if the feature does not exist

hasFeature

public boolean hasFeature(java.lang.String name,
                          java.lang.String value)
Tests if the dependency has a given feature.

Parameters:
name - the name of the feature
value - the value of the feature ("*" if all values are fine) Value can be negated ("~" or "~value")
Returns:
true whether the dependency has the feature with the appropriate value false otherwise

hasFeatures

public boolean hasFeatures(java.lang.String features)
Tests if the dependency has given features. These features are separated by ",", and the names are separated from values by ":". All is in XIP format

Parameters:
features - the list features in XIP format
Returns:
true whether the dependency has the features with the appropriate value false otherwise

setFeatures

public void setFeatures(java.util.Vector<XipFeature> feat)
Sets the features The features: a Vector of XipFeatures

Parameters:
feat - The new features value

getParameters

public java.util.Vector<XipNode> getParameters()
Gets the parameters

Returns:
The parameters: a Vector of XipNode

getArg

public XipNode getArg(int n)
Gets the Nth node argument of this dependency.

Parameters:
n - The order of the required argument ( n >= 1, argument 1 being the first argument).
Returns:
The XipNode that is the n-th argument of this dependency relation if such argument exists; null otherwise.

toString

public java.lang.String toString()
return the dependency name

Overrides:
toString in class java.lang.Object
Returns:
the dependency name

toString

public java.lang.String toString(boolean withFeature)
return XipDependency data as a string

Parameters:
withFeature - if true build the string with the dependency features
Returns:
XipDependecy to a string


Copyright © 2008 Xerox All Rights Reserved.