/** * Returns true if the archive is 1.) in the Extended model and 2.) of the given extended type. * * @param archiveExtendedType * @return boolean */ public boolean isExtendedTypeArchive(String archiveExtendedType) { if (archiveArtifactType != null) { return archiveArtifactType.isExtendedType() && archiveArtifactType.getExtendedType().equalsIgnoreCase(archiveExtendedType); } return false; }
if (StringUtils.isNotBlank(type)) { artifactType = ArtifactType.valueOf(type); if (artifactType.isExtendedType()) { artifactType = ArtifactType.ExtendedDocument(artifactType.getExtendedType());
artifactType.setMimeType(((DocumentArtifactType)artifact).getContentType()); if (artifactType.isExtendedType()) { if ((artifact.getOtherAttributes().keySet().contains(ArtificerConstants.SRAMP_CONTENT_TYPE_QNAME))) { String contentTypeStr = artifact.getOtherAttributes().get(ArtificerConstants.SRAMP_CONTENT_TYPE_QNAME);
public static BaseArtifactType visit(ArtificerArtifact artificerArtifact, ArtifactType artifactType, boolean includeAssociations) throws Exception { if (artifactType.isExtendedType() && artificerArtifact.isDocument()) { artifactType = ArtifactType.ExtendedDocument(artifactType.getExtendedType()); } BaseArtifactType srampArtifact = artifactType.newArtifactInstance(); HibernateEntityToSrampVisitor visitor = new HibernateEntityToSrampVisitor(artificerArtifact, artifactType, includeAssociations); ArtifactVisitorHelper.visitArtifact(visitor, srampArtifact); visitor.throwError(); return srampArtifact; }
ArtifactType type = summary.getArtifactType(); String displayType = type.getArtifactType().getType().toString(); if (type.isExtendedType() && type.getExtendedType() != null) { displayType = type.getExtendedType();
ArtifactType type = summary.getArtifactType(); String displayType = type.getArtifactType().getType().toString(); if (type.isExtendedType() && type.getExtendedType() != null) { displayType = type.getExtendedType();
protected CommandResult doExecute(CommandInvocation commandInvocation) throws Exception { ArtificerAtomApiClient client = client(commandInvocation); ArtifactType artifactType = ArtifactType.valueOf(type); if (artifactType.isExtendedType()) { artifactType = ArtifactType.ExtendedArtifactType(artifactType.getExtendedType(), false); } if (artifactType.isDerived()) { commandInvocation.getShell().out().println(Messages.i18n.format("ArtifactModel.isDerived")); return CommandResult.FAILURE; } else if (artifactType.isDocument()) { commandInvocation.getShell().out().println(Messages.i18n.format("ArtifactModel.isDocument")); return CommandResult.FAILURE; } else { BaseArtifactType artifact = artifactType.newArtifactInstance(); artifact.setName(name); artifact.setDescription(description); artifact = client.createArtifact(artifact); // Put the artifact in the session as the active artifact context(commandInvocation).setCurrentArtifact(artifact); } commandInvocation.getShell().out().println(Messages.i18n.format("CreateArtifactCommand.Successful", name)); return CommandResult.SUCCESS; }
if (StringUtils.isNotBlank(type)) { artifactType = ArtifactType.valueOf(type); if (artifactType.isExtendedType()) { artifactType = ArtifactType.ExtendedDocument(artifactType.getExtendedType());
ArtifactType artifactType = ArtifactType.valueOf(artifact); commandInvocation.getShell().out().println(Messages.i18n.format("PrintArtifact.CoreHeading")); if (artifactType.isExtendedType()) printProperty(Messages.i18n.format("PrintArtifact.Type"), artifactType.getExtendedType()); else