private CompiledModel getModelByUri(String uri) { for (CompiledModel model : getAllCustomM2Models(false)) { if (uri.equals(getModelNamespaceUriPrefix(model.getM2Model()).getFirst())) { return model; } } return null; }
private CompiledModel getModelByUri(String uri) { for (CompiledModel model : getAllCustomM2Models(false)) { if (uri.equals(getModelNamespaceUriPrefix(model.getM2Model()).getFirst())) { return model; } } return null; }
protected List<CustomModelDefinition> getAllCustomModels() { List<CustomModelDefinition> result = new ArrayList<>(); Collection<QName> models = dictionaryDAO.getModels(true); List<String> dictionaryModels = new ArrayList<>(); for (QName model : models) { dictionaryModels.add(model.toPrefixString()); } List<CompiledModel> compiledModels = getAllCustomM2Models(false); if (compiledModels.size() > 0) { for (CompiledModel model : compiledModels) { // check against models loaded in dictionary boolean isActive = false; if (dictionaryModels.contains(model.getM2Model().getName())) { isActive = true; } result.add(new CustomModelDefinitionImpl(model, isActive, dictionaryService)); } } return result; }
protected List<CustomModelDefinition> getAllCustomModels() { List<CustomModelDefinition> result = new ArrayList<>(); Collection<QName> models = dictionaryDAO.getModels(true); List<String> dictionaryModels = new ArrayList<>(); for (QName model : models) { dictionaryModels.add(model.toPrefixString()); } List<CompiledModel> compiledModels = getAllCustomM2Models(false); if (compiledModels.size() > 0) { for (CompiledModel model : compiledModels) { // check against models loaded in dictionary boolean isActive = false; if (dictionaryModels.contains(model.getM2Model().getName())) { isActive = true; } result.add(new CustomModelDefinitionImpl(model, isActive, dictionaryService)); } } return result; }
@Override public boolean isNamespacePrefixExists(String modelNamespacePrefix) { ParameterCheck.mandatoryString("modelNamespacePrefix", modelNamespacePrefix); Collection<String> prefixes = namespaceDAO.getPrefixes(); if (prefixes.contains(modelNamespacePrefix)) { return true; } for (CompiledModel model : getAllCustomM2Models(false)) { if (modelNamespacePrefix.equals(getModelNamespaceUriPrefix(model.getM2Model()).getSecond())) { return true; } } return false; }
@Override public boolean isNamespaceUriExists(String modelNamespaceUri) { ParameterCheck.mandatoryString("modelNamespaceUri", modelNamespaceUri); Collection<String> uris = namespaceDAO.getURIs(); if (uris.contains(modelNamespaceUri)) { return true; } for (CompiledModel model : getAllCustomM2Models(false)) { if (modelNamespaceUri.equals(getModelNamespaceUriPrefix(model.getM2Model()).getFirst())) { return true; } } return false; }
@Override public boolean isNamespaceUriExists(String modelNamespaceUri) { ParameterCheck.mandatoryString("modelNamespaceUri", modelNamespaceUri); Collection<String> uris = namespaceDAO.getURIs(); if (uris.contains(modelNamespaceUri)) { return true; } for (CompiledModel model : getAllCustomM2Models(false)) { if (modelNamespaceUri.equals(getModelNamespaceUriPrefix(model.getM2Model()).getFirst())) { return true; } } return false; }
@Override public boolean isNamespacePrefixExists(String modelNamespacePrefix) { ParameterCheck.mandatoryString("modelNamespacePrefix", modelNamespacePrefix); Collection<String> prefixes = namespaceDAO.getPrefixes(); if (prefixes.contains(modelNamespacePrefix)) { return true; } for (CompiledModel model : getAllCustomM2Models(false)) { if (modelNamespacePrefix.equals(getModelNamespaceUriPrefix(model.getM2Model()).getSecond())) { return true; } } return false; }
model = compiledModel.getM2Model();
M2Model model = compiledModel.getM2Model();
model = compiledModel.getM2Model();
M2Model model = compiledModel.getM2Model();