use of org.talend.repository.generic.model.genericMetadata.SubContainer in project tdi-studio-se by Talend.
the class GenericRepository method getContainer.
private SubContainer getContainer(GenericConnection connection, String repositoryLocation) {
SubContainer theContainer = null;
String containers = repositoryLocation;
if (containers.indexOf(IGenericConstants.REPOSITORY_LOCATION_SEPARATOR) != -1) {
containers = containers.substring(repositoryLocation.indexOf(IGenericConstants.REPOSITORY_LOCATION_SEPARATOR) + 1);
String[] containersArray = containers.split(IGenericConstants.REPOSITORY_LOCATION_SEPARATOR);
for (String container : containersArray) {
if (theContainer == null) {
theContainer = getTheContainer(connection, container);
} else {
theContainer = getTheContainer(theContainer, container);
if (theContainer == null) {
//$NON-NLS-1$
throw new RuntimeException("Failed to find the SubContainer named:" + container);
}
}
}
}
return theContainer;
}
use of org.talend.repository.generic.model.genericMetadata.SubContainer in project tdi-studio-se by Talend.
the class GenericRepository method createContainer.
private SubContainer createContainer(String containerName, String serializedProperties) {
SubContainer subContainer = GenericMetadataFactory.eINSTANCE.createSubContainer();
subContainer.setName(containerName);
subContainer.setCompProperties(serializedProperties);
return subContainer;
}
use of org.talend.repository.generic.model.genericMetadata.SubContainer in project tdi-studio-se by Talend.
the class GenericRepositoryContentHandler method createSubNodes.
private void createSubNodes(RepositoryNode parentNode, IRepositoryViewObject repObj, Package pack) {
List<SubContainer> subContainers = PackageHelper.getOwnedElements(pack, SubContainer.class);
if (subContainers.size() > 0) {
for (SubContainer subContainer : subContainers) {
RepositoryNode subContainerNode = createSubContainerNode(parentNode, subContainer.getName());
createSubNodes(subContainerNode, repObj, subContainer);
}
} else {
List<MetadataTable> metadataTables = PackageHelper.getOwnedElements(pack, MetadataTable.class);
for (MetadataTable metadataTable : metadataTables) {
createTable(parentNode, repObj, metadataTable);
}
}
}
Aggregations