本文整理了Java中de.tudarmstadt.ukp.clarin.webanno.model.Project.getId()
方法的一些代码示例,展示了Project.getId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Project.getId()
方法的具体详情如下:
包路径:de.tudarmstadt.ukp.clarin.webanno.model.Project
类名称:Project
方法名:getId
暂无
代码示例来源:origin: webanno/webanno
@Override
public File getGuideline(Project aProject, String aFilename)
{
return new File(dir.getAbsolutePath() + "/" + PROJECT_FOLDER + "/" + aProject.getId() + "/"
+ GUIDELINES_FOLDER + "/" + aFilename);
}
代码示例来源:origin: de.tudarmstadt.ukp.inception.app/inception-log
@Override
public long getProject(ProjectImportEvent aEvent)
{
return aEvent.getProject().getId();
}
}
代码示例来源:origin: de.tudarmstadt.ukp.inception.app/inception-log
@Override
public long getProject(LayerConfigurationChangedEvent aEvent)
{
return aEvent.getProject().getId();
}
}
代码示例来源:origin: de.tudarmstadt.ukp.clarin.webanno/webanno-remote
private SourceDocument getDocument(Project aProject, long aDocumentId)
throws ObjectNotFoundException
{
try {
return documentService.getSourceDocument(aProject.getId(), aDocumentId);
}
catch (NoResultException e) {
throw new ObjectNotFoundException(
"Document [" + aDocumentId + "] in project [" + aProject.getId() + "] not found.");
}
}
代码示例来源:origin: inception-project/inception
@Override
public long getProject(AfterProjectCreatedEvent aEvent)
{
return aEvent.getProject().getId();
}
}
代码示例来源:origin: inception-project/inception
@Override
public long getProject(SearchQueryEvent aEvent)
{
return aEvent.getProject().getId();
}
代码示例来源:origin: inception-project/inception
@Override
public long getProject(BeforeProjectRemovedEvent aEvent)
{
return aEvent.getProject().getId();
}
}
代码示例来源:origin: webanno/webanno
@Override
@Transactional(noRollbackFor = NoResultException.class)
public File getDocumentFolder(TrainingDocument trainingDocument)
throws IOException
{
File trainingDocFolder = new File(dir,
"/" + PROJECT_FOLDER + "/" + trainingDocument.getProject().getId() + TRAIN
+ trainingDocument.getId() + "/" + SOURCE_FOLDER);
FileUtils.forceMkdir(trainingDocFolder);
return trainingDocFolder;
}
代码示例来源:origin: de.tudarmstadt.ukp.clarin.webanno/webanno-ui-project
@Override
public boolean isVisible()
{
return selectedProject.getObject() != null
&& selectedProject.getObject().getId() != null
&& getRegistry().getPanel(path)
.applies(selectedProject.getObject());
}
};
代码示例来源:origin: de.tudarmstadt.ukp.clarin.webanno/webanno-api-dao
@Override
public File getDocumentFolder(SourceDocument aDocument)
throws IOException
{
Validate.notNull(aDocument, "Source document must be specified");
File sourceDocFolder = new File(repositoryProperties.getPath(),
"/" + PROJECT_FOLDER + "/" + aDocument.getProject().getId() + "/" + DOCUMENT_FOLDER
+ "/" + aDocument.getId() + "/" + SOURCE_FOLDER);
FileUtils.forceMkdir(sourceDocFolder);
return sourceDocFolder;
}
代码示例来源:origin: de.tudarmstadt.ukp.inception.app/inception-log
@Override
public long getProject(DocumentStateChangedEvent aEvent)
{
return aEvent.getDocument().getProject().getId();
}
代码示例来源:origin: de.tudarmstadt.ukp.inception.app/inception-log
@Override
public long getProject(BeforeDocumentRemovedEvent aEvent)
{
return aEvent.getDocument().getProject().getId();
}
}
代码示例来源:origin: de.tudarmstadt.ukp.inception.app/inception-active-learning
@Override
public long getProject(ActiveLearningSuggestionOfferedEvent aEvent)
{
return aEvent.getDocument().getProject().getId();
}
代码示例来源:origin: inception-project/inception
@Override
public long getProject(ActiveLearningSuggestionOfferedEvent aEvent)
{
return aEvent.getDocument().getProject().getId();
}
代码示例来源:origin: inception-project/inception
@Override
public long getProject(SpanCreatedEvent aEvent)
{
return aEvent.getDocument().getProject().getId();
}
代码示例来源:origin: de.tudarmstadt.ukp.clarin.webanno/webanno-api-dao
@Override
public File getSourceDocumentFile(SourceDocument aDocument)
{
Validate.notNull(aDocument, "Source document must be specified");
File documentUri = new File(repositoryProperties.getPath().getAbsolutePath() + "/"
+ PROJECT_FOLDER + "/" + aDocument.getProject().getId() + "/" + DOCUMENT_FOLDER
+ "/" + aDocument.getId() + "/" + SOURCE_FOLDER);
return new File(documentUri, aDocument.getName());
}
代码示例来源:origin: webanno/webanno
@Override
@Transactional
public void removeProjectPermission(ProjectPermission aPermission)
{
entityManager.remove(aPermission);
try (MDC.MDCCloseable closable = MDC.putCloseable(Logging.KEY_PROJECT_ID,
String.valueOf(aPermission.getProject().getId()))) {
log.info("Removed permission [{}] for user [{}] on project [{}]({})",
aPermission.getLevel(), aPermission.getUser(),
aPermission.getProject().getName(), aPermission.getProject().getId());
}
}
代码示例来源:origin: de.tudarmstadt.ukp.inception.app/inception-ui-external-search
@Override
public boolean applies()
{
Project sessionProject = Session.get().getMetaData(SessionMetaData.CURRENT_PROJECT);
if (sessionProject == null) {
return false;
}
// The project object stored in the session is detached from the persistence context and
// cannot be used immediately in DB interactions. Fetch a fresh copy from the DB.
Project project = projectService.getProject(sessionProject.getId());
return !externalSearchService.listDocumentRepositories(project).isEmpty();
}
代码示例来源:origin: de.tudarmstadt.ukp.clarin.webanno/webanno-ui-curation
private SourceDocument getDocumentFromParameters(Project aProject, StringValue documentParam)
{
SourceDocument document = null;
if (documentParam != null && !documentParam.isEmpty()) {
long documentId = documentParam.toLong();
document = documentService.getSourceDocument(aProject.getId(), documentId);
}
return document;
}
代码示例来源:origin: webanno/webanno
public DocumentStateChangeMessage(DocumentStateChangedEvent aEvent)
{
projectId = aEvent.getDocument().getProject().getId();
projectName = aEvent.getDocument().getProject().getName();
documentId = aEvent.getDocument().getId();
documentName = aEvent.getDocument().getName();
documentState = AeroRemoteApiController.sourceDocumentStateToString(aEvent.getNewState());
documentPreviousState = AeroRemoteApiController
.sourceDocumentStateToString(aEvent.getPreviousState());
}
内容来源于网络,如有侵权,请联系作者删除!