/** * Builder initialized from an existing object. * * @param expected the existing object * @param df data factory */ public BuilderPropertyChain(OWLSubPropertyChainOfAxiom expected, OWLDataFactory df) { this(df); withPropertiesInChain(expected.getPropertyChain()).withProperty(expected.getSuperProperty()) .withAnnotations( expected.annotations()); }
@Override public OWLSubPropertyChainOfAxiom buildObject() { return df.getOWLSubPropertyChainOfAxiom(chain, getProperty(), annotations); } }
@Override void setHandler(OWLXMLPH handler) { super.setHandler(handler); chain = new BuilderPropertyChain(df); }
@Override @SuppressWarnings("unchecked") public <T> T getOWLObject() { if (verifyNotNull(chain).chainSize() > 0) { return (T) verifyNotNull(chain).buildObject(); } return (T) builder.buildObject(); } }
@Override void handleChild(ObjectPropertyEH h) { OWLObjectPropertyExpression prop = h.getOWLObject(); if (builder.getSub() == null && verifyNotNull(chain).chainSize() == 0) { builder.withSub(prop); } else if (builder.getSup() == null) { builder.withSup(prop); verifyNotNull(chain).withProperty(prop); } else { ensureNotNull(null, "Expected two object property expression elements"); } }
@Override void handleChild(ChainEH h) { verifyNotNull(chain).withPropertiesInChain(h.getOWLObject()); }
@Override void handleChild(AnnEH h) { super.handleChild(h); verifyNotNull(chain).withAnnotation(h.getOWLObject()); }
@Override void handleChild(ObjectPropertyEH h) { OWLObjectPropertyExpression prop = h.getOWLObject(); if (builder.getSub() == null && verifyNotNull(chain).chainSize() == 0) { builder.withSub(prop); } else if (builder.getSup() == null) { builder.withSup(prop); verifyNotNull(chain).withProperty(prop); } else { ensureNotNull(null, "Expected two object property expression elements"); } }
@Override @SuppressWarnings("unchecked") public <T> T getOWLObject() { if (verifyNotNull(chain).chainSize() > 0) { return (T) verifyNotNull(chain).buildObject(); } return (T) builder.buildObject(); } }
@Override void handleChild(ChainEH h) { verifyNotNull(chain).withPropertiesInChain(h.getOWLObject()); }
@Override void handleChild(AnnEH h) { super.handleChild(h); verifyNotNull(chain).withAnnotation(h.getOWLObject()); }
/** * Builder initialized from an existing object. * * @param expected the existing object * @param df data factory */ public BuilderPropertyChain(OWLSubPropertyChainOfAxiom expected, OWLDataFactory df) { this(df); withPropertiesInChain(expected.getPropertyChain()).withProperty(expected.getSuperProperty()) .withAnnotations( expected.annotations()); }
@Override void handleChild(ObjectPropertyEH h) { OWLObjectPropertyExpression prop = h.getOWLObject(); if (builder.getSub() == null && verifyNotNull(chain).chainSize() == 0) { builder.withSub(prop); } else if (builder.getSup() == null) { builder.withSup(prop); verifyNotNull(chain).withProperty(prop); } else { ensureNotNull(null, "Expected two object property expression elements"); } }
@Override @SuppressWarnings("unchecked") public <T> T getOWLObject() { if (verifyNotNull(chain).chainSize() > 0) { return (T) verifyNotNull(chain).buildObject(); } return (T) builder.buildObject(); } }
@Override void handleChild(ChainEH h) { verifyNotNull(chain).withPropertiesInChain(h.getOWLObject()); }
@Override public OWLSubPropertyChainOfAxiom buildObject() { return df.getOWLSubPropertyChainOfAxiom(chain, verifyNotNull(getProperty()), annotations); } }
@Override void setHandler(OWLXMLPH handler) { super.setHandler(handler); chain = new BuilderPropertyChain(df); }
@Override void handleChild(AnnEH h) { super.handleChild(h); verifyNotNull(chain).withAnnotation(h.getOWLObject()); }
/** * Builder initialized from an existing object. * * @param expected the existing object * @param df data factory */ public BuilderPropertyChain(OWLSubPropertyChainOfAxiom expected, OWLDataFactory df) { this(df); withPropertiesInChain(expected.getPropertyChain()).withProperty(expected.getSuperProperty()) .withAnnotations( expected.annotations()); }
@Override void handleChild(ObjectPropertyEH h) { OWLObjectPropertyExpression prop = h.getOWLObject(); if (builder.getSub() == null && verifyNotNull(chain).chainSize() == 0) { builder.withSub(prop); } else if (builder.getSup() == null) { builder.withSup(prop); verifyNotNull(chain).withProperty(prop); } else { ensureNotNull(null, "Expected two object property expression elements"); } }