public String get_default_element_text(QName eltName) { SchemaProperty prop = schemaType().getElementProperty(eltName); if (prop == null) return ""; return prop.getDefaultText(); }
/** * Inserting a new element is always unambiguous except in one * situation: when adding an element after the last one with * that name (or the first one if there are none). * * In that case, add the element at the first possible slot * BEFORE any element whose qname is contained in the QNameSet * given. (If the QNameSet is empty, that means add the new * element at the very end.) * * If the returned QNameSet is null, treat it as if the QNameSet * contained all QNames, i.e., add the new element at the very * first position possible (adjacent to the last element of the * same name, or at the very first slot if it is the first elt * with that name). */ public final QNameSet get_element_ending_delimiters(QName eltname) { SchemaProperty prop = schemaType().getElementProperty(eltname); if (prop == null) return null; return prop.getJavaSetterDelimiter(); }
/** * Returns the default element text, if it's consistent. If it's * not consistent, returns null, and requires a visitor walk. * * Also returns null if there is no default at all (although * that can also be discovered via get_elementflags without * doing a walk). */ public String get_default_element_text(QName eltName) { assert(_isComplexContent()); if (!_isComplexContent()) throw new IllegalStateException(); SchemaProperty prop = schemaType().getElementProperty(eltName); if (prop == null) return ""; return prop.getDefaultText(); }
SchemaProperty baseProp = prop.isAttribute() ? baseType.getAttributeProperty(prop.getName()) : baseType.getElementProperty(prop.getName());
public int get_elementflags(QName eltName) { SchemaProperty prop = schemaType().getElementProperty(eltName); if (prop == null) return 0; if (prop.hasDefault() == SchemaProperty.VARIABLE || prop.hasFixed() == SchemaProperty.VARIABLE || prop.hasNillable() == SchemaProperty.VARIABLE) return -1; return (prop.hasDefault() == SchemaProperty.NEVER ? 0 : TypeStore.HASDEFAULT) | (prop.hasFixed() == SchemaProperty.NEVER ? 0 : TypeStore.FIXED) | (prop.hasNillable() == SchemaProperty.NEVER ? 0 : TypeStore.NILLABLE); }
/** * Returns the elementflags, if they're consistent. If they're * not, returns -1, and requires a vistor walk. */ public int get_elementflags(QName eltName) { if (!_isComplexContent()) return 0; SchemaProperty prop = schemaType().getElementProperty(eltName); if (prop == null) return 0; if (prop.hasDefault() == SchemaProperty.VARIABLE || prop.hasFixed() == SchemaProperty.VARIABLE || prop.hasNillable() == SchemaProperty.VARIABLE) return -1; return (prop.hasDefault() == SchemaProperty.NEVER ? 0 : TypeStore.HASDEFAULT) | (prop.hasFixed() == SchemaProperty.NEVER ? 0 : TypeStore.FIXED) | (prop.hasNillable() == SchemaProperty.NEVER ? 0 : TypeStore.NILLABLE); }
SchemaType docType = wildcardTypeLoader.findDocumentType(eltName); if (docType != null) prop = docType.getElementProperty(eltName);
(sImpl.isAttribute() ? baseType.getAttributeProperty(sImpl.getName()) : baseType.getElementProperty(sImpl.getName()));
public String get_default_element_text(QName eltName) { SchemaProperty prop = schemaType().getElementProperty(eltName); if (prop == null) return ""; return prop.getDefaultText(); }
public String get_default_element_text(QName eltName) { SchemaProperty prop = schemaType().getElementProperty(eltName); if (prop == null) return ""; return prop.getDefaultText(); }
throw new Exception(); SchemaPropertyImpl sProp = (SchemaPropertyImpl)parentType.getElementProperty(model.getName()); if (sProp != null && sProp.getDefaultText() != null) SchemaPropertyImpl sProp = (SchemaPropertyImpl)parentType.getElementProperty(model.getName()); if (sProp != null && sProp.getDefaultText() != null)
/** * Returns the default element text, if it's consistent. If it's * not consistent, returns null, and requires a visitor walk. * * Also returns null if there is no default at all (although * that can also be discovered via get_elementflags without * doing a walk). */ public String get_default_element_text(QName eltName) { assert(_isComplexContent()); if (!_isComplexContent()) throw new IllegalStateException(); SchemaProperty prop = schemaType().getElementProperty(eltName); if (prop == null) return ""; return prop.getDefaultText(); }
/** * Returns the default element text, if it's consistent. If it's * not consistent, returns null, and requires a visitor walk. * * Also returns null if there is no default at all (although * that can also be discovered via get_elementflags without * doing a walk). */ public String get_default_element_text(QName eltName) { assert(_isComplexContent()); if (!_isComplexContent()) throw new IllegalStateException(); SchemaProperty prop = schemaType().getElementProperty(eltName); if (prop == null) return ""; return prop.getDefaultText(); }
private File[] getServerLogsLocation(TcConfig configBeans) { Server[] servers = getServersElement(configBeans); String[] logs = new String[servers.length]; File[] logFiles = new File[servers.length]; for (int i = 0; i < servers.length; i++) { logs[i] = servers[i].getLogs(); if (isStdX(logs[i])) logs[i] = null; if (logs[i] == null) logs[i] = Server.type.getElementProperty(QName.valueOf("logs")).getDefaultText(); logs[i] = ParameterSubstituter.substitute(logs[i]); File serverLogsDir = makeAbsolute(new File(logs[i])); if (!serverLogsDir.exists()) { quit("\nError occured while parsing: " + tcConfig + "\n\tUnable to resolve the server log location element to an actual file: " + logs[i]); } logFiles[i] = serverLogsDir; } return logFiles; }
private File getClientLogsLocation(TcConfig configBeans) { Client clients = configBeans.getClients(); if (clients == null) { quit("The Terracotta config specified doesn't contain the <clients> element.\nYou may have provided a server config by mistake."); } String logs = clients.getLogs(); if (isStdX(logs)) return null; if (logs == null) { logs = Client.type.getElementProperty(QName.valueOf("logs")).getDefaultText(); } String clientLogs = ParameterSubstituter.substitute(logs); File clientLogsDir = makeAbsolute(new File(clientLogs)); if (!clientLogsDir.exists()) { quit("\nError occured while parsing: " + tcConfig + "\n\tUnable to locate client log files at: " + clientLogs); } return clientLogsDir; }
private File getClientLogsLocation(TcConfig configBeans) { Client clients = configBeans.getClients(); if (clients == null) { quit("The Terracotta config specified doesn't contain the <clients> element.\nYou may have provided a server config by mistake."); } String logs = clients.getLogs(); if (isStdX(logs)) return null; if (logs == null) { logs = Client.type.getElementProperty(QName.valueOf("logs")).getDefaultText(); } String clientLogs = ParameterSubstituter.substitute(logs); File clientLogsDir = makeAbsolute(new File(clientLogs)); if (!clientLogsDir.exists()) { quit("\nError occured while parsing: " + tcConfig + "\n\tUnable to locate client log files at: " + clientLogs); } return clientLogsDir; }
private File getClientLogsLocation(TcConfig configBeans) { Client clients = configBeans.getClients(); if (clients == null) { quit("The Terracotta config specified doesn't contain the <clients> element.\nYou may have provided a server config by mistake."); } String logs = clients.getLogs(); if (isStdX(logs)) return null; if (logs == null) { logs = Client.type.getElementProperty(QName.valueOf("logs")).getDefaultText(); } String clientLogs = ParameterSubstituter.substitute(logs); File clientLogsDir = makeAbsolute(new File(clientLogs)); if (!clientLogsDir.exists()) { quit("\nError occured while parsing: " + tcConfig + "\n\tUnable to locate client log files at: " + clientLogs); } return clientLogsDir; }
public String getWrappedElementType(QName wrapperElement, QName item) { SchemaGlobalElement elem = typeSystem.findElement(wrapperElement); if (elem == null) { elem = typeLoader.findElement(wrapperElement); } SchemaType st = elem.getType(); SchemaProperty prop = st.getElementProperty(item); SchemaType partType = prop.getType(); String s = XMLBeansSchemaTypeUtils.getNaturalJavaClassName(partType); if (prop.extendsJavaArray()) { s += "[]"; } return s; }
public int get_elementflags(QName eltName) { SchemaProperty prop = schemaType().getElementProperty(eltName); if (prop == null) return 0; if (prop.hasDefault() == SchemaProperty.VARIABLE || prop.hasFixed() == SchemaProperty.VARIABLE || prop.hasNillable() == SchemaProperty.VARIABLE) return -1; return (prop.hasDefault() == SchemaProperty.NEVER ? 0 : TypeStore.HASDEFAULT) | (prop.hasFixed() == SchemaProperty.NEVER ? 0 : TypeStore.FIXED) | (prop.hasNillable() == SchemaProperty.NEVER ? 0 : TypeStore.NILLABLE); }
public int get_elementflags(QName eltName) { SchemaProperty prop = schemaType().getElementProperty(eltName); if (prop == null) return 0; if (prop.hasDefault() == SchemaProperty.VARIABLE || prop.hasFixed() == SchemaProperty.VARIABLE || prop.hasNillable() == SchemaProperty.VARIABLE) return -1; return (prop.hasDefault() == SchemaProperty.NEVER ? 0 : TypeStore.HASDEFAULT) | (prop.hasFixed() == SchemaProperty.NEVER ? 0 : TypeStore.FIXED) | (prop.hasNillable() == SchemaProperty.NEVER ? 0 : TypeStore.NILLABLE); }