public boolean isGlobal() { return element.isGlobal(); }
/** * If only one global {@link XSElementDecl} is refering to {@link XSType}, * return that element, otherwise null. */ private @Nullable XSElementDecl getSoleElementReferer(@NotNull XSType t) { Set<XSComponent> referer = builder.getReferer(t); XSElementDecl sole = null; for (XSComponent r : referer) { if(r instanceof XSElementDecl) { XSElementDecl x = (XSElementDecl) r; if(!x.isGlobal()) // local element references can be ignored, as their names are either given // by the property, or by the JAXBElement (for things like mixed contents) continue; if(sole==null) sole=x; else return null; // more than one } else { // if another type refers to this type, that means // this type has a sub-type, so type substitution is possible now. return null; } } return sole; }
/** * If only one global {@link XSElementDecl} is refering to {@link XSType}, * return that element, otherwise null. */ private @Nullable XSElementDecl getSoleElementReferer(@NotNull XSType t) { Set<XSComponent> referer = builder.getReferer(t); XSElementDecl sole = null; for (XSComponent r : referer) { if(r instanceof XSElementDecl) { XSElementDecl x = (XSElementDecl) r; if(!x.isGlobal()) // local element references can be ignored, as their names are either given // by the property, or by the JAXBElement (for things like mixed contents) continue; if(sole==null) sole=x; else return null; // more than one } else { // if another type refers to this type, that means // this type has a sub-type, so type substitution is possible now. return null; } } return sole; }
/** * If only one global {@link XSElementDecl} is refering to {@link XSType}, * return that element, otherwise null. */ private @Nullable XSElementDecl getSoleElementReferer(@NotNull XSType t) { Set<XSComponent> referer = builder.getReferer(t); XSElementDecl sole = null; for (XSComponent r : referer) { if(r instanceof XSElementDecl) { XSElementDecl x = (XSElementDecl) r; if(!x.isGlobal()) // local element references can be ignored, as their names are either given // by the property, or by the JAXBElement (for things like mixed contents) continue; if(sole==null) sole=x; else return null; // more than one } else { // if another type refers to this type, that means // this type has a sub-type, so type substitution is possible now. return null; } } return sole; }
/** * If only one global {@link XSElementDecl} is refering to {@link XSType}, * return that element, otherwise null. */ private @Nullable XSElementDecl getSoleElementReferer(@NotNull XSType t) { Set<XSComponent> referer = builder.getReferer(t); XSElementDecl sole = null; for (XSComponent r : referer) { if(r instanceof XSElementDecl) { XSElementDecl x = (XSElementDecl) r; if(!x.isGlobal()) // local element references can be ignored, as their names are either given // by the property, or by the JAXBElement (for things like mixed contents) continue; if(sole==null) sole=x; else return null; // more than one } else { // if another type refers to this type, that means // this type has a sub-type, so type substitution is possible now. return null; } } return sole; }
/** * If only one global {@link XSElementDecl} is refering to {@link XSType}, * return that element, otherwise null. */ private @Nullable XSElementDecl getSoleElementReferer(@NotNull XSType t) { Set<XSComponent> referer = builder.getReferer(t); XSElementDecl sole = null; for (XSComponent r : referer) { if(r instanceof XSElementDecl) { XSElementDecl x = (XSElementDecl) r; if(!x.isGlobal()) // local element references can be ignored, as their names are either given // by the property, or by the JAXBElement (for things like mixed contents) continue; if(sole==null) sole=x; else return null; // more than one } else { // if another type refers to this type, that means // this type has a sub-type, so type substitution is possible now. return null; } } return sole; }
private CCustomizations getCustomizations( XSParticle src ) { // customizations for a particle should include those defined in the term unless it's global // this is so that the schema like: // // <xs:sequence> // <xs:element name="foo" type="xs:int"> // <xs:annotation><xs:appinfo> // <hyperjaxb:... /> // // would be picked up if(src.getTerm().isElementDecl()) { XSElementDecl xed = src.getTerm().asElementDecl(); if(xed.isGlobal()) return getCustomizations((XSComponent)src); } return getCustomizations(src,src.getTerm()); }
private CCustomizations getCustomizations( XSParticle src ) { // customizations for a particle should include those defined in the term unless it's global // this is so that the schema like: // // <xs:sequence> // <xs:element name="foo" type="xs:int"> // <xs:annotation><xs:appinfo> // <hyperjaxb:... /> // // would be picked up if(src.getTerm().isElementDecl()) { XSElementDecl xed = src.getTerm().asElementDecl(); if(xed.isGlobal()) return getCustomizations((XSComponent)src); } return getCustomizations(src,src.getTerm()); }
private CCustomizations getCustomizations( XSParticle src ) { // customizations for a particle should include those defined in the term unless it's global // this is so that the schema like: // // <xs:sequence> // <xs:element name="foo" type="xs:int"> // <xs:annotation><xs:appinfo> // <hyperjaxb:... /> // // would be picked up if(src.getTerm().isElementDecl()) { XSElementDecl xed = src.getTerm().asElementDecl(); if(xed.isGlobal()) return getCustomizations((XSComponent)src); } return getCustomizations(src,src.getTerm()); }
private CCustomizations getCustomizations( XSParticle src ) { // customizations for a particle should include those defined in the term unless it's global // this is so that the schema like: // // <xs:sequence> // <xs:element name="foo" type="xs:int"> // <xs:annotation><xs:appinfo> // <hyperjaxb:... /> // // would be picked up if(src.getTerm().isElementDecl()) { XSElementDecl xed = src.getTerm().asElementDecl(); if(xed.isGlobal()) return getCustomizations((XSComponent)src); } return getCustomizations(src,src.getTerm()); }
private CCustomizations getCustomizations( XSParticle src ) { // customizations for a particle should include those defined in the term unless it's global // this is so that the schema like: // // <xs:sequence> // <xs:element name="foo" type="xs:int"> // <xs:annotation><xs:appinfo> // <hyperjaxb:... /> // // would be picked up if(src.getTerm().isElementDecl()) { XSElementDecl xed = src.getTerm().asElementDecl(); if(xed.isGlobal()) return getCustomizations((XSComponent)src); } return getCustomizations(src,src.getTerm()); }
private void convertElement(String mainURI, XSElementDecl element, OntClass parent) { XSType elementType = element.getType(); String URI = getURI(mainURI, element); OntClass elementClass = null; if (element.isGlobal()) { if (elementType.isSimpleType()) { elementClass = convertSimpleType(mainURI, elementType.asSimpleType(), URI); } else if (elementType.isComplexType()) { elementClass = convertComplexType(mainURI, elementType.asComplexType(), URI); } } XSElementDecl subs = element.getSubstAffiliation(); if (subs != null && elementClass != null) { OntClass subsClass = ontology.createClass(getURI(mainURI, subs)); LOGGER.debug("Adding superclass: {}", subsClass); subsClass.addSubClass(elementClass); } } // mainURI is schema-specific
CCustomizations custs = builder.getBindInfo(decl).toCustomizationList(); if(decl.isGlobal()) { if(isCollapsable(decl)) {
CCustomizations custs = builder.getBindInfo(decl).toCustomizationList(); if(decl.isGlobal()) { if(isCollapsable(decl)) {
CCustomizations custs = builder.getBindInfo(decl).toCustomizationList(); if(decl.isGlobal()) { if(isCollapsable(decl)) {
if( getGlobalBinding().isSimpleMode() && decl.isGlobal()) {
if( getGlobalBinding().isSimpleMode() && decl.isGlobal()) {
if( getGlobalBinding().isSimpleMode() && decl.isGlobal()) {
if( getGlobalBinding().isSimpleMode() && decl.isGlobal()) {
CCustomizations custs = builder.getBindInfo(decl).toCustomizationList(); if(decl.isGlobal()) { if(isCollapsable(decl)) {