public SchemaGenerationConstraintsType generateObjectClass(QName value) { getGenerateObjectClass().add(value); return this; }
/** * Creates a new {@code SchemaGenerationConstraintsType} instance by deeply copying a given {@code SchemaGenerationConstraintsType} instance. * * * @param o * The instance to copy. * @throws NullPointerException * if {@code o} is {@code null}. */ public SchemaGenerationConstraintsType(final SchemaGenerationConstraintsType o) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 super(); if (o == null) { throw new NullPointerException("Cannot create a copy of 'SchemaGenerationConstraintsType' from 'null'."); } // 'GenerateObjectClass' collection. if (o.generateObjectClass!= null) { copyGenerateObjectClass(o.getGenerateObjectClass(), this.getGenerateObjectClass()); } }
/** * Creates and returns a deep copy of this object. * * * @return * A deep copy of this object. */ @Override public SchemaGenerationConstraintsType clone() { try { { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 final SchemaGenerationConstraintsType clone = ((SchemaGenerationConstraintsType) super.clone()); // 'GenerateObjectClass' collection. if (this.generateObjectClass!= null) { clone.generateObjectClass = null; copyGenerateObjectClass(this.getGenerateObjectClass(), clone.getGenerateObjectClass()); } return clone; } } catch (CloneNotSupportedException e) { // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/ throw new AssertionError(e); } }
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { List<QName> theGenerateObjectClass; theGenerateObjectClass = (((this.generateObjectClass!= null)&&(!this.generateObjectClass.isEmpty()))?this.getGenerateObjectClass():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "generateObjectClass", theGenerateObjectClass), currentHashCode, theGenerateObjectClass); } return currentHashCode; }
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof SchemaGenerationConstraintsType)) { return false; } if (this == object) { return true; } final SchemaGenerationConstraintsType that = ((SchemaGenerationConstraintsType) object); { List<QName> lhsGenerateObjectClass; lhsGenerateObjectClass = (((this.generateObjectClass!= null)&&(!this.generateObjectClass.isEmpty()))?this.getGenerateObjectClass():null); List<QName> rhsGenerateObjectClass; rhsGenerateObjectClass = (((that.generateObjectClass!= null)&&(!that.generateObjectClass.isEmpty()))?that.getGenerateObjectClass():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "generateObjectClass", lhsGenerateObjectClass), LocatorUtils.property(thatLocator, "generateObjectClass", rhsGenerateObjectClass), lhsGenerateObjectClass, rhsGenerateObjectClass)) { return false; } } return true; }
public static List<QName> getSchemaGenerationConstraints(ResourceType resource){ if (hasSchemaGenerationConstraints(resource)){ return resource.getSchema().getGenerationConstraints().getGenerateObjectClass(); } return null; }
public static boolean hasSchemaGenerationConstraints(ResourceType resource){ if (resource == null){ return false; } if (resource.getSchema() == null){ return false; } if (resource.getSchema().getGenerationConstraints() == null){ return false; } List<QName> constainst = resource.getSchema().getGenerationConstraints().getGenerateObjectClass(); if (constainst == null){ return false; } return !constainst.isEmpty(); }
.createProperty(XmlSchemaType.F_GENERATION_CONSTRAINTS); SchemaGenerationConstraintsType constraints = new SchemaGenerationConstraintsType(); constraints.getGenerateObjectClass().addAll(objectClasses); generationConstraints.setRealValue(constraints);