< prev index next >

jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/IdentityConstraintImpl.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 57,116 **** super(_owner, _annon, _loc, fa); this.category = category; this.name = name; this.selector = selector; selector.setParent(this); ! this.fields = Collections.unmodifiableList((List<? extends XSXPath>)fields); for( XPathImpl xp : fields ) xp.setParent(this); this.refer = refer; } public void visit(XSVisitor visitor) { visitor.identityConstraint(this); } public <T> T apply(XSFunction<T> function) { return function.identityConstraint(this); } public void setParent(ElementDecl parent) { this.parent = parent; parent.getOwnerSchema().addIdentityConstraint(this); } public XSElementDecl getParent() { return parent; } public String getName() { return name; } public String getTargetNamespace() { return getParent().getTargetNamespace(); } public short getCategory() { return category; } public XSXPath getSelector() { return selector; } public List<XSXPath> getFields() { return fields; } public XSIdentityConstraint getReferencedKey() { if(category==KEYREF) return refer.get(); else throw new IllegalStateException("not a keyref"); } public XSIdentityConstraint get() { return this; } } --- 57,126 ---- super(_owner, _annon, _loc, fa); this.category = category; this.name = name; this.selector = selector; selector.setParent(this); ! this.fields = (List<XSXPath>) Collections.unmodifiableList((List<? extends XSXPath>)fields); for( XPathImpl xp : fields ) xp.setParent(this); this.refer = refer; } + @Override public void visit(XSVisitor visitor) { visitor.identityConstraint(this); } + @Override public <T> T apply(XSFunction<T> function) { return function.identityConstraint(this); } public void setParent(ElementDecl parent) { this.parent = parent; parent.getOwnerSchema().addIdentityConstraint(this); } + @Override public XSElementDecl getParent() { return parent; } + @Override public String getName() { return name; } + @Override public String getTargetNamespace() { return getParent().getTargetNamespace(); } + @Override public short getCategory() { return category; } + @Override public XSXPath getSelector() { return selector; } + @Override public List<XSXPath> getFields() { return fields; } + @Override public XSIdentityConstraint getReferencedKey() { if(category==KEYREF) return refer.get(); else throw new IllegalStateException("not a keyref"); } + @Override public XSIdentityConstraint get() { return this; } }
< prev index next >