public static XDIArc createXDIArc(Character cs, boolean immutable, boolean relative, String literal, XDIXRef xref) { return XDIArc.fromComponents( cs, false, false, false, false, immutable, relative, literal, xref); }
public static XDIArc createXDIArc(Character cs, boolean immutable, boolean relative, String literal, XDIXRef xref) { return XDIArc.fromComponents( cs, false, false, false, true, immutable, relative, literal, xref); }
public static XDIArc createXDIArc(Character cs, boolean attribute, boolean immutable, boolean relative, String literal, XDIXRef xref) { return XDIArc.fromComponents( cs, false, false, false, attribute, immutable, relative, literal, xref); }
public static XDIArc createXDIArc(Character cs, boolean attribute, boolean immutable, boolean relative, String literal, XDIXRef xref) { return XDIArc.fromComponents( cs, false, false, true, attribute, immutable, relative, literal, xref); }
public static XDIArc fromComponents(Character cs, boolean variable, boolean definition, boolean collection, boolean attribute, boolean immutable, boolean relative, String literal, XDIXRef xref) { return fromComponents(null, cs, variable, definition, collection, attribute, immutable, relative, literal, xref); }
protected XDIArc newXDIArc(String string, Character cs, boolean variable, boolean definition, boolean collection, boolean attribute, boolean immutable, boolean relative, String literal, XDIXRef xref) { return XDIArc.fromComponents(string, cs, variable, definition, collection, attribute, immutable, relative, literal, xref); }
@Override protected Map<XDIArc, Object> getReplacements(XDIAddress XDIaddress) { Map<XDIArc, Object> replacements = null; for (XDIArc XDIarc : XDIaddress.getXDIArcs()) { if (! XDIConstants.CS_CLASS_RESERVED.equals(XDIarc.getCs())) continue; if (! XDIarc.isVariable()) continue; if (! XDIarc.isRelative()) continue; if (replacements == null) replacements = new HashMap<XDIArc, Object> (); XDIArc newXDIArc = XDIArc.fromComponents(XDIarc.getCs(), true, XDIarc.isDefinition(), XDIarc.isCollection(), XDIarc.isAttribute(), XDIarc.isImmutable(), false, XDIarc.getLiteral(), XDIarc.getXRef()); replacements.put(XDIarc, newXDIArc); } return replacements; } }
/** * Returns the inner root arc of a subject address and a predicate address. * @param subject A subject address. * @param predicate A subject address. * @return The inner root arc of the subject address and the predicate address. */ public static XDIArc createInnerRootXDIArc(XDIAddress subject, XDIAddress predicate) { if (subject.getNumXDIArcs() > 0 && XdiAbstractRoot.isValidXDIArc(subject.getFirstXDIArc())) throw new Xdi2GraphException("Cannot create an inner root XDI arc for subject " + subject + " and predicate " + predicate); return XDIArc.fromComponents( null, false, false, false, false, false, false, null, XDIXRef.fromComponents( XDIConstants.XS_ROOT, null, subject, predicate, null, null)); }
XDIarcs.add(XDIArc.fromComponents(XDIarc.getCs(), XDIarc.isVariable(), XDIarc.isDefinition(), XDIarc.isCollection(), XDIarc.isAttribute(), XDIarc.isImmutable(), XDIarc.isRelative(), null, XDIXRef.fromComponents(XDIarc.getXRef().getXs(), replacedXrefXDIArc, null, null, null, null))); XDIAddress replacedXrefPartialPredicate = replaceXDIAddress(xrefPartialPredicate, oldXDIArc, newXDIAddress); XDIarcs.add(XDIArc.fromComponents(XDIarc.getCs(), XDIarc.isVariable(), XDIarc.isDefinition(), XDIarc.isCollection(), XDIarc.isAttribute(), XDIarc.isImmutable(), XDIarc.isRelative(), null, XDIXRef.fromComponents(XDIarc.getXRef().getXs(), null, replacedXrefPartialSubject, replacedXrefPartialPredicate, null, null)));