/** * Sets a property on the artifact. * @param artifact * @param propName * @param propValue */ private void setProperty(BaseArtifactType artifact, String propName, String propValue) { String propNameLC = propName.toLowerCase(); if (CORE_PROPERTIES.contains(propNameLC)) { if (propNameLC.equals("name")) { artifact.setName(propValue); } else if (propNameLC.equals("description")) { artifact.setDescription(propValue); } else if (propNameLC.equals("version")) { artifact.setVersion(propValue); } } else { ArtificerModelUtils.setCustomProperty(artifact, propName, propValue); } }
private void setVdbVersion( final Element element, final String attributeName, final BaseArtifactType artifact, final String propertyName ) throws Exception { String version = element.getAttribute(attributeName); if (Utils.isEmpty(version)) { version = Vdb.DEFAULT_VERSION; } SrampModelUtils.setCustomProperty(artifact, propertyName, version); // set artifact version if not already set if (Utils.isEmpty(artifact.getVersion())) { artifact.setVersion(version); } }
metaData.setDescription(propValArg); } else if ("version".equals(propNameArg)) { metaData.setVersion(propValArg); } else if ("createdBy".equals(propNameArg)) { metaData.setCreatedBy(propValArg);
artifact.setName(getProperty(jcrNode, "sramp:name")); //$NON-NLS-1$ artifact.setUuid(getProperty(jcrNode, "sramp:uuid")); //$NON-NLS-1$ artifact.setVersion(getProperty(jcrNode, "version")); //$NON-NLS-1$
if (artifact.getVersion()==null) artifact.setVersion(project.getVersion());
BaseArtifactType metaData = new XsdDocument(); metaData.setName("PO.xsd"); //$NON-NLS-1$ metaData.setVersion("1.1"); //$NON-NLS-1$ metaData.setDescription("This is a test description (XSD)."); //$NON-NLS-1$ archive.addEntry("schemas/PO.xsd", metaData, is1); //$NON-NLS-1$ metaData = new XsdDocument(); metaData.setName("PO.xml"); //$NON-NLS-1$ metaData.setVersion("1.2"); //$NON-NLS-1$ metaData.setDescription("This is a test description (XML)."); //$NON-NLS-1$ archive.addEntry("core/PO.xml", metaData, is2); //$NON-NLS-1$
BaseArtifactType metaData = new XsdDocument(); metaData.setName("PO.xsd"); //$NON-NLS-1$ metaData.setVersion("1.1"); //$NON-NLS-1$ metaData.setDescription("This is a test description (XSD)."); //$NON-NLS-1$ archive.addEntry("schemas/PO.xsd", metaData, is1); //$NON-NLS-1$ metaData = new XsdDocument(); metaData.setName("PO.xml"); //$NON-NLS-1$ metaData.setVersion("1.2"); //$NON-NLS-1$ metaData.setDescription("This is a test description (XML)."); //$NON-NLS-1$ archive.addEntry("core/PO.xml", metaData, null); //$NON-NLS-1$
srampArtifact.setName(artificerArtifact.getName()); srampArtifact.setUuid(artificerArtifact.getUuid()); srampArtifact.setVersion(artificerArtifact.getVersion());
artifact.setName("My PO"); //$NON-NLS-1$ artifact.setDescription("A new description of the PO.xsd artifact."); //$NON-NLS-1$ artifact.setVersion("2.0.13"); //$NON-NLS-1$ persistenceManager.updateArtifact(artifact, ArtifactType.XsdDocument());