/** * Checks if a statement is a valid XDI $lesser condition. * @param XDIstatement The statement to check. * @return True if the statement is a valid XDI $lesser condition. */ public static boolean isValid(XDIStatement XDIstatement) { if (! XDIstatement.isRelationStatement()) return false; if (! XDIPolicyConstants.XDI_ADD_LESSER.equals(XDIstatement.getRelationXDIAddress())) return false; return true; }
@Override public boolean equals(Object object) { if (! (object instanceof CloudName)) return false; if (object == this) return true; return this.getXDIAddress().equals(((CloudName) object).getXDIAddress()); }
@Override public boolean equals(Object object) { if (! (object instanceof DID)) return false; if (object == this) return true; return this.getXDIAddress().equals(((DID) object).getXDIAddress()); }
private boolean matchesNext(MatchPosition other) { if (other.forward && other.position + 1 >= other.XDIaddress.getNumXDIArcs()) return false; if (! other.forward && other.position -1 < 0) return false; XDIArc myXDIArc = this.XDIaddress.getXDIArc(this.position); XDIArc otherXDIArc = other.XDIaddress.getXDIArc(other.forward ? other.position + 1 : other.position - 1); return myXDIArc.equals(otherXDIArc); }
public String getValue() { if (this.XDIarc != null) return this.XDIarc.toString(); if (this.partialSubject != null && this.partialPredicate != null) return this.partialSubject.toString() + "/" + this.partialPredicate.toString(); if (this.iri != null) return this.iri; if (this.literal != null) return this.literal; return null; } }
public Character getCs() { return this.getXDIAddress().getFirstXDIArc().getCs(); }
@Override public String toString() { return this.getXDIAddress().toString(); } }
@Override public String toString() { return this.getXDIAddress().toString(); } }
@Override public boolean equals(Object object) { if (! (object instanceof CloudNumber)) return false; if (object == this) return true; return this.getXDIAddress().equals(((CloudNumber) object).getXDIAddress()); }
@Override public String toString() { return this.getXDIAddress().toString(); } }
@Override public CloudNumber map(XDIAddress XDIaddress) { if (this.peerRootXDIArc) return CloudNumber.fromPeerRootXDIArc(XDIArc.fromComponent(XDIaddress)); else return CloudNumber.fromXDIAddress(XDIaddress); } }
@Override public CloudName map(XDIAddress XDIaddress) { if (this.peerRootXDIArc) return CloudName.fromPeerRootXDIArc(XDIArc.fromComponent(XDIaddress)); else return CloudName.fromXDIAddress(XDIaddress); } }
public boolean isLiteralNodeXDIAddress() { XDIArc XDIarc = this.getLastXDIArc(); if (XDIarc == null) return false; return XDIarc.isLiteralNodeXDIArc(); } }
/** * Checks if a statement is a valid XDI $greater condition. * @param XDIstatement The statement to check. * @return True if the statement is a valid XDI $greater condition. */ public static boolean isValid(XDIStatement XDIstatement) { if (! XDIstatement.isRelationStatement()) return false; if (! XDIPolicyConstants.XDI_ADD_GREATER.equals(XDIstatement.getRelationXDIAddress())) return false; return true; }
/** * Checks if a statement is a valid XDI $is condition. * @param XDIstatement The statement to check. * @return True if the statement is a valid XDI $is condition. */ public static boolean isValid(XDIStatement XDIstatement) { if (! XDIstatement.isRelationStatement()) return false; if (! XDIPolicyConstants.XDI_ADD_IS.equals(XDIstatement.getRelationXDIAddress())) return false; return true; }
/** * Checks if a statement is a valid XDI $equals condition. * @param XDIstatement The statement to check. * @return True if the statement is a valid XDI $equals condition. */ public static boolean isValid(XDIStatement XDIstatement) { if (! XDIstatement.isRelationStatement()) return false; if (! XDIPolicyConstants.XDI_ADD_EQUALS.equals(XDIstatement.getRelationXDIAddress())) return false; return true; }
/** * Checks if a statement is a valid XDI $matches condition. * @param XDIstatement The statement to check. * @return True if the statement is a valid XDI $matches condition. */ public static boolean isValid(XDIStatement XDIstatement) { if (! XDIstatement.isRelationStatement()) return false; if (! XDIPolicyConstants.XDI_ADD_MATCHES.equals(XDIstatement.getRelationXDIAddress())) return false; return true; }
private static boolean isSetOnRefRepStatement(XDIStatement targetXDIStatement, Operation operation) { if (! (operation instanceof SetOperation)) return false; if (! targetXDIStatement.isRelationStatement()) return false; if (XDIDictionaryConstants.XDI_ADD_REF.equals(targetXDIStatement.getRelationXDIAddress())) return true; if (XDIDictionaryConstants.XDI_ADD_REP.equals(targetXDIStatement.getRelationXDIAddress())) return true; return false; }