id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
8,900 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/rest/DatastreamFilenameHelper.java | DatastreamFilenameHelper.addContentDispositionHeader | public final void addContentDispositionHeader(Context context, String pid, String dsID, String download, Date asOfDateTime, MIMETypedStream stream) throws Exception {
String headerValue = null;
String filename = null;
// is downloading requested?
if (download != null && download.equals(... | java | public final void addContentDispositionHeader(Context context, String pid, String dsID, String download, Date asOfDateTime, MIMETypedStream stream) throws Exception {
String headerValue = null;
String filename = null;
// is downloading requested?
if (download != null && download.equals(... | [
"public",
"final",
"void",
"addContentDispositionHeader",
"(",
"Context",
"context",
",",
"String",
"pid",
",",
"String",
"dsID",
",",
"String",
"download",
",",
"Date",
"asOfDateTime",
",",
"MIMETypedStream",
"stream",
")",
"throws",
"Exception",
"{",
"String",
... | Add a content disposition header to a MIMETypedStream based on configuration preferences.
Header by default specifies "inline"; if download=true then "attachment" is specified.
@param context
@param pid
@param dsID
@param download
true if file is to be downloaded
@param asOfDateTime
@param stream
@throws Exception | [
"Add",
"a",
"content",
"disposition",
"header",
"to",
"a",
"MIMETypedStream",
"based",
"on",
"configuration",
"preferences",
".",
"Header",
"by",
"default",
"specifies",
"inline",
";",
"if",
"download",
"=",
"true",
"then",
"attachment",
"is",
"specified",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/rest/DatastreamFilenameHelper.java#L181-L210 |
8,901 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/rest/DatastreamFilenameHelper.java | DatastreamFilenameHelper.getFilename | private final String getFilename(Context context, String pid, String dsid, Date asOfDateTime, String MIMETYPE) throws Exception {
String filename = "";
String extension = "";
// check sources in order
for (String source : m_datastreamFilenameSource.split(" ")) {
// try and g... | java | private final String getFilename(Context context, String pid, String dsid, Date asOfDateTime, String MIMETYPE) throws Exception {
String filename = "";
String extension = "";
// check sources in order
for (String source : m_datastreamFilenameSource.split(" ")) {
// try and g... | [
"private",
"final",
"String",
"getFilename",
"(",
"Context",
"context",
",",
"String",
"pid",
",",
"String",
"dsid",
",",
"Date",
"asOfDateTime",
",",
"String",
"MIMETYPE",
")",
"throws",
"Exception",
"{",
"String",
"filename",
"=",
"\"\"",
";",
"String",
"e... | Generate a filename and extension for a datastream based on configuration preferences.
Filename can be based on a definition in RELS-INT, the datastream label or
the datastream ID. These sources can be specified in order of preference together with
using a default filename. The extension is based on a mime-type-to-ex... | [
"Generate",
"a",
"filename",
"and",
"extension",
"for",
"a",
"datastream",
"based",
"on",
"configuration",
"preferences",
".",
"Filename",
"can",
"be",
"based",
"on",
"a",
"definition",
"in",
"RELS",
"-",
"INT",
"the",
"datastream",
"label",
"or",
"the",
"da... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/rest/DatastreamFilenameHelper.java#L240-L284 |
8,902 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/rest/DatastreamFilenameHelper.java | DatastreamFilenameHelper.getFilenameFromRels | private final String getFilenameFromRels(Context context, String pid, String dsid, String MIMETYPE) throws Exception {
String filename = "";
// read rels directly from RELS-INT - can't use Management.getRelationships as this requires auth
DOReader reader = m_doManager.getReader(false, context,... | java | private final String getFilenameFromRels(Context context, String pid, String dsid, String MIMETYPE) throws Exception {
String filename = "";
// read rels directly from RELS-INT - can't use Management.getRelationships as this requires auth
DOReader reader = m_doManager.getReader(false, context,... | [
"private",
"final",
"String",
"getFilenameFromRels",
"(",
"Context",
"context",
",",
"String",
"pid",
",",
"String",
"dsid",
",",
"String",
"MIMETYPE",
")",
"throws",
"Exception",
"{",
"String",
"filename",
"=",
"\"\"",
";",
"// read rels directly from RELS-INT - ca... | Get datastream filename as defined in RELS-INT
@param context
@param pid
@param dsid
@param MIMETYPE
@return
@throws Exception | [
"Get",
"datastream",
"filename",
"as",
"defined",
"in",
"RELS",
"-",
"INT"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/rest/DatastreamFilenameHelper.java#L295-L332 |
8,903 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/rest/DatastreamFilenameHelper.java | DatastreamFilenameHelper.getFilenameFromLabel | private final String getFilenameFromLabel(Context context, String pid, String dsid, Date asOfDateTime, String MIMETYPE) throws Exception {
// can't get datastream label directly from datastream as this is an API-M call
// instead get list of datastream defs, as these contain labels
DOReader rea... | java | private final String getFilenameFromLabel(Context context, String pid, String dsid, Date asOfDateTime, String MIMETYPE) throws Exception {
// can't get datastream label directly from datastream as this is an API-M call
// instead get list of datastream defs, as these contain labels
DOReader rea... | [
"private",
"final",
"String",
"getFilenameFromLabel",
"(",
"Context",
"context",
",",
"String",
"pid",
",",
"String",
"dsid",
",",
"Date",
"asOfDateTime",
",",
"String",
"MIMETYPE",
")",
"throws",
"Exception",
"{",
"// can't get datastream label directly from datastream... | Get filename based on datastream label
@param context
@param pid
@param dsid
@param asOfDateTime
@param MIMETYPE
@return
@throws Exception | [
"Get",
"filename",
"based",
"on",
"datastream",
"label"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/rest/DatastreamFilenameHelper.java#L344-L352 |
8,904 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/rest/DatastreamFilenameHelper.java | DatastreamFilenameHelper.getFilenameFromId | private static final String getFilenameFromId(String pid, String dsid, String MIMETYPE) throws Exception {
return dsid;
} | java | private static final String getFilenameFromId(String pid, String dsid, String MIMETYPE) throws Exception {
return dsid;
} | [
"private",
"static",
"final",
"String",
"getFilenameFromId",
"(",
"String",
"pid",
",",
"String",
"dsid",
",",
"String",
"MIMETYPE",
")",
"throws",
"Exception",
"{",
"return",
"dsid",
";",
"}"
] | Get filename from datastream id
@param pid
@param dsid
@param MIMETYPE
@return
@throws Exception | [
"Get",
"filename",
"from",
"datastream",
"id"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/rest/DatastreamFilenameHelper.java#L362-L364 |
8,905 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/utilities/status/ServerStatusFile.java | ServerStatusFile.getMessages | public synchronized ServerStatusMessage[] getMessages(ServerStatusMessage afterMessage)
throws Exception {
boolean sawAfterMessage;
String afterMessageString = null;
if (afterMessage == null) {
sawAfterMessage = true;
} else {
sawAfterMessage = false;... | java | public synchronized ServerStatusMessage[] getMessages(ServerStatusMessage afterMessage)
throws Exception {
boolean sawAfterMessage;
String afterMessageString = null;
if (afterMessage == null) {
sawAfterMessage = true;
} else {
sawAfterMessage = false;... | [
"public",
"synchronized",
"ServerStatusMessage",
"[",
"]",
"getMessages",
"(",
"ServerStatusMessage",
"afterMessage",
")",
"throws",
"Exception",
"{",
"boolean",
"sawAfterMessage",
";",
"String",
"afterMessageString",
"=",
"null",
";",
"if",
"(",
"afterMessage",
"==",... | Get all messages in the status file, or only those after the given
message if it is non-null. If the status file doesn't exist or can't be
parsed, throw an exception. | [
"Get",
"all",
"messages",
"in",
"the",
"status",
"file",
"or",
"only",
"those",
"after",
"the",
"given",
"message",
"if",
"it",
"is",
"non",
"-",
"null",
".",
"If",
"the",
"status",
"file",
"doesn",
"t",
"exist",
"or",
"can",
"t",
"be",
"parsed",
"th... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/utilities/status/ServerStatusFile.java#L143-L191 |
8,906 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/utilities/status/ServerStatusFile.java | ServerStatusFile.getNextMessage | private ServerStatusMessage getNextMessage(BufferedReader reader)
throws Exception {
boolean messageStarted = false;
String line = reader.readLine();
while (line != null && !messageStarted) {
if (line.equals(BEGIN_LINE)) {
messageStarted = true;
... | java | private ServerStatusMessage getNextMessage(BufferedReader reader)
throws Exception {
boolean messageStarted = false;
String line = reader.readLine();
while (line != null && !messageStarted) {
if (line.equals(BEGIN_LINE)) {
messageStarted = true;
... | [
"private",
"ServerStatusMessage",
"getNextMessage",
"(",
"BufferedReader",
"reader",
")",
"throws",
"Exception",
"{",
"boolean",
"messageStarted",
"=",
"false",
";",
"String",
"line",
"=",
"reader",
".",
"readLine",
"(",
")",
";",
"while",
"(",
"line",
"!=",
"... | return the next message, or null if there are no more messages in the file | [
"return",
"the",
"next",
"message",
"or",
"null",
"if",
"there",
"are",
"no",
"more",
"messages",
"in",
"the",
"file"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/utilities/status/ServerStatusFile.java#L210-L248 |
8,907 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/utilities/status/ServerStatusFile.java | ServerStatusFile.getNextLine | private String getNextLine(BufferedReader reader) throws Exception {
String line = reader.readLine();
if (line != null) {
return line;
} else {
throw new Exception("Error parsing server status file (unexpectedly ended): "
+ _file.getPath());
}
... | java | private String getNextLine(BufferedReader reader) throws Exception {
String line = reader.readLine();
if (line != null) {
return line;
} else {
throw new Exception("Error parsing server status file (unexpectedly ended): "
+ _file.getPath());
}
... | [
"private",
"String",
"getNextLine",
"(",
"BufferedReader",
"reader",
")",
"throws",
"Exception",
"{",
"String",
"line",
"=",
"reader",
".",
"readLine",
"(",
")",
";",
"if",
"(",
"line",
"!=",
"null",
")",
"{",
"return",
"line",
";",
"}",
"else",
"{",
"... | get the next line or throw an exception if eof was reached | [
"get",
"the",
"next",
"line",
"or",
"throw",
"an",
"exception",
"if",
"eof",
"was",
"reached"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/utilities/status/ServerStatusFile.java#L251-L259 |
8,908 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/ResponseCacheImpl.java | ResponseCacheImpl.makeHash | private String makeHash(String request) throws CacheException {
RequestCtx reqCtx = null;
try {
reqCtx = m_contextUtil.makeRequestCtx(request);
} catch (MelcoeXacmlException pe) {
throw new CacheException("Error converting request", pe);
}
byte[] hash = nu... | java | private String makeHash(String request) throws CacheException {
RequestCtx reqCtx = null;
try {
reqCtx = m_contextUtil.makeRequestCtx(request);
} catch (MelcoeXacmlException pe) {
throw new CacheException("Error converting request", pe);
}
byte[] hash = nu... | [
"private",
"String",
"makeHash",
"(",
"String",
"request",
")",
"throws",
"CacheException",
"{",
"RequestCtx",
"reqCtx",
"=",
"null",
";",
"try",
"{",
"reqCtx",
"=",
"m_contextUtil",
".",
"makeRequestCtx",
"(",
"request",
")",
";",
"}",
"catch",
"(",
"Melcoe... | Given a request, this method generates a hash.
@param request
the request to hash
@return the hash
@throws CacheException | [
"Given",
"a",
"request",
"this",
"method",
"generates",
"a",
"hash",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/ResponseCacheImpl.java#L254-L279 |
8,909 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/ResponseCacheImpl.java | ResponseCacheImpl.hashAttribute | private static void hashAttribute(Attribute a, MessageDigest dig) {
dig.update(a.getId().toString().getBytes());
dig.update(a.getType().toString().getBytes());
dig.update(a.getValue().encode().getBytes());
if (a.getIssuer() != null) {
dig.update(a.getIssuer().getBytes());
... | java | private static void hashAttribute(Attribute a, MessageDigest dig) {
dig.update(a.getId().toString().getBytes());
dig.update(a.getType().toString().getBytes());
dig.update(a.getValue().encode().getBytes());
if (a.getIssuer() != null) {
dig.update(a.getIssuer().getBytes());
... | [
"private",
"static",
"void",
"hashAttribute",
"(",
"Attribute",
"a",
",",
"MessageDigest",
"dig",
")",
"{",
"dig",
".",
"update",
"(",
"a",
".",
"getId",
"(",
")",
".",
"toString",
"(",
")",
".",
"getBytes",
"(",
")",
")",
";",
"dig",
".",
"update",
... | Utility function to add an attribute to the hash digest.
@param a
the attribute to hash | [
"Utility",
"function",
"to",
"add",
"an",
"attribute",
"to",
"the",
"hash",
"digest",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/ResponseCacheImpl.java#L303-L313 |
8,910 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/utilities/status/ServerStatusTool.java | ServerStatusTool.watchStartup | public void watchStartup(int startingTimeout, int startupTimeout)
throws Exception {
// use this for timeout checks later
long startTime = System.currentTimeMillis();
ServerStatusMessage[] messages = getAllMessages();
ServerStatusMessage lastMessage = messages[messages.len... | java | public void watchStartup(int startingTimeout, int startupTimeout)
throws Exception {
// use this for timeout checks later
long startTime = System.currentTimeMillis();
ServerStatusMessage[] messages = getAllMessages();
ServerStatusMessage lastMessage = messages[messages.len... | [
"public",
"void",
"watchStartup",
"(",
"int",
"startingTimeout",
",",
"int",
"startupTimeout",
")",
"throws",
"Exception",
"{",
"// use this for timeout checks later",
"long",
"startTime",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"ServerStatusMessage",
... | Watch the status file and print details to standard output until the
STARTED or STARTUP_FAILED state is encountered. If there are any problems
reading the status file, a timeout is reached, or STARTUP_FAILED is
encountered, this will throw an exception. | [
"Watch",
"the",
"status",
"file",
"and",
"print",
"details",
"to",
"standard",
"output",
"until",
"the",
"STARTED",
"or",
"STARTUP_FAILED",
"state",
"is",
"encountered",
".",
"If",
"there",
"are",
"any",
"problems",
"reading",
"the",
"status",
"file",
"a",
"... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/utilities/status/ServerStatusTool.java#L79-L140 |
8,911 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/utilities/status/ServerStatusTool.java | ServerStatusTool.watchShutdown | public void watchShutdown(int stoppingTimeout, int shutdownTimeout)
throws Exception {
if (!_statusFile.exists()) {
_statusFile
.append(ServerState.STOPPING,
"WARNING: Server status file did not exist; re-created");
}
// u... | java | public void watchShutdown(int stoppingTimeout, int shutdownTimeout)
throws Exception {
if (!_statusFile.exists()) {
_statusFile
.append(ServerState.STOPPING,
"WARNING: Server status file did not exist; re-created");
}
// u... | [
"public",
"void",
"watchShutdown",
"(",
"int",
"stoppingTimeout",
",",
"int",
"shutdownTimeout",
")",
"throws",
"Exception",
"{",
"if",
"(",
"!",
"_statusFile",
".",
"exists",
"(",
")",
")",
"{",
"_statusFile",
".",
"append",
"(",
"ServerState",
".",
"STOPPI... | Watch the status file and print details to standard output until the
STOPPED or STOPPED_WITH_ERR state is encountered. If there are any
problems reading the status file, a timeout is reached, or
STOPPED_WITH_ERR is encountered, this will throw an exception. | [
"Watch",
"the",
"status",
"file",
"and",
"print",
"details",
"to",
"standard",
"output",
"until",
"the",
"STOPPED",
"or",
"STOPPED_WITH_ERR",
"state",
"is",
"encountered",
".",
"If",
"there",
"are",
"any",
"problems",
"reading",
"the",
"status",
"file",
"a",
... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/utilities/status/ServerStatusTool.java#L177-L244 |
8,912 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/utilities/status/ServerStatusTool.java | ServerStatusTool.showStatus | public void showStatus() throws Exception {
ServerStatusMessage message;
if (_statusFile.exists()) {
ServerStatusMessage[] messages = getAllMessages();
message = messages[messages.length - 1];
} else {
message = ServerStatusMessage.NEW_SERVER_MESSAGE;
... | java | public void showStatus() throws Exception {
ServerStatusMessage message;
if (_statusFile.exists()) {
ServerStatusMessage[] messages = getAllMessages();
message = messages[messages.length - 1];
} else {
message = ServerStatusMessage.NEW_SERVER_MESSAGE;
... | [
"public",
"void",
"showStatus",
"(",
")",
"throws",
"Exception",
"{",
"ServerStatusMessage",
"message",
";",
"if",
"(",
"_statusFile",
".",
"exists",
"(",
")",
")",
"{",
"ServerStatusMessage",
"[",
"]",
"messages",
"=",
"getAllMessages",
"(",
")",
";",
"mess... | Show a human-readable form of the latest message in the server status
file. If the status file doesn't yet exist, this will print a special
status message indicating the server is new. The response will have the
following form.
<pre>
STATE : Some State
AS OF : 2006-03-29 06:44:23AM EST
DETAIL : Detail line 1, if it ... | [
"Show",
"a",
"human",
"-",
"readable",
"form",
"of",
"the",
"latest",
"message",
"in",
"the",
"server",
"status",
"file",
".",
"If",
"the",
"status",
"file",
"doesn",
"t",
"yet",
"exist",
"this",
"will",
"print",
"a",
"special",
"status",
"message",
"ind... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/utilities/status/ServerStatusTool.java#L289-L299 |
8,913 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/utilities/status/ServerStatusTool.java | ServerStatusTool.getAllMessages | private ServerStatusMessage[] getAllMessages() throws Exception {
ServerStatusMessage[] messages = _statusFile.getMessages(null);
if (messages.length == 0) {
System.out
.println("WARNING: Server status file is empty; re-creating");
init();
message... | java | private ServerStatusMessage[] getAllMessages() throws Exception {
ServerStatusMessage[] messages = _statusFile.getMessages(null);
if (messages.length == 0) {
System.out
.println("WARNING: Server status file is empty; re-creating");
init();
message... | [
"private",
"ServerStatusMessage",
"[",
"]",
"getAllMessages",
"(",
")",
"throws",
"Exception",
"{",
"ServerStatusMessage",
"[",
"]",
"messages",
"=",
"_statusFile",
".",
"getMessages",
"(",
"null",
")",
";",
"if",
"(",
"messages",
".",
"length",
"==",
"0",
"... | print a warning | [
"print",
"a",
"warning"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/utilities/status/ServerStatusTool.java#L305-L320 |
8,914 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/swing/mdi/MDIDesktopPane.java | MDIDesktopPane.cascadeFrames | public void cascadeFrames() {
restoreFrames();
int x = 0;
int y = 0;
JInternalFrame allFrames[] = getAllFrames();
manager.setNormalSize();
int frameHeight =
getBounds().height - 5 - allFrames.length * FRAME_OFFSET;
int frameWidth =
... | java | public void cascadeFrames() {
restoreFrames();
int x = 0;
int y = 0;
JInternalFrame allFrames[] = getAllFrames();
manager.setNormalSize();
int frameHeight =
getBounds().height - 5 - allFrames.length * FRAME_OFFSET;
int frameWidth =
... | [
"public",
"void",
"cascadeFrames",
"(",
")",
"{",
"restoreFrames",
"(",
")",
";",
"int",
"x",
"=",
"0",
";",
"int",
"y",
"=",
"0",
";",
"JInternalFrame",
"allFrames",
"[",
"]",
"=",
"getAllFrames",
"(",
")",
";",
"manager",
".",
"setNormalSize",
"(",
... | Cascade all internal frames, un-iconfying any minimized first | [
"Cascade",
"all",
"internal",
"frames",
"un",
"-",
"iconfying",
"any",
"minimized",
"first"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/swing/mdi/MDIDesktopPane.java#L88-L105 |
8,915 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/swing/mdi/MDIDesktopPane.java | MDIDesktopPane.tileFrames | public void tileFrames() {
restoreFrames();
java.awt.Component allFrames[] = getAllFrames();
manager.setNormalSize();
int frameHeight = getBounds().height / allFrames.length;
int y = 0;
for (Component element : allFrames) {
element.setSize(getBounds().width, f... | java | public void tileFrames() {
restoreFrames();
java.awt.Component allFrames[] = getAllFrames();
manager.setNormalSize();
int frameHeight = getBounds().height / allFrames.length;
int y = 0;
for (Component element : allFrames) {
element.setSize(getBounds().width, f... | [
"public",
"void",
"tileFrames",
"(",
")",
"{",
"restoreFrames",
"(",
")",
";",
"java",
".",
"awt",
".",
"Component",
"allFrames",
"[",
"]",
"=",
"getAllFrames",
"(",
")",
";",
"manager",
".",
"setNormalSize",
"(",
")",
";",
"int",
"frameHeight",
"=",
"... | Tile all internal frames, un-iconifying any minimized first | [
"Tile",
"all",
"internal",
"frames",
"un",
"-",
"iconifying",
"any",
"minimized",
"first"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/swing/mdi/MDIDesktopPane.java#L110-L121 |
8,916 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/ContextXmlReader.java | ContextXmlReader.readContext | public JournalEntryContext readContext(XMLEventReader reader)
throws JournalException, XMLStreamException {
JournalEntryContext context = new JournalEntryContext();
XMLEvent event = reader.nextTag();
if (!isStartTagEvent(event, QNAME_TAG_CONTEXT)) {
throw getNotStartTagE... | java | public JournalEntryContext readContext(XMLEventReader reader)
throws JournalException, XMLStreamException {
JournalEntryContext context = new JournalEntryContext();
XMLEvent event = reader.nextTag();
if (!isStartTagEvent(event, QNAME_TAG_CONTEXT)) {
throw getNotStartTagE... | [
"public",
"JournalEntryContext",
"readContext",
"(",
"XMLEventReader",
"reader",
")",
"throws",
"JournalException",
",",
"XMLStreamException",
"{",
"JournalEntryContext",
"context",
"=",
"new",
"JournalEntryContext",
"(",
")",
";",
"XMLEvent",
"event",
"=",
"reader",
... | Read the context tax and populate a JournalEntryContext object. | [
"Read",
"the",
"context",
"tax",
"and",
"populate",
"a",
"JournalEntryContext",
"object",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/ContextXmlReader.java#L38-L71 |
8,917 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/ContextXmlReader.java | ContextXmlReader.readContextNoOp | private boolean readContextNoOp(XMLEventReader reader)
throws XMLStreamException, JournalException {
readStartTag(reader, QNAME_TAG_NOOP);
String value = readCharactersUntilEndTag(reader, QNAME_TAG_NOOP);
return Boolean.valueOf(value).booleanValue();
} | java | private boolean readContextNoOp(XMLEventReader reader)
throws XMLStreamException, JournalException {
readStartTag(reader, QNAME_TAG_NOOP);
String value = readCharactersUntilEndTag(reader, QNAME_TAG_NOOP);
return Boolean.valueOf(value).booleanValue();
} | [
"private",
"boolean",
"readContextNoOp",
"(",
"XMLEventReader",
"reader",
")",
"throws",
"XMLStreamException",
",",
"JournalException",
"{",
"readStartTag",
"(",
"reader",
",",
"QNAME_TAG_NOOP",
")",
";",
"String",
"value",
"=",
"readCharactersUntilEndTag",
"(",
"read... | Read the context no-op flag from XML. | [
"Read",
"the",
"context",
"no",
"-",
"op",
"flag",
"from",
"XML",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/ContextXmlReader.java#L90-L95 |
8,918 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/ContextXmlReader.java | ContextXmlReader.readContextNow | private Date readContextNow(XMLEventReader reader)
throws XMLStreamException, JournalException {
readStartTag(reader, QNAME_TAG_NOW);
String value = readCharactersUntilEndTag(reader, QNAME_TAG_NOW);
return JournalHelper.parseDate(value);
} | java | private Date readContextNow(XMLEventReader reader)
throws XMLStreamException, JournalException {
readStartTag(reader, QNAME_TAG_NOW);
String value = readCharactersUntilEndTag(reader, QNAME_TAG_NOW);
return JournalHelper.parseDate(value);
} | [
"private",
"Date",
"readContextNow",
"(",
"XMLEventReader",
"reader",
")",
"throws",
"XMLStreamException",
",",
"JournalException",
"{",
"readStartTag",
"(",
"reader",
",",
"QNAME_TAG_NOW",
")",
";",
"String",
"value",
"=",
"readCharactersUntilEndTag",
"(",
"reader",
... | Read the context date from XML. | [
"Read",
"the",
"context",
"date",
"from",
"XML",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/ContextXmlReader.java#L100-L105 |
8,919 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/ContextXmlReader.java | ContextXmlReader.readMultiMap | private MultiValueMap<String> readMultiMap(XMLEventReader reader, String mapName)
throws JournalException, XMLStreamException {
MultiValueMap<String> map = new MultiValueMap<String>();
// must start with a multi-map tag
XMLEvent event = reader.nextTag();
if (!isStartTagEvent... | java | private MultiValueMap<String> readMultiMap(XMLEventReader reader, String mapName)
throws JournalException, XMLStreamException {
MultiValueMap<String> map = new MultiValueMap<String>();
// must start with a multi-map tag
XMLEvent event = reader.nextTag();
if (!isStartTagEvent... | [
"private",
"MultiValueMap",
"<",
"String",
">",
"readMultiMap",
"(",
"XMLEventReader",
"reader",
",",
"String",
"mapName",
")",
"throws",
"JournalException",
",",
"XMLStreamException",
"{",
"MultiValueMap",
"<",
"String",
">",
"map",
"=",
"new",
"MultiValueMap",
"... | Read a multi-map, with its nested tags. | [
"Read",
"a",
"multi",
"-",
"map",
"with",
"its",
"nested",
"tags",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/ContextXmlReader.java#L119-L143 |
8,920 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/ContextXmlReader.java | ContextXmlReader.readMultiMapKeys | private void readMultiMapKeys(XMLEventReader reader, MultiValueMap<String> map)
throws XMLStreamException, JournalException {
while (true) {
XMLEvent event2 = reader.nextTag();
if (isStartTagEvent(event2, QNAME_TAG_MULTI_VALUE_MAP_KEY)) {
// if we find a key t... | java | private void readMultiMapKeys(XMLEventReader reader, MultiValueMap<String> map)
throws XMLStreamException, JournalException {
while (true) {
XMLEvent event2 = reader.nextTag();
if (isStartTagEvent(event2, QNAME_TAG_MULTI_VALUE_MAP_KEY)) {
// if we find a key t... | [
"private",
"void",
"readMultiMapKeys",
"(",
"XMLEventReader",
"reader",
",",
"MultiValueMap",
"<",
"String",
">",
"map",
")",
"throws",
"XMLStreamException",
",",
"JournalException",
"{",
"while",
"(",
"true",
")",
"{",
"XMLEvent",
"event2",
"=",
"reader",
".",
... | Read through the keys of the multi-map, adding to the map as we go. | [
"Read",
"through",
"the",
"keys",
"of",
"the",
"multi",
"-",
"map",
"adding",
"to",
"the",
"map",
"as",
"we",
"go",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/ContextXmlReader.java#L148-L169 |
8,921 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/ContextXmlReader.java | ContextXmlReader.readMultiMapValuesForKey | private String[] readMultiMapValuesForKey(XMLEventReader reader)
throws XMLStreamException, JournalException {
List<String> values = new ArrayList<String>();
while (true) {
XMLEvent event = reader.nextTag();
if (isStartTagEvent(event, QNAME_TAG_MULTI_VALUE_MAP_VALUE))... | java | private String[] readMultiMapValuesForKey(XMLEventReader reader)
throws XMLStreamException, JournalException {
List<String> values = new ArrayList<String>();
while (true) {
XMLEvent event = reader.nextTag();
if (isStartTagEvent(event, QNAME_TAG_MULTI_VALUE_MAP_VALUE))... | [
"private",
"String",
"[",
"]",
"readMultiMapValuesForKey",
"(",
"XMLEventReader",
"reader",
")",
"throws",
"XMLStreamException",
",",
"JournalException",
"{",
"List",
"<",
"String",
">",
"values",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"wh... | Read the list of values for one key of the multi-map. | [
"Read",
"the",
"list",
"of",
"values",
"for",
"one",
"key",
"of",
"the",
"multi",
"-",
"map",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/ContextXmlReader.java#L174-L191 |
8,922 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/ContextXmlReader.java | ContextXmlReader.decipherPassword | private void decipherPassword(JournalEntryContext context) {
String key = JournalHelper.formatDate(context.now());
String passwordCipher = context.getPassword();
String clearPassword =
PasswordCipher.decipher(key, passwordCipher, passwordType);
context.setPassword(clearPa... | java | private void decipherPassword(JournalEntryContext context) {
String key = JournalHelper.formatDate(context.now());
String passwordCipher = context.getPassword();
String clearPassword =
PasswordCipher.decipher(key, passwordCipher, passwordType);
context.setPassword(clearPa... | [
"private",
"void",
"decipherPassword",
"(",
"JournalEntryContext",
"context",
")",
"{",
"String",
"key",
"=",
"JournalHelper",
".",
"formatDate",
"(",
"context",
".",
"now",
"(",
")",
")",
";",
"String",
"passwordCipher",
"=",
"context",
".",
"getPassword",
"(... | The password as read was not correct. It needs to be deciphered. | [
"The",
"password",
"as",
"read",
"was",
"not",
"correct",
".",
"It",
"needs",
"to",
"be",
"deciphered",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/ContextXmlReader.java#L210-L216 |
8,923 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/access/DynamicAccessModule.java | DynamicAccessModule.getServiceDefinitions | public String[] getServiceDefinitions(Context context,
String PID,
Date asOfDateTime)
throws ServerException {
//m_ipRestriction.enforce(context);
return da.getServiceDefinitions(context, PID, asOfDateTime)... | java | public String[] getServiceDefinitions(Context context,
String PID,
Date asOfDateTime)
throws ServerException {
//m_ipRestriction.enforce(context);
return da.getServiceDefinitions(context, PID, asOfDateTime)... | [
"public",
"String",
"[",
"]",
"getServiceDefinitions",
"(",
"Context",
"context",
",",
"String",
"PID",
",",
"Date",
"asOfDateTime",
")",
"throws",
"ServerException",
"{",
"//m_ipRestriction.enforce(context);",
"return",
"da",
".",
"getServiceDefinitions",
"(",
"conte... | Get a list of service definition identifiers for dynamic disseminators
associated with the digital object.
@param context
@param PID
identifier of digital object being reflected upon
@param asOfDateTime
@return an array of service definition PIDs
@throws ServerException | [
"Get",
"a",
"list",
"of",
"service",
"definition",
"identifiers",
"for",
"dynamic",
"disseminators",
"associated",
"with",
"the",
"digital",
"object",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/access/DynamicAccessModule.java#L154-L160 |
8,924 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/access/DynamicAccessModule.java | DynamicAccessModule.listMethods | public ObjectMethodsDef[] listMethods(Context context,
String PID,
Date asOfDateTime)
throws ServerException {
return da.listMethods(context, PID, asOfDateTime);
} | java | public ObjectMethodsDef[] listMethods(Context context,
String PID,
Date asOfDateTime)
throws ServerException {
return da.listMethods(context, PID, asOfDateTime);
} | [
"public",
"ObjectMethodsDef",
"[",
"]",
"listMethods",
"(",
"Context",
"context",
",",
"String",
"PID",
",",
"Date",
"asOfDateTime",
")",
"throws",
"ServerException",
"{",
"return",
"da",
".",
"listMethods",
"(",
"context",
",",
"PID",
",",
"asOfDateTime",
")"... | Get the definitions for all dynamic disseminations on the object.
<p>This will return the method definitions for all methods for all of
the dynamic disseminators associated with the object.
@param context
@param PID
identifier of digital object being reflected upon
@param asOfDateTime
@return an array of object metho... | [
"Get",
"the",
"definitions",
"for",
"all",
"dynamic",
"disseminations",
"on",
"the",
"object",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/access/DynamicAccessModule.java#L270-L275 |
8,925 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/access/DynamicAccessModule.java | DynamicAccessModule.getObjectProfile | public ObjectProfile getObjectProfile(Context context,
String PID,
Date asOfDateTime)
throws ServerException {
return null;
} | java | public ObjectProfile getObjectProfile(Context context,
String PID,
Date asOfDateTime)
throws ServerException {
return null;
} | [
"public",
"ObjectProfile",
"getObjectProfile",
"(",
"Context",
"context",
",",
"String",
"PID",
",",
"Date",
"asOfDateTime",
")",
"throws",
"ServerException",
"{",
"return",
"null",
";",
"}"
] | Get the profile information for the digital object. This contain key
metadata and URLs for the Dissemination Index and Item Index of the
object.
@param context
@param PID
identifier of digital object being reflected upon
@param asOfDateTime
@return an object profile data structure
@throws ServerException | [
"Get",
"the",
"profile",
"information",
"for",
"the",
"digital",
"object",
".",
"This",
"contain",
"key",
"metadata",
"and",
"URLs",
"for",
"the",
"Dissemination",
"Index",
"and",
"Item",
"Index",
"of",
"the",
"object",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/access/DynamicAccessModule.java#L289-L294 |
8,926 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/storage/lowlevel/akubra/AkubraLowlevelStorage.java | AkubraLowlevelStorage.safeOverwrite | private static void safeOverwrite(Blob origBlob, InputStream content) {
BlobStoreConnection connection = origBlob.getConnection();
String origId = origBlob.getId().toString();
// write new content to origId/new
Blob newBlob = null;
try {
newBlob = connection.getBlob(... | java | private static void safeOverwrite(Blob origBlob, InputStream content) {
BlobStoreConnection connection = origBlob.getConnection();
String origId = origBlob.getId().toString();
// write new content to origId/new
Blob newBlob = null;
try {
newBlob = connection.getBlob(... | [
"private",
"static",
"void",
"safeOverwrite",
"(",
"Blob",
"origBlob",
",",
"InputStream",
"content",
")",
"{",
"BlobStoreConnection",
"connection",
"=",
"origBlob",
".",
"getConnection",
"(",
")",
";",
"String",
"origId",
"=",
"origBlob",
".",
"getId",
"(",
"... | Overwrites the content of the given blob in a way that guarantees the
original content is not destroyed until the replacement is successfully
put in its place. | [
"Overwrites",
"the",
"content",
"of",
"the",
"given",
"blob",
"in",
"a",
"way",
"that",
"guarantees",
"the",
"original",
"content",
"is",
"not",
"destroyed",
"until",
"the",
"replacement",
"is",
"successfully",
"put",
"in",
"its",
"place",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/lowlevel/akubra/AkubraLowlevelStorage.java#L327-L397 |
8,927 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/storage/lowlevel/akubra/AkubraLowlevelStorage.java | AkubraLowlevelStorage.getToken | private static String getToken(URI blobId) {
String[] parts = blobId.getSchemeSpecificPart().split("/");
if (parts.length == 2) {
return parts[1];
} else if (parts.length == 4) {
return parts[1] + "+" + uriDecode(parts[2]) + "+"
+ uriDecode(parts[3]);... | java | private static String getToken(URI blobId) {
String[] parts = blobId.getSchemeSpecificPart().split("/");
if (parts.length == 2) {
return parts[1];
} else if (parts.length == 4) {
return parts[1] + "+" + uriDecode(parts[2]) + "+"
+ uriDecode(parts[3]);... | [
"private",
"static",
"String",
"getToken",
"(",
"URI",
"blobId",
")",
"{",
"String",
"[",
"]",
"parts",
"=",
"blobId",
".",
"getSchemeSpecificPart",
"(",
")",
".",
"split",
"(",
"\"/\"",
")",
";",
"if",
"(",
"parts",
".",
"length",
"==",
"2",
")",
"{... | Converts a token-as-blobId back to a token.
@param blobId the blobId to convert.
@return the resulting object or datastream token. | [
"Converts",
"a",
"token",
"-",
"as",
"-",
"blobId",
"back",
"to",
"a",
"token",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/lowlevel/akubra/AkubraLowlevelStorage.java#L610-L621 |
8,928 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/ExistPolicyIndex.java | ExistPolicyIndex.nodeToByte | @Deprecated
protected static byte[] nodeToByte(Node node) throws PolicyIndexException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
Writer output = new OutputStreamWriter(out, Charset.forName("UTF-8"));
try {
SunXmlSerializers.writePrettyPrintWithDecl(node, output);... | java | @Deprecated
protected static byte[] nodeToByte(Node node) throws PolicyIndexException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
Writer output = new OutputStreamWriter(out, Charset.forName("UTF-8"));
try {
SunXmlSerializers.writePrettyPrintWithDecl(node, output);... | [
"@",
"Deprecated",
"protected",
"static",
"byte",
"[",
"]",
"nodeToByte",
"(",
"Node",
"node",
")",
"throws",
"PolicyIndexException",
"{",
"ByteArrayOutputStream",
"out",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"Writer",
"output",
"=",
"new",
"Output... | get XML document supplied as w3c dom Node as bytes
@param node
@return
@throws PolicyIndexException | [
"get",
"XML",
"document",
"supplied",
"as",
"w3c",
"dom",
"Node",
"as",
"bytes"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/ExistPolicyIndex.java#L304-L316 |
8,929 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/ExistPolicyIndex.java | ExistPolicyIndex.sortDescending | protected static String[] sortDescending(String[] s) {
Arrays.sort(s,
new Comparator<String>() {
@Override
public int compare(String o1, String o2) {
if (o1.length() < o2.length())
return 1;
if (o1.length() > o2.len... | java | protected static String[] sortDescending(String[] s) {
Arrays.sort(s,
new Comparator<String>() {
@Override
public int compare(String o1, String o2) {
if (o1.length() < o2.length())
return 1;
if (o1.length() > o2.len... | [
"protected",
"static",
"String",
"[",
"]",
"sortDescending",
"(",
"String",
"[",
"]",
"s",
")",
"{",
"Arrays",
".",
"sort",
"(",
"s",
",",
"new",
"Comparator",
"<",
"String",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"int",
"compare",
"(",
"Stri... | sorts a string array in descending order of length
@param s
@return | [
"sorts",
"a",
"string",
"array",
"in",
"descending",
"order",
"of",
"length"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/ExistPolicyIndex.java#L342-L356 |
8,930 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/ExistPolicyIndex.java | ExistPolicyIndex.createCollectionPath | protected Collection createCollectionPath(String collectionPath, Collection rootCollection) throws PolicyIndexException {
try {
if (rootCollection.getParentCollection() != null) {
throw new PolicyIndexException("Collection supplied is not a root collection");
}
... | java | protected Collection createCollectionPath(String collectionPath, Collection rootCollection) throws PolicyIndexException {
try {
if (rootCollection.getParentCollection() != null) {
throw new PolicyIndexException("Collection supplied is not a root collection");
}
... | [
"protected",
"Collection",
"createCollectionPath",
"(",
"String",
"collectionPath",
",",
"Collection",
"rootCollection",
")",
"throws",
"PolicyIndexException",
"{",
"try",
"{",
"if",
"(",
"rootCollection",
".",
"getParentCollection",
"(",
")",
"!=",
"null",
")",
"{"... | Create a collection given a full path to the collection. The collection path must include
the root collection. Intermediate collections in the path are created if they do not
already exist.
@param collectionPath
@param rootCollection
@return
@throws PolicyIndexException | [
"Create",
"a",
"collection",
"given",
"a",
"full",
"path",
"to",
"the",
"collection",
".",
"The",
"collection",
"path",
"must",
"include",
"the",
"root",
"collection",
".",
"Intermediate",
"collections",
"in",
"the",
"path",
"are",
"created",
"if",
"they",
"... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/ExistPolicyIndex.java#L412-L449 |
8,931 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/ExistPolicyIndex.java | ExistPolicyIndex.deleteCollection | protected void deleteCollection() throws PolicyIndexException {
// get root collection management service
Collection rootCol;
try {
rootCol = DatabaseManager.getCollection(m_databaseURI + ROOT_COLLECTION_PATH ,m_user, m_password);
CollectionManagementService mgtService =... | java | protected void deleteCollection() throws PolicyIndexException {
// get root collection management service
Collection rootCol;
try {
rootCol = DatabaseManager.getCollection(m_databaseURI + ROOT_COLLECTION_PATH ,m_user, m_password);
CollectionManagementService mgtService =... | [
"protected",
"void",
"deleteCollection",
"(",
")",
"throws",
"PolicyIndexException",
"{",
"// get root collection management service",
"Collection",
"rootCol",
";",
"try",
"{",
"rootCol",
"=",
"DatabaseManager",
".",
"getCollection",
"(",
"m_databaseURI",
"+",
"ROOT_COLLE... | delete the policy collection from the database
@throws PolicyIndexException | [
"delete",
"the",
"policy",
"collection",
"from",
"the",
"database"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/ExistPolicyIndex.java#L562-L577 |
8,932 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/ExistPolicyIndex.java | ExistPolicyIndex.createDocument | protected static Document createDocument(String document) throws PolicyIndexException {
// parse policy document and create dom
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
DocumentBuilder builder;
try {
buil... | java | protected static Document createDocument(String document) throws PolicyIndexException {
// parse policy document and create dom
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
DocumentBuilder builder;
try {
buil... | [
"protected",
"static",
"Document",
"createDocument",
"(",
"String",
"document",
")",
"throws",
"PolicyIndexException",
"{",
"// parse policy document and create dom",
"DocumentBuilderFactory",
"factory",
"=",
"DocumentBuilderFactory",
".",
"newInstance",
"(",
")",
";",
"fac... | create an XML Document from the policy document | [
"create",
"an",
"XML",
"Document",
"from",
"the",
"policy",
"document"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/ExistPolicyIndex.java#L580-L597 |
8,933 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multicast/JournalEntrySizeEstimator.java | JournalEntrySizeEstimator.createXmlEventWriter | private XMLEventWriter createXmlEventWriter(StringWriter stringWriter)
throws FactoryConfigurationError, XMLStreamException {
return new IndentingXMLEventWriter(XMLOutputFactory.newInstance()
.createXMLEventWriter(stringWriter));
} | java | private XMLEventWriter createXmlEventWriter(StringWriter stringWriter)
throws FactoryConfigurationError, XMLStreamException {
return new IndentingXMLEventWriter(XMLOutputFactory.newInstance()
.createXMLEventWriter(stringWriter));
} | [
"private",
"XMLEventWriter",
"createXmlEventWriter",
"(",
"StringWriter",
"stringWriter",
")",
"throws",
"FactoryConfigurationError",
",",
"XMLStreamException",
"{",
"return",
"new",
"IndentingXMLEventWriter",
"(",
"XMLOutputFactory",
".",
"newInstance",
"(",
")",
".",
"c... | Wrap an XMLEventWriter around that StringWriter. | [
"Wrap",
"an",
"XMLEventWriter",
"around",
"that",
"StringWriter",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multicast/JournalEntrySizeEstimator.java#L111-L115 |
8,934 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/JournalHelper.java | JournalHelper.copyToTempFile | public static File copyToTempFile(InputStream serialization)
throws IOException, FileNotFoundException {
File tempFile = createTempFile();
StreamUtility.pipeStream(serialization,
new FileOutputStream(tempFile),
4096);
... | java | public static File copyToTempFile(InputStream serialization)
throws IOException, FileNotFoundException {
File tempFile = createTempFile();
StreamUtility.pipeStream(serialization,
new FileOutputStream(tempFile),
4096);
... | [
"public",
"static",
"File",
"copyToTempFile",
"(",
"InputStream",
"serialization",
")",
"throws",
"IOException",
",",
"FileNotFoundException",
"{",
"File",
"tempFile",
"=",
"createTempFile",
"(",
")",
";",
"StreamUtility",
".",
"pipeStream",
"(",
"serialization",
",... | Copy an input stream to a temporary file, so we can hand an input stream
to the delegate and have another input stream for the journal. | [
"Copy",
"an",
"input",
"stream",
"to",
"a",
"temporary",
"file",
"so",
"we",
"can",
"hand",
"an",
"input",
"stream",
"to",
"the",
"delegate",
"and",
"have",
"another",
"input",
"stream",
"for",
"the",
"journal",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/JournalHelper.java#L45-L52 |
8,935 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/JournalHelper.java | JournalHelper.captureStackTrace | public static String captureStackTrace(Throwable e) {
StringWriter buffer = new StringWriter();
e.printStackTrace(new PrintWriter(buffer));
return buffer.toString();
} | java | public static String captureStackTrace(Throwable e) {
StringWriter buffer = new StringWriter();
e.printStackTrace(new PrintWriter(buffer));
return buffer.toString();
} | [
"public",
"static",
"String",
"captureStackTrace",
"(",
"Throwable",
"e",
")",
"{",
"StringWriter",
"buffer",
"=",
"new",
"StringWriter",
"(",
")",
";",
"e",
".",
"printStackTrace",
"(",
"new",
"PrintWriter",
"(",
"buffer",
")",
")",
";",
"return",
"buffer",... | Capture the full stack trace of an Exception, and return it in a String. | [
"Capture",
"the",
"full",
"stack",
"trace",
"of",
"an",
"Exception",
"and",
"return",
"it",
"in",
"a",
"String",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/JournalHelper.java#L73-L77 |
8,936 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/JournalHelper.java | JournalHelper.createInstanceAccordingToParameter | public static Object createInstanceAccordingToParameter(String parameterName,
Class<?>[] argClasses,
Object[] args,
Map<String, String> para... | java | public static Object createInstanceAccordingToParameter(String parameterName,
Class<?>[] argClasses,
Object[] args,
Map<String, String> para... | [
"public",
"static",
"Object",
"createInstanceAccordingToParameter",
"(",
"String",
"parameterName",
",",
"Class",
"<",
"?",
">",
"[",
"]",
"argClasses",
",",
"Object",
"[",
"]",
"args",
",",
"Map",
"<",
"String",
",",
"String",
">",
"parameters",
")",
"throw... | Look in the system parameters and create an instance of the named class.
@param parameterName
The name of the system parameter that contains the classname
@param argClasses
What types of arguments are required by the constructor?
@param args
Arguments to provide to the instance constructor.
@param parameters
The syste... | [
"Look",
"in",
"the",
"system",
"parameters",
"and",
"create",
"an",
"instance",
"of",
"the",
"named",
"class",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/JournalHelper.java#L92-L102 |
8,937 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/JournalHelper.java | JournalHelper.createInstanceFromClassname | public static Object createInstanceFromClassname(String className,
Class<?>[] argClasses,
Object[] args)
throws JournalException {
try {
Class<?> clazz = Class.forName(className);
... | java | public static Object createInstanceFromClassname(String className,
Class<?>[] argClasses,
Object[] args)
throws JournalException {
try {
Class<?> clazz = Class.forName(className);
... | [
"public",
"static",
"Object",
"createInstanceFromClassname",
"(",
"String",
"className",
",",
"Class",
"<",
"?",
">",
"[",
"]",
"argClasses",
",",
"Object",
"[",
"]",
"args",
")",
"throws",
"JournalException",
"{",
"try",
"{",
"Class",
"<",
"?",
">",
"claz... | Create an instance of the named class.
@param className
The classname of the desired instance
@param argClasses
What types of arguments are required by the constructor?
@param args
Arguments to provide to the instance constructor.
@return the new instance created | [
"Create",
"an",
"instance",
"of",
"the",
"named",
"class",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/JournalHelper.java#L115-L127 |
8,938 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/JournalHelper.java | JournalHelper.formatDate | public static String formatDate(Date date) {
SimpleDateFormat formatter = new SimpleDateFormat(TIMESTAMP_FORMAT);
return formatter.format(date);
} | java | public static String formatDate(Date date) {
SimpleDateFormat formatter = new SimpleDateFormat(TIMESTAMP_FORMAT);
return formatter.format(date);
} | [
"public",
"static",
"String",
"formatDate",
"(",
"Date",
"date",
")",
"{",
"SimpleDateFormat",
"formatter",
"=",
"new",
"SimpleDateFormat",
"(",
"TIMESTAMP_FORMAT",
")",
";",
"return",
"formatter",
".",
"format",
"(",
"date",
")",
";",
"}"
] | Format a date for the journal or the logger. | [
"Format",
"a",
"date",
"for",
"the",
"journal",
"or",
"the",
"logger",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/JournalHelper.java#L132-L135 |
8,939 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/JournalHelper.java | JournalHelper.parseDate | public static Date parseDate(String date) throws JournalException {
try {
SimpleDateFormat parser = new SimpleDateFormat(TIMESTAMP_FORMAT);
return parser.parse(date);
} catch (ParseException e) {
throw new JournalException(e);
}
} | java | public static Date parseDate(String date) throws JournalException {
try {
SimpleDateFormat parser = new SimpleDateFormat(TIMESTAMP_FORMAT);
return parser.parse(date);
} catch (ParseException e) {
throw new JournalException(e);
}
} | [
"public",
"static",
"Date",
"parseDate",
"(",
"String",
"date",
")",
"throws",
"JournalException",
"{",
"try",
"{",
"SimpleDateFormat",
"parser",
"=",
"new",
"SimpleDateFormat",
"(",
"TIMESTAMP_FORMAT",
")",
";",
"return",
"parser",
".",
"parse",
"(",
"date",
... | Parse a date from the journal. | [
"Parse",
"a",
"date",
"from",
"the",
"journal",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/JournalHelper.java#L140-L147 |
8,940 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/JournalHelper.java | JournalHelper.createTimestampedFilename | public static String createTimestampedFilename(String filenamePrefix,
Date date) {
SimpleDateFormat formatter =
new SimpleDateFormat(FORMAT_JOURNAL_FILENAME_TIMESTAMP);
formatter.setTimeZone(TimeZone.getTimeZone("GMT"));
return f... | java | public static String createTimestampedFilename(String filenamePrefix,
Date date) {
SimpleDateFormat formatter =
new SimpleDateFormat(FORMAT_JOURNAL_FILENAME_TIMESTAMP);
formatter.setTimeZone(TimeZone.getTimeZone("GMT"));
return f... | [
"public",
"static",
"String",
"createTimestampedFilename",
"(",
"String",
"filenamePrefix",
",",
"Date",
"date",
")",
"{",
"SimpleDateFormat",
"formatter",
"=",
"new",
"SimpleDateFormat",
"(",
"FORMAT_JOURNAL_FILENAME_TIMESTAMP",
")",
";",
"formatter",
".",
"setTimeZone... | Create the name for a Journal file or a log file, based on the prefix and
the current date. | [
"Create",
"the",
"name",
"for",
"a",
"Journal",
"file",
"or",
"a",
"log",
"file",
"based",
"on",
"the",
"prefix",
"and",
"the",
"current",
"date",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/JournalHelper.java#L153-L159 |
8,941 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/validation/ValidationUtility.java | ValidationUtility.validateURL | public static void validateURL(String url, String controlGroup)
throws ValidationException {
if (!(controlGroup.equalsIgnoreCase("M") || controlGroup.equalsIgnoreCase("E")) && url.startsWith("file:")) {
throw new ValidationException(
"Malformed URL (file: not allowed ... | java | public static void validateURL(String url, String controlGroup)
throws ValidationException {
if (!(controlGroup.equalsIgnoreCase("M") || controlGroup.equalsIgnoreCase("E")) && url.startsWith("file:")) {
throw new ValidationException(
"Malformed URL (file: not allowed ... | [
"public",
"static",
"void",
"validateURL",
"(",
"String",
"url",
",",
"String",
"controlGroup",
")",
"throws",
"ValidationException",
"{",
"if",
"(",
"!",
"(",
"controlGroup",
".",
"equalsIgnoreCase",
"(",
"\"M\"",
")",
"||",
"controlGroup",
".",
"equalsIgnoreCa... | Validates the candidate URL. The result of the validation also depends on the
control group of the datastream in question. Managed datastreams may be ingested
using the file URI scheme, other datastreams may not.
@param url
The URL to validate.
@param controlGroup
The control group of the datastream the URL belongs to... | [
"Validates",
"the",
"candidate",
"URL",
".",
"The",
"result",
"of",
"the",
"validation",
"also",
"depends",
"on",
"the",
"control",
"group",
"of",
"the",
"datastream",
"in",
"question",
".",
"Managed",
"datastreams",
"may",
"be",
"ingested",
"using",
"the",
... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/validation/ValidationUtility.java#L59-L74 |
8,942 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/validation/ValidationUtility.java | ValidationUtility.validateReservedDatastreams | public static void validateReservedDatastreams(DOReader reader)
throws ValidationException {
try {
for (Datastream ds: reader.GetDatastreams(null, null)) {
if ("X".equals(ds.DSControlGrp) || "M".equals(ds.DSControlGrp)) {
validateReservedDatastream(PID... | java | public static void validateReservedDatastreams(DOReader reader)
throws ValidationException {
try {
for (Datastream ds: reader.GetDatastreams(null, null)) {
if ("X".equals(ds.DSControlGrp) || "M".equals(ds.DSControlGrp)) {
validateReservedDatastream(PID... | [
"public",
"static",
"void",
"validateReservedDatastreams",
"(",
"DOReader",
"reader",
")",
"throws",
"ValidationException",
"{",
"try",
"{",
"for",
"(",
"Datastream",
"ds",
":",
"reader",
".",
"GetDatastreams",
"(",
"null",
",",
"null",
")",
")",
"{",
"if",
... | Validates the latest version of all reserved datastreams in the given
object. | [
"Validates",
"the",
"latest",
"version",
"of",
"all",
"reserved",
"datastreams",
"in",
"the",
"given",
"object",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/validation/ValidationUtility.java#L99-L114 |
8,943 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/validation/ValidationUtility.java | ValidationUtility.validateReservedDatastream | public static void validateReservedDatastream(PID pid,
String dsId,
Datastream ds)
throws ValidationException {
// NB: only want to generate inputstream from .getContentStream() once
// we kn... | java | public static void validateReservedDatastream(PID pid,
String dsId,
Datastream ds)
throws ValidationException {
// NB: only want to generate inputstream from .getContentStream() once
// we kn... | [
"public",
"static",
"void",
"validateReservedDatastream",
"(",
"PID",
"pid",
",",
"String",
"dsId",
",",
"Datastream",
"ds",
")",
"throws",
"ValidationException",
"{",
"// NB: only want to generate inputstream from .getContentStream() once",
"// we know that this is a datastream ... | Validates the given datastream if it's a reserved datastream.
The given stream is guaranteed to be closed when this method completes. | [
"Validates",
"the",
"given",
"datastream",
"if",
"it",
"s",
"a",
"reserved",
"datastream",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/validation/ValidationUtility.java#L121-L153 |
8,944 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/validation/ValidationUtility.java | ValidationUtility.validateRELS | private static void validateRELS(PID pid, String dsId, InputStream content)
throws ValidationException {
logger.debug("Validating " + dsId + " datastream");
new RelsValidator().validate(pid, dsId, content);
logger.debug(dsId + " datastream is valid");
} | java | private static void validateRELS(PID pid, String dsId, InputStream content)
throws ValidationException {
logger.debug("Validating " + dsId + " datastream");
new RelsValidator().validate(pid, dsId, content);
logger.debug(dsId + " datastream is valid");
} | [
"private",
"static",
"void",
"validateRELS",
"(",
"PID",
"pid",
",",
"String",
"dsId",
",",
"InputStream",
"content",
")",
"throws",
"ValidationException",
"{",
"logger",
".",
"debug",
"(",
"\"Validating \"",
"+",
"dsId",
"+",
"\" datastream\"",
")",
";",
"new... | validate relationships datastream
@param pid
@param dsId
@param content
@throws ValidationException | [
"validate",
"relationships",
"datastream"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/validation/ValidationUtility.java#L181-L186 |
8,945 | fcrepo3/fcrepo | fcrepo-webapp/fcrepo-webapp-fop/src/main/java/org/fcrepo/localservices/fop/FOPServlet.java | FOPServlet.convertString2Source | protected Source convertString2Source(String param) {
Source src;
try {
src = uriResolver.resolve(param, null);
} catch (TransformerException e) {
src = null;
}
if (src == null) {
src = new StreamSource(new File(param));
}
retur... | java | protected Source convertString2Source(String param) {
Source src;
try {
src = uriResolver.resolve(param, null);
} catch (TransformerException e) {
src = null;
}
if (src == null) {
src = new StreamSource(new File(param));
}
retur... | [
"protected",
"Source",
"convertString2Source",
"(",
"String",
"param",
")",
"{",
"Source",
"src",
";",
"try",
"{",
"src",
"=",
"uriResolver",
".",
"resolve",
"(",
"param",
",",
"null",
")",
";",
"}",
"catch",
"(",
"TransformerException",
"e",
")",
"{",
"... | Converts a String parameter to a JAXP Source object.
@param param a String parameter
@return Source the generated Source object | [
"Converts",
"a",
"String",
"parameter",
"to",
"a",
"JAXP",
"Source",
"object",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-webapp/fcrepo-webapp-fop/src/main/java/org/fcrepo/localservices/fop/FOPServlet.java#L115-L126 |
8,946 | fcrepo3/fcrepo | fcrepo-webapp/fcrepo-webapp-fop/src/main/java/org/fcrepo/localservices/fop/FOPServlet.java | FOPServlet.renderFO | protected void renderFO(String fo, HttpServletResponse response)
throws FOPException, TransformerException, IOException {
//Setup source
Source foSrc = convertString2Source(fo);
//Setup the identity transformation
Transformer transformer = this.transFactory.newTransform... | java | protected void renderFO(String fo, HttpServletResponse response)
throws FOPException, TransformerException, IOException {
//Setup source
Source foSrc = convertString2Source(fo);
//Setup the identity transformation
Transformer transformer = this.transFactory.newTransform... | [
"protected",
"void",
"renderFO",
"(",
"String",
"fo",
",",
"HttpServletResponse",
"response",
")",
"throws",
"FOPException",
",",
"TransformerException",
",",
"IOException",
"{",
"//Setup source",
"Source",
"foSrc",
"=",
"convertString2Source",
"(",
"fo",
")",
";",
... | Renders an XSL-FO file into a PDF file. The PDF is written to a byte
array that is returned as the method's result.
@param fo the XSL-FO file
@param response HTTP response object
@throws FOPException If an error occurs during the rendering of the
XSL-FO
@throws TransformerException If an error occurs while parsing the ... | [
"Renders",
"an",
"XSL",
"-",
"FO",
"file",
"into",
"a",
"PDF",
"file",
".",
"The",
"PDF",
"is",
"written",
"to",
"a",
"byte",
"array",
"that",
"is",
"returned",
"as",
"the",
"method",
"s",
"result",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-webapp/fcrepo-webapp-fop/src/main/java/org/fcrepo/localservices/fop/FOPServlet.java#L139-L151 |
8,947 | fcrepo3/fcrepo | fcrepo-webapp/fcrepo-webapp-fop/src/main/java/org/fcrepo/localservices/fop/FOPServlet.java | FOPServlet.renderXML | protected void renderXML(String xml, String xslt, HttpServletResponse response)
throws FOPException, TransformerException, IOException {
//Setup sources
Source xmlSrc = convertString2Source(xml);
Source xsltSrc = convertString2Source(xslt);
//Setup the XSL transformatio... | java | protected void renderXML(String xml, String xslt, HttpServletResponse response)
throws FOPException, TransformerException, IOException {
//Setup sources
Source xmlSrc = convertString2Source(xml);
Source xsltSrc = convertString2Source(xslt);
//Setup the XSL transformatio... | [
"protected",
"void",
"renderXML",
"(",
"String",
"xml",
",",
"String",
"xslt",
",",
"HttpServletResponse",
"response",
")",
"throws",
"FOPException",
",",
"TransformerException",
",",
"IOException",
"{",
"//Setup sources",
"Source",
"xmlSrc",
"=",
"convertString2Sourc... | Renders an XML file into a PDF file by applying a stylesheet
that converts the XML to XSL-FO. The PDF is written to a byte array
that is returned as the method's result.
@param xml the XML file
@param xslt the XSLT file
@param response HTTP response object
@throws FOPException If an error occurs during the rendering of... | [
"Renders",
"an",
"XML",
"file",
"into",
"a",
"PDF",
"file",
"by",
"applying",
"a",
"stylesheet",
"that",
"converts",
"the",
"XML",
"to",
"XSL",
"-",
"FO",
".",
"The",
"PDF",
"is",
"written",
"to",
"a",
"byte",
"array",
"that",
"is",
"returned",
"as",
... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-webapp/fcrepo-webapp-fop/src/main/java/org/fcrepo/localservices/fop/FOPServlet.java#L166-L179 |
8,948 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/FedoraPolicyStore.java | FedoraPolicyStore.setSchemaValidation | public void setSchemaValidation(boolean validate){
this.validateSchema = validate;
log.info("Initialising validation " + Boolean.toString(validate));
ValidationUtility.setValidateFeslPolicy(validate);
} | java | public void setSchemaValidation(boolean validate){
this.validateSchema = validate;
log.info("Initialising validation " + Boolean.toString(validate));
ValidationUtility.setValidateFeslPolicy(validate);
} | [
"public",
"void",
"setSchemaValidation",
"(",
"boolean",
"validate",
")",
"{",
"this",
".",
"validateSchema",
"=",
"validate",
";",
"log",
".",
"info",
"(",
"\"Initialising validation \"",
"+",
"Boolean",
".",
"toString",
"(",
"validate",
")",
")",
";",
"Valid... | schema config properties | [
"schema",
"config",
"properties"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/FedoraPolicyStore.java#L145-L149 |
8,949 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/recoverylog/BufferedJournalRecoveryLog.java | BufferedJournalRecoveryLog.shutdown | @Override
public synchronized void shutdown() {
try {
if (open) {
open = false;
FileWriter logWriter = new FileWriter(logFile);
logWriter.write(buffer.toString());
logWriter.close();
}
} catch (IOException e) {
... | java | @Override
public synchronized void shutdown() {
try {
if (open) {
open = false;
FileWriter logWriter = new FileWriter(logFile);
logWriter.write(buffer.toString());
logWriter.close();
}
} catch (IOException e) {
... | [
"@",
"Override",
"public",
"synchronized",
"void",
"shutdown",
"(",
")",
"{",
"try",
"{",
"if",
"(",
"open",
")",
"{",
"open",
"=",
"false",
";",
"FileWriter",
"logWriter",
"=",
"new",
"FileWriter",
"(",
"logFile",
")",
";",
"logWriter",
".",
"write",
... | On the first call to this method, write the buffer to the log file. Set
the flag so no more logging calls will be accepted. | [
"On",
"the",
"first",
"call",
"to",
"this",
"method",
"write",
"the",
"buffer",
"to",
"the",
"log",
"file",
".",
"Set",
"the",
"flag",
"so",
"no",
"more",
"logging",
"calls",
"will",
"be",
"accepted",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/recoverylog/BufferedJournalRecoveryLog.java#L79-L91 |
8,950 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/utilities/TableSpec.java | TableSpec.getTableSpecs | public static List<TableSpec> getTableSpecs(InputStream in)
throws InconsistentTableSpecException, IOException {
try {
TableSpecDeserializer tsd = new TableSpecDeserializer();
XmlTransformUtility.parseWithoutValidating(in, tsd);
tsd.assertTableSpecsConsistent();
... | java | public static List<TableSpec> getTableSpecs(InputStream in)
throws InconsistentTableSpecException, IOException {
try {
TableSpecDeserializer tsd = new TableSpecDeserializer();
XmlTransformUtility.parseWithoutValidating(in, tsd);
tsd.assertTableSpecsConsistent();
... | [
"public",
"static",
"List",
"<",
"TableSpec",
">",
"getTableSpecs",
"(",
"InputStream",
"in",
")",
"throws",
"InconsistentTableSpecException",
",",
"IOException",
"{",
"try",
"{",
"TableSpecDeserializer",
"tsd",
"=",
"new",
"TableSpecDeserializer",
"(",
")",
";",
... | Gets a TableSpec for each table element in the stream, where the stream
contains a valid XML document containing one or more table elements,
wrapped in the root element.
<p>
Input is of the form:
<pre>
<database>
<table name="<i>tableName</i>" primaryKey="<i>primaryColumnName</i>" type=&q... | [
"Gets",
"a",
"TableSpec",
"for",
"each",
"table",
"element",
"in",
"the",
"stream",
"where",
"the",
"stream",
"contains",
"a",
"valid",
"XML",
"document",
"containing",
"one",
"or",
"more",
"table",
"elements",
"wrapped",
"in",
"the",
"root",
"element",
"."
... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/utilities/TableSpec.java#L155-L167 |
8,951 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/recoverylog/UnbufferedJournalRecoveryLog.java | UnbufferedJournalRecoveryLog.shutdown | @Override
public synchronized void shutdown() {
try {
if (open) {
open = false;
writer.close();
}
} catch (IOException e) {
logger.error("Error shutting down journal log", e);
}
} | java | @Override
public synchronized void shutdown() {
try {
if (open) {
open = false;
writer.close();
}
} catch (IOException e) {
logger.error("Error shutting down journal log", e);
}
} | [
"@",
"Override",
"public",
"synchronized",
"void",
"shutdown",
"(",
")",
"{",
"try",
"{",
"if",
"(",
"open",
")",
"{",
"open",
"=",
"false",
";",
"writer",
".",
"close",
"(",
")",
";",
"}",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"logger",... | On the first call to this method, close the log file. Set the flag so no
more logging calls will be accepted. | [
"On",
"the",
"first",
"call",
"to",
"this",
"method",
"close",
"the",
"log",
"file",
".",
"Set",
"the",
"flag",
"so",
"no",
"more",
"logging",
"calls",
"will",
"be",
"accepted",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/recoverylog/UnbufferedJournalRecoveryLog.java#L88-L98 |
8,952 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/security/BESecurityConfig.java | BESecurityConfig.getEffectiveInternalSSL | public Boolean getEffectiveInternalSSL() {
if (m_internalSSL != null) {
return m_internalSSL;
} else if (m_defaultConfig != null) {
return m_defaultConfig.getEffectiveCallSSL();
} else {
return Boolean.FALSE;
}
} | java | public Boolean getEffectiveInternalSSL() {
if (m_internalSSL != null) {
return m_internalSSL;
} else if (m_defaultConfig != null) {
return m_defaultConfig.getEffectiveCallSSL();
} else {
return Boolean.FALSE;
}
} | [
"public",
"Boolean",
"getEffectiveInternalSSL",
"(",
")",
"{",
"if",
"(",
"m_internalSSL",
"!=",
"null",
")",
"{",
"return",
"m_internalSSL",
";",
"}",
"else",
"if",
"(",
"m_defaultConfig",
"!=",
"null",
")",
"{",
"return",
"m_defaultConfig",
".",
"getEffectiv... | Get whether SSL is effectively used for Fedora-to-self calls. This will
be the internalSSL value, if set, or the inherited call value from the
default role, if set, or Boolean.FALSE. | [
"Get",
"whether",
"SSL",
"is",
"effectively",
"used",
"for",
"Fedora",
"-",
"to",
"-",
"self",
"calls",
".",
"This",
"will",
"be",
"the",
"internalSSL",
"value",
"if",
"set",
"or",
"the",
"inherited",
"call",
"value",
"from",
"the",
"default",
"role",
"i... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/security/BESecurityConfig.java#L137-L145 |
8,953 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/security/BESecurityConfig.java | BESecurityConfig.getEffectiveInternalBasicAuth | public Boolean getEffectiveInternalBasicAuth() {
if (m_internalBasicAuth != null) {
return m_internalBasicAuth;
} else if (m_defaultConfig != null) {
return m_defaultConfig.getEffectiveCallBasicAuth();
} else {
return Boolean.FALSE;
}
} | java | public Boolean getEffectiveInternalBasicAuth() {
if (m_internalBasicAuth != null) {
return m_internalBasicAuth;
} else if (m_defaultConfig != null) {
return m_defaultConfig.getEffectiveCallBasicAuth();
} else {
return Boolean.FALSE;
}
} | [
"public",
"Boolean",
"getEffectiveInternalBasicAuth",
"(",
")",
"{",
"if",
"(",
"m_internalBasicAuth",
"!=",
"null",
")",
"{",
"return",
"m_internalBasicAuth",
";",
"}",
"else",
"if",
"(",
"m_defaultConfig",
"!=",
"null",
")",
"{",
"return",
"m_defaultConfig",
"... | Get whether basic auth is effectively used for Fedora-to-self calls. This
will be the internalBasicAuth value, if set, or the inherited call value
from the default role, if set, or Boolean.FALSE. | [
"Get",
"whether",
"basic",
"auth",
"is",
"effectively",
"used",
"for",
"Fedora",
"-",
"to",
"-",
"self",
"calls",
".",
"This",
"will",
"be",
"the",
"internalBasicAuth",
"value",
"if",
"set",
"or",
"the",
"inherited",
"call",
"value",
"from",
"the",
"defaul... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/security/BESecurityConfig.java#L169-L177 |
8,954 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/security/BESecurityConfig.java | BESecurityConfig.getEffectiveInternalUsername | public String getEffectiveInternalUsername() {
if (m_internalUsername != null) {
return m_internalUsername;
} else if (m_defaultConfig != null) {
return m_defaultConfig.getEffectiveCallUsername();
} else {
return null;
}
} | java | public String getEffectiveInternalUsername() {
if (m_internalUsername != null) {
return m_internalUsername;
} else if (m_defaultConfig != null) {
return m_defaultConfig.getEffectiveCallUsername();
} else {
return null;
}
} | [
"public",
"String",
"getEffectiveInternalUsername",
"(",
")",
"{",
"if",
"(",
"m_internalUsername",
"!=",
"null",
")",
"{",
"return",
"m_internalUsername",
";",
"}",
"else",
"if",
"(",
"m_defaultConfig",
"!=",
"null",
")",
"{",
"return",
"m_defaultConfig",
".",
... | Get the effective internal username for basic auth Fedora-to-self calls.
This will be the internal username, if set, or the inherited call value
from the default role, if set, or null. | [
"Get",
"the",
"effective",
"internal",
"username",
"for",
"basic",
"auth",
"Fedora",
"-",
"to",
"-",
"self",
"calls",
".",
"This",
"will",
"be",
"the",
"internal",
"username",
"if",
"set",
"or",
"the",
"inherited",
"call",
"value",
"from",
"the",
"default"... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/security/BESecurityConfig.java#L200-L208 |
8,955 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/security/BESecurityConfig.java | BESecurityConfig.getEffectiveInternalPassword | public String getEffectiveInternalPassword() {
if (m_internalPassword != null) {
return m_internalPassword;
} else if (m_defaultConfig != null) {
return m_defaultConfig.getEffectiveCallPassword();
} else {
return null;
}
} | java | public String getEffectiveInternalPassword() {
if (m_internalPassword != null) {
return m_internalPassword;
} else if (m_defaultConfig != null) {
return m_defaultConfig.getEffectiveCallPassword();
} else {
return null;
}
} | [
"public",
"String",
"getEffectiveInternalPassword",
"(",
")",
"{",
"if",
"(",
"m_internalPassword",
"!=",
"null",
")",
"{",
"return",
"m_internalPassword",
";",
"}",
"else",
"if",
"(",
"m_defaultConfig",
"!=",
"null",
")",
"{",
"return",
"m_defaultConfig",
".",
... | Get the effective internal password for basic auth Fedora-to-self calls.
This will be the internal password, if set, or the inherited call value
from the default role, if set, or null. | [
"Get",
"the",
"effective",
"internal",
"password",
"for",
"basic",
"auth",
"Fedora",
"-",
"to",
"-",
"self",
"calls",
".",
"This",
"will",
"be",
"the",
"internal",
"password",
"if",
"set",
"or",
"the",
"inherited",
"call",
"value",
"from",
"the",
"default"... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/security/BESecurityConfig.java#L231-L239 |
8,956 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/security/BESecurityConfig.java | BESecurityConfig.getEffectiveInternalIPList | public String[] getEffectiveInternalIPList() {
if (m_internalIPList != null) {
return m_internalIPList;
} else if (m_defaultConfig != null) {
return m_defaultConfig.getEffectiveIPList();
} else {
return null;
}
} | java | public String[] getEffectiveInternalIPList() {
if (m_internalIPList != null) {
return m_internalIPList;
} else if (m_defaultConfig != null) {
return m_defaultConfig.getEffectiveIPList();
} else {
return null;
}
} | [
"public",
"String",
"[",
"]",
"getEffectiveInternalIPList",
"(",
")",
"{",
"if",
"(",
"m_internalIPList",
"!=",
"null",
")",
"{",
"return",
"m_internalIPList",
";",
"}",
"else",
"if",
"(",
"m_defaultConfig",
"!=",
"null",
")",
"{",
"return",
"m_defaultConfig",... | Get the effective list of internal IP addresses. This will be the
internalIPList value, if set, or the inherited value from the default
role, if set, or null. | [
"Get",
"the",
"effective",
"list",
"of",
"internal",
"IP",
"addresses",
".",
"This",
"will",
"be",
"the",
"internalIPList",
"value",
"if",
"set",
"or",
"the",
"inherited",
"value",
"from",
"the",
"default",
"role",
"if",
"set",
"or",
"null",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/security/BESecurityConfig.java#L262-L270 |
8,957 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/security/BESecurityConfig.java | BESecurityConfig.addEmptyConfigs | public void addEmptyConfigs(Map<String, List<String>> pidToMethodList) {
Iterator<String> pIter = pidToMethodList.keySet().iterator();
while (pIter.hasNext()) {
String sDepPID = pIter.next();
// add the sDep indicated by the key if it doesn't exist
ServiceDeploymentRo... | java | public void addEmptyConfigs(Map<String, List<String>> pidToMethodList) {
Iterator<String> pIter = pidToMethodList.keySet().iterator();
while (pIter.hasNext()) {
String sDepPID = pIter.next();
// add the sDep indicated by the key if it doesn't exist
ServiceDeploymentRo... | [
"public",
"void",
"addEmptyConfigs",
"(",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"pidToMethodList",
")",
"{",
"Iterator",
"<",
"String",
">",
"pIter",
"=",
"pidToMethodList",
".",
"keySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
... | Add empty sDep and method configurations given by the map if they are
not already already defined. | [
"Add",
"empty",
"sDep",
"and",
"method",
"configurations",
"given",
"by",
"the",
"map",
"if",
"they",
"are",
"not",
"already",
"already",
"defined",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/security/BESecurityConfig.java#L294-L319 |
8,958 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/security/BESecurityConfig.java | BESecurityConfig.toStream | public void toStream(boolean skipNonOverrides, OutputStream out)
throws Exception {
PrintWriter writer = null;
try {
writer = new PrintWriter(new OutputStreamWriter(out, "UTF-8"));
write(skipNonOverrides, true, writer);
} finally {
try {
... | java | public void toStream(boolean skipNonOverrides, OutputStream out)
throws Exception {
PrintWriter writer = null;
try {
writer = new PrintWriter(new OutputStreamWriter(out, "UTF-8"));
write(skipNonOverrides, true, writer);
} finally {
try {
... | [
"public",
"void",
"toStream",
"(",
"boolean",
"skipNonOverrides",
",",
"OutputStream",
"out",
")",
"throws",
"Exception",
"{",
"PrintWriter",
"writer",
"=",
"null",
";",
"try",
"{",
"writer",
"=",
"new",
"PrintWriter",
"(",
"new",
"OutputStreamWriter",
"(",
"o... | Serialize to the given stream, closing it when finished. If
skipNonOverrides is true, any configuration whose values are all null
will not be written. | [
"Serialize",
"to",
"the",
"given",
"stream",
"closing",
"it",
"when",
"finished",
".",
"If",
"skipNonOverrides",
"is",
"true",
"any",
"configuration",
"whose",
"values",
"are",
"all",
"null",
"will",
"not",
"be",
"written",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/security/BESecurityConfig.java#L440-L456 |
8,959 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/security/BESecurityConfig.java | BESecurityConfig.write | public void write(boolean skipNonOverrides,
boolean withXMLDeclaration,
PrintWriter writer) {
final String indent = " ";
// header
if (withXMLDeclaration) {
writer.println("<?xml version=\"1.0\" encoding=\"UTF-8\... | java | public void write(boolean skipNonOverrides,
boolean withXMLDeclaration,
PrintWriter writer) {
final String indent = " ";
// header
if (withXMLDeclaration) {
writer.println("<?xml version=\"1.0\" encoding=\"UTF-8\... | [
"public",
"void",
"write",
"(",
"boolean",
"skipNonOverrides",
",",
"boolean",
"withXMLDeclaration",
",",
"PrintWriter",
"writer",
")",
"{",
"final",
"String",
"indent",
"=",
"\" \"",
";",
"// header",
"if",
"(",
"withXMLDeclaration",
")",
... | Serialize to the given writer, keeping it open when finished. If
skipNonOverrides is true, any configuration whose values are all null
will not be written. | [
"Serialize",
"to",
"the",
"given",
"writer",
"keeping",
"it",
"open",
"when",
"finished",
".",
"If",
"skipNonOverrides",
"is",
"true",
"any",
"configuration",
"whose",
"values",
"are",
"all",
"null",
"will",
"not",
"be",
"written",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/security/BESecurityConfig.java#L463-L517 |
8,960 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/ws/PEP.java | PEP.getHandler | private OperationHandler getHandler(String serviceName, String operationName) {
if (serviceName == null) {
if (logger.isDebugEnabled()) {
logger.debug("Service Name was null!");
}
return null;
}
if (operationName == null) {
if (lo... | java | private OperationHandler getHandler(String serviceName, String operationName) {
if (serviceName == null) {
if (logger.isDebugEnabled()) {
logger.debug("Service Name was null!");
}
return null;
}
if (operationName == null) {
if (lo... | [
"private",
"OperationHandler",
"getHandler",
"(",
"String",
"serviceName",
",",
"String",
"operationName",
")",
"{",
"if",
"(",
"serviceName",
"==",
"null",
")",
"{",
"if",
"(",
"logger",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"logger",
".",
"debug",
"... | Function to try and obtain a handler using the name of the current SOAP
service and operation.
@param opName
the name of the operation
@return OperationHandler to handle the operation | [
"Function",
"to",
"try",
"and",
"obtain",
"a",
"handler",
"using",
"the",
"name",
"of",
"the",
"current",
"SOAP",
"service",
"and",
"operation",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/ws/PEP.java#L196-L232 |
8,961 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/ws/PEP.java | PEP.enforce | private void enforce(ResponseCtx res) {
@SuppressWarnings("unchecked")
Set<Result> results = res.getResults();
for (Result r : results) {
if (r.getDecision() != Result.DECISION_PERMIT) {
if (logger.isDebugEnabled()) {
logger.debug("Denying access: ... | java | private void enforce(ResponseCtx res) {
@SuppressWarnings("unchecked")
Set<Result> results = res.getResults();
for (Result r : results) {
if (r.getDecision() != Result.DECISION_PERMIT) {
if (logger.isDebugEnabled()) {
logger.debug("Denying access: ... | [
"private",
"void",
"enforce",
"(",
"ResponseCtx",
"res",
")",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"Set",
"<",
"Result",
">",
"results",
"=",
"res",
".",
"getResults",
"(",
")",
";",
"for",
"(",
"Result",
"r",
":",
"results",
")",
"... | Method to check a response and enforce any denial. This is achieved by
throwing an SoapFault.
@param res
the ResponseCtx | [
"Method",
"to",
"check",
"a",
"response",
"and",
"enforce",
"any",
"denial",
".",
"This",
"is",
"achieved",
"by",
"throwing",
"an",
"SoapFault",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/ws/PEP.java#L241-L267 |
8,962 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java | ContextUtil.setupResources | public List<Attribute> setupResources(Map<URI, AttributeValue> res, RelationshipResolver relationshipResolver)
throws MelcoeXacmlException {
if (res == null || res.size() == 0) {
return new ArrayList<Attribute>();
}
List<Attribute> attributes = new ArrayList<Attribute>(... | java | public List<Attribute> setupResources(Map<URI, AttributeValue> res, RelationshipResolver relationshipResolver)
throws MelcoeXacmlException {
if (res == null || res.size() == 0) {
return new ArrayList<Attribute>();
}
List<Attribute> attributes = new ArrayList<Attribute>(... | [
"public",
"List",
"<",
"Attribute",
">",
"setupResources",
"(",
"Map",
"<",
"URI",
",",
"AttributeValue",
">",
"res",
",",
"RelationshipResolver",
"relationshipResolver",
")",
"throws",
"MelcoeXacmlException",
"{",
"if",
"(",
"res",
"==",
"null",
"||",
"res",
... | Creates a Resource specifying the resource-id, a required attribute.
@return a Set of Attributes for inclusion in a Request | [
"Creates",
"a",
"Resource",
"specifying",
"the",
"resource",
"-",
"id",
"a",
"required",
"attribute",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java#L137-L174 |
8,963 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java | ContextUtil.setupAction | public List<Attribute> setupAction(Map<URI, AttributeValue> a) {
if (a == null || a.size() == 0) {
return Collections.emptyList();
}
List<Attribute> actions = new ArrayList<Attribute>(a.size());
Map<URI, AttributeValue> newActions =
new HashMap<URI, Attribut... | java | public List<Attribute> setupAction(Map<URI, AttributeValue> a) {
if (a == null || a.size() == 0) {
return Collections.emptyList();
}
List<Attribute> actions = new ArrayList<Attribute>(a.size());
Map<URI, AttributeValue> newActions =
new HashMap<URI, Attribut... | [
"public",
"List",
"<",
"Attribute",
">",
"setupAction",
"(",
"Map",
"<",
"URI",
",",
"AttributeValue",
">",
"a",
")",
"{",
"if",
"(",
"a",
"==",
"null",
"||",
"a",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"return",
"Collections",
".",
"emptyList... | Creates an Action specifying the action-id, an optional attribute.
@return a Set of Attributes for inclusion in a Request | [
"Creates",
"an",
"Action",
"specifying",
"the",
"action",
"-",
"id",
"an",
"optional",
"attribute",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java#L181-L215 |
8,964 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java | ContextUtil.setupEnvironment | public List<Attribute> setupEnvironment(Map<URI, AttributeValue> e) {
if (e == null || e.size() == 0) {
return Collections.emptyList();
}
List<Attribute> environment = new ArrayList<Attribute>(e.size());
for (URI uri : e.keySet()) {
environment.add(new Singleton... | java | public List<Attribute> setupEnvironment(Map<URI, AttributeValue> e) {
if (e == null || e.size() == 0) {
return Collections.emptyList();
}
List<Attribute> environment = new ArrayList<Attribute>(e.size());
for (URI uri : e.keySet()) {
environment.add(new Singleton... | [
"public",
"List",
"<",
"Attribute",
">",
"setupEnvironment",
"(",
"Map",
"<",
"URI",
",",
"AttributeValue",
">",
"e",
")",
"{",
"if",
"(",
"e",
"==",
"null",
"||",
"e",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"return",
"Collections",
".",
"empt... | Creates the Environment attributes.
@return a Set of Attributes for inclusion in a Request | [
"Creates",
"the",
"Environment",
"attributes",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java#L222-L234 |
8,965 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java | ContextUtil.buildRequest | public RequestCtx buildRequest(List<Map<URI, List<AttributeValue>>> subjects,
Map<URI, AttributeValue> actions,
Map<URI, AttributeValue> resources,
Map<URI, AttributeValue> environment,
... | java | public RequestCtx buildRequest(List<Map<URI, List<AttributeValue>>> subjects,
Map<URI, AttributeValue> actions,
Map<URI, AttributeValue> resources,
Map<URI, AttributeValue> environment,
... | [
"public",
"RequestCtx",
"buildRequest",
"(",
"List",
"<",
"Map",
"<",
"URI",
",",
"List",
"<",
"AttributeValue",
">",
">",
">",
"subjects",
",",
"Map",
"<",
"URI",
",",
"AttributeValue",
">",
"actions",
",",
"Map",
"<",
"URI",
",",
"AttributeValue",
">",... | Constructs a RequestCtx object.
@param subjects
list of Subjects
@param actions
list of Action attributes
@param resources
list of resource Attributes
@param environment
list of environment Attributes
@return the RequestCtx object
@throws MelcoeXacmlException | [
"Constructs",
"a",
"RequestCtx",
"object",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java#L250-L275 |
8,966 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java | ContextUtil.makeResponseCtx | public ResponseCtx makeResponseCtx(String response)
throws MelcoeXacmlException {
ResponseCtx resCtx = null;
try {
ByteArrayInputStream is =
new ByteArrayInputStream(response.getBytes());
resCtx = ResponseCtx.getInstance(is);
} catch (Parsi... | java | public ResponseCtx makeResponseCtx(String response)
throws MelcoeXacmlException {
ResponseCtx resCtx = null;
try {
ByteArrayInputStream is =
new ByteArrayInputStream(response.getBytes());
resCtx = ResponseCtx.getInstance(is);
} catch (Parsi... | [
"public",
"ResponseCtx",
"makeResponseCtx",
"(",
"String",
"response",
")",
"throws",
"MelcoeXacmlException",
"{",
"ResponseCtx",
"resCtx",
"=",
"null",
";",
"try",
"{",
"ByteArrayInputStream",
"is",
"=",
"new",
"ByteArrayInputStream",
"(",
"response",
".",
"getByte... | Converts a string based response to a ResponseCtx obejct.
@param response
the string response
@return the ResponseCtx object
@throws MelcoeXacmlException | [
"Converts",
"a",
"string",
"based",
"response",
"to",
"a",
"ResponseCtx",
"obejct",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java#L285-L296 |
8,967 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java | ContextUtil.makeRequestCtx | public RequestCtx makeRequestCtx(String request)
throws MelcoeXacmlException {
RequestCtx reqCtx = null;
try {
ByteArrayInputStream is =
new ByteArrayInputStream(request.getBytes());
reqCtx = BasicRequestCtx.getInstance(is);
} catch (Parsin... | java | public RequestCtx makeRequestCtx(String request)
throws MelcoeXacmlException {
RequestCtx reqCtx = null;
try {
ByteArrayInputStream is =
new ByteArrayInputStream(request.getBytes());
reqCtx = BasicRequestCtx.getInstance(is);
} catch (Parsin... | [
"public",
"RequestCtx",
"makeRequestCtx",
"(",
"String",
"request",
")",
"throws",
"MelcoeXacmlException",
"{",
"RequestCtx",
"reqCtx",
"=",
"null",
";",
"try",
"{",
"ByteArrayInputStream",
"is",
"=",
"new",
"ByteArrayInputStream",
"(",
"request",
".",
"getBytes",
... | Converts a string based request to a RequestCtx obejct.
@param request
the string request
@return the RequestCtx object
@throws MelcoeXacmlException | [
"Converts",
"a",
"string",
"based",
"request",
"to",
"a",
"RequestCtx",
"obejct",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java#L306-L317 |
8,968 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java | ContextUtil.makeRequestCtx | public String makeRequestCtx(RequestCtx reqCtx) {
ByteArrayOutputStream request = new ByteArrayOutputStream();
reqCtx.encode(request, new Indenter());
return new String(request.toByteArray());
} | java | public String makeRequestCtx(RequestCtx reqCtx) {
ByteArrayOutputStream request = new ByteArrayOutputStream();
reqCtx.encode(request, new Indenter());
return new String(request.toByteArray());
} | [
"public",
"String",
"makeRequestCtx",
"(",
"RequestCtx",
"reqCtx",
")",
"{",
"ByteArrayOutputStream",
"request",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"reqCtx",
".",
"encode",
"(",
"request",
",",
"new",
"Indenter",
"(",
")",
")",
";",
"return",
... | Converts a RequestCtx object to its string representation.
@param reqCtx
the RequestCtx object
@return the String representation of the RequestCtx object | [
"Converts",
"a",
"RequestCtx",
"object",
"to",
"its",
"string",
"representation",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java#L326-L330 |
8,969 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java | ContextUtil.makeResponseCtx | public String makeResponseCtx(ResponseCtx resCtx) {
ByteArrayOutputStream response = new ByteArrayOutputStream();
resCtx.encode(response, new Indenter());
return new String(response.toByteArray());
} | java | public String makeResponseCtx(ResponseCtx resCtx) {
ByteArrayOutputStream response = new ByteArrayOutputStream();
resCtx.encode(response, new Indenter());
return new String(response.toByteArray());
} | [
"public",
"String",
"makeResponseCtx",
"(",
"ResponseCtx",
"resCtx",
")",
"{",
"ByteArrayOutputStream",
"response",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"resCtx",
".",
"encode",
"(",
"response",
",",
"new",
"Indenter",
"(",
")",
")",
";",
"retur... | Converst a ResponseCtx object to its string representation.
@param resCtx
the ResponseCtx object
@return the String representation of the ResponseCtx object | [
"Converst",
"a",
"ResponseCtx",
"object",
"to",
"its",
"string",
"representation",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java#L339-L343 |
8,970 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java | ContextUtil.makeResultMap | public Map<String, Result> makeResultMap(ResponseCtx resCtx) {
@SuppressWarnings("unchecked")
Iterator<Result> i = resCtx.getResults().iterator();
Map<String, Result> resultMap = new HashMap<String, Result>();
while (i.hasNext()) {
Result r = i.next();
resultMap... | java | public Map<String, Result> makeResultMap(ResponseCtx resCtx) {
@SuppressWarnings("unchecked")
Iterator<Result> i = resCtx.getResults().iterator();
Map<String, Result> resultMap = new HashMap<String, Result>();
while (i.hasNext()) {
Result r = i.next();
resultMap... | [
"public",
"Map",
"<",
"String",
",",
"Result",
">",
"makeResultMap",
"(",
"ResponseCtx",
"resCtx",
")",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"Iterator",
"<",
"Result",
">",
"i",
"=",
"resCtx",
".",
"getResults",
"(",
")",
".",
"iterator... | Returns a map of resource-id, result based on an XACML response.
@param resCtx
the XACML response
@return the Map of resource-id and result | [
"Returns",
"a",
"map",
"of",
"resource",
"-",
"id",
"result",
"based",
"on",
"an",
"XACML",
"response",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java#L352-L364 |
8,971 | fcrepo3/fcrepo | fcrepo-installer/src/main/java/org/fcrepo/utilities/install/InstallOptions.java | InstallOptions.inputOption | private void inputOption(String optionId)
throws InstallationCancelledException {
OptionDefinition opt = OptionDefinition.get(optionId, this);
if (opt.getLabel() == null || opt.getLabel().length() == 0) {
throw new InstallationCancelledException(optionId
+ "... | java | private void inputOption(String optionId)
throws InstallationCancelledException {
OptionDefinition opt = OptionDefinition.get(optionId, this);
if (opt.getLabel() == null || opt.getLabel().length() == 0) {
throw new InstallationCancelledException(optionId
+ "... | [
"private",
"void",
"inputOption",
"(",
"String",
"optionId",
")",
"throws",
"InstallationCancelledException",
"{",
"OptionDefinition",
"opt",
"=",
"OptionDefinition",
".",
"get",
"(",
"optionId",
",",
"this",
")",
";",
"if",
"(",
"opt",
".",
"getLabel",
"(",
"... | Get the indicated option from the console. Continue prompting until the
value is valid, or the user has indicated they want to cancel the
installation. | [
"Get",
"the",
"indicated",
"option",
"from",
"the",
"console",
".",
"Continue",
"prompting",
"until",
"the",
"value",
"is",
"valid",
"or",
"the",
"user",
"has",
"indicated",
"they",
"want",
"to",
"cancel",
"the",
"installation",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-installer/src/main/java/org/fcrepo/utilities/install/InstallOptions.java#L303-L363 |
8,972 | fcrepo3/fcrepo | fcrepo-installer/src/main/java/org/fcrepo/utilities/install/InstallOptions.java | InstallOptions.getIntValue | public int getIntValue(String name, int defaultValue)
throws NumberFormatException {
String value = getValue(name);
if (value == null) {
return defaultValue;
} else {
return Integer.parseInt(value);
}
} | java | public int getIntValue(String name, int defaultValue)
throws NumberFormatException {
String value = getValue(name);
if (value == null) {
return defaultValue;
} else {
return Integer.parseInt(value);
}
} | [
"public",
"int",
"getIntValue",
"(",
"String",
"name",
",",
"int",
"defaultValue",
")",
"throws",
"NumberFormatException",
"{",
"String",
"value",
"=",
"getValue",
"(",
"name",
")",
";",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
"defaultValue",
... | Get the value of the given option as an integer, or the given default
value if unspecified.
@throws NumberFormatException
if the value is specified, but cannot be parsed as an integer. | [
"Get",
"the",
"value",
"of",
"the",
"given",
"option",
"as",
"an",
"integer",
"or",
"the",
"given",
"default",
"value",
"if",
"unspecified",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-installer/src/main/java/org/fcrepo/utilities/install/InstallOptions.java#L419-L429 |
8,973 | fcrepo3/fcrepo | fcrepo-installer/src/main/java/org/fcrepo/utilities/install/InstallOptions.java | InstallOptions.applyDefaults | private void applyDefaults() {
for (String name : getOptionNames()) {
String val = _map.get(name);
if (val == null || val.length() == 0) {
OptionDefinition opt = OptionDefinition.get(name, this);
_map.put(name, opt.getDefaultValue());
}
}
... | java | private void applyDefaults() {
for (String name : getOptionNames()) {
String val = _map.get(name);
if (val == null || val.length() == 0) {
OptionDefinition opt = OptionDefinition.get(name, this);
_map.put(name, opt.getDefaultValue());
}
}
... | [
"private",
"void",
"applyDefaults",
"(",
")",
"{",
"for",
"(",
"String",
"name",
":",
"getOptionNames",
"(",
")",
")",
"{",
"String",
"val",
"=",
"_map",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"val",
"==",
"null",
"||",
"val",
".",
"length",... | Apply defaults to the options, where possible. | [
"Apply",
"defaults",
"to",
"the",
"options",
"where",
"possible",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-installer/src/main/java/org/fcrepo/utilities/install/InstallOptions.java#L458-L466 |
8,974 | fcrepo3/fcrepo | fcrepo-installer/src/main/java/org/fcrepo/utilities/install/InstallOptions.java | InstallOptions.validateAll | private void validateAll() throws OptionValidationException {
boolean unattended = getBooleanValue(UNATTENDED, false);
for (String optionId : getOptionNames()) {
OptionDefinition opt = OptionDefinition.get(optionId, this);
if (opt == null) {
throw new OptionValida... | java | private void validateAll() throws OptionValidationException {
boolean unattended = getBooleanValue(UNATTENDED, false);
for (String optionId : getOptionNames()) {
OptionDefinition opt = OptionDefinition.get(optionId, this);
if (opt == null) {
throw new OptionValida... | [
"private",
"void",
"validateAll",
"(",
")",
"throws",
"OptionValidationException",
"{",
"boolean",
"unattended",
"=",
"getBooleanValue",
"(",
"UNATTENDED",
",",
"false",
")",
";",
"for",
"(",
"String",
"optionId",
":",
"getOptionNames",
"(",
")",
")",
"{",
"Op... | Validate the options, assuming defaults have already been applied.
Validation for a given option might entail more than a syntax check. It
might check whether a given directory exists, for example. | [
"Validate",
"the",
"options",
"assuming",
"defaults",
"have",
"already",
"been",
"applied",
".",
"Validation",
"for",
"a",
"given",
"option",
"might",
"entail",
"more",
"than",
"a",
"syntax",
"check",
".",
"It",
"might",
"check",
"whether",
"a",
"given",
"di... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-installer/src/main/java/org/fcrepo/utilities/install/InstallOptions.java#L474-L483 |
8,975 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/utilities/rebuild/SQLRebuilder.java | SQLRebuilder.getFedoraTables | private List<String> getFedoraTables() {
try {
InputStream in =
getClass().getClassLoader()
.getResourceAsStream(DBSPEC_LOCATION);
List<TableSpec> specs = TableSpec.getTableSpecs(in);
ArrayList<String> names = new ArrayList<Stri... | java | private List<String> getFedoraTables() {
try {
InputStream in =
getClass().getClassLoader()
.getResourceAsStream(DBSPEC_LOCATION);
List<TableSpec> specs = TableSpec.getTableSpecs(in);
ArrayList<String> names = new ArrayList<Stri... | [
"private",
"List",
"<",
"String",
">",
"getFedoraTables",
"(",
")",
"{",
"try",
"{",
"InputStream",
"in",
"=",
"getClass",
"(",
")",
".",
"getClassLoader",
"(",
")",
".",
"getResourceAsStream",
"(",
"DBSPEC_LOCATION",
")",
";",
"List",
"<",
"TableSpec",
">... | Get the names of all Fedora tables listed in the server's dbSpec file.
Names will be returned in ALL CAPS so that case-insensitive comparisons
can be done. | [
"Get",
"the",
"names",
"of",
"all",
"Fedora",
"tables",
"listed",
"in",
"the",
"server",
"s",
"dbSpec",
"file",
".",
"Names",
"will",
"be",
"returned",
"in",
"ALL",
"CAPS",
"so",
"that",
"case",
"-",
"insensitive",
"comparisons",
"can",
"be",
"done",
"."... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/utilities/rebuild/SQLRebuilder.java#L296-L312 |
8,976 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/utilities/rebuild/SQLRebuilder.java | SQLRebuilder.registerObject | private void registerObject(DigitalObject obj)
throws StorageDeviceException {
String pid = obj.getPid();
String userId = "the userID field is no longer used";
String label = "the label field is no longer used";
Connection conn = null;
PreparedStatement s1 = null;
... | java | private void registerObject(DigitalObject obj)
throws StorageDeviceException {
String pid = obj.getPid();
String userId = "the userID field is no longer used";
String label = "the label field is no longer used";
Connection conn = null;
PreparedStatement s1 = null;
... | [
"private",
"void",
"registerObject",
"(",
"DigitalObject",
"obj",
")",
"throws",
"StorageDeviceException",
"{",
"String",
"pid",
"=",
"obj",
".",
"getPid",
"(",
")",
";",
"String",
"userId",
"=",
"\"the userID field is no longer used\"",
";",
"String",
"label",
"=... | Adds a new object. | [
"Adds",
"a",
"new",
"object",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/utilities/rebuild/SQLRebuilder.java#L421-L505 |
8,977 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multifile/MultiFileJournalWriter.java | MultiFileJournalWriter.checkForPotentialFilenameConflict | private void checkForPotentialFilenameConflict() throws JournalException {
File[] journalFiles =
MultiFileJournalHelper
.getSortedArrayOfJournalFiles(journalDirectory,
filenamePrefix);
if (journalFiles.length =... | java | private void checkForPotentialFilenameConflict() throws JournalException {
File[] journalFiles =
MultiFileJournalHelper
.getSortedArrayOfJournalFiles(journalDirectory,
filenamePrefix);
if (journalFiles.length =... | [
"private",
"void",
"checkForPotentialFilenameConflict",
"(",
")",
"throws",
"JournalException",
"{",
"File",
"[",
"]",
"journalFiles",
"=",
"MultiFileJournalHelper",
".",
"getSortedArrayOfJournalFiles",
"(",
"journalDirectory",
",",
"filenamePrefix",
")",
";",
"if",
"("... | Look at the list of files in the current directory, and make sure that
any new files we create won't conflict with them. | [
"Look",
"at",
"the",
"list",
"of",
"files",
"in",
"the",
"current",
"directory",
"and",
"make",
"sure",
"that",
"any",
"new",
"files",
"we",
"create",
"won",
"t",
"conflict",
"with",
"them",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multifile/MultiFileJournalWriter.java#L75-L95 |
8,978 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multifile/MultiFileJournalWriter.java | MultiFileJournalWriter.writeJournalEntry | @Override
public void writeJournalEntry(CreatorJournalEntry journalEntry)
throws JournalException {
if (open) {
try {
synchronized (JournalWriter.SYNCHRONIZER) {
XMLEventWriter xmlWriter = currentJournal.getXmlWriter();
super.wr... | java | @Override
public void writeJournalEntry(CreatorJournalEntry journalEntry)
throws JournalException {
if (open) {
try {
synchronized (JournalWriter.SYNCHRONIZER) {
XMLEventWriter xmlWriter = currentJournal.getXmlWriter();
super.wr... | [
"@",
"Override",
"public",
"void",
"writeJournalEntry",
"(",
"CreatorJournalEntry",
"journalEntry",
")",
"throws",
"JournalException",
"{",
"if",
"(",
"open",
")",
"{",
"try",
"{",
"synchronized",
"(",
"JournalWriter",
".",
"SYNCHRONIZER",
")",
"{",
"XMLEventWrite... | We've prepared for the entry, so just write it, but remember to
synchronize on the file, so we don't get an asynchronous close while
we're writing. After writing the entry, flush the file. | [
"We",
"ve",
"prepared",
"for",
"the",
"entry",
"so",
"just",
"write",
"it",
"but",
"remember",
"to",
"synchronize",
"on",
"the",
"file",
"so",
"we",
"don",
"t",
"get",
"an",
"asynchronous",
"close",
"while",
"we",
"re",
"writing",
".",
"After",
"writing"... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multifile/MultiFileJournalWriter.java#L122-L137 |
8,979 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/ws/operations/AbstractOperationHandler.java | AbstractOperationHandler.getSOAPRequestObjects | protected Object getSOAPRequestObjects(SOAPMessageContext context) {
// Obtain the operation details and message type
// Extract the SOAP Message
SOAPElement requestNode = getSOAPRequestNode(context);
return unmarshall(requestNode);
} | java | protected Object getSOAPRequestObjects(SOAPMessageContext context) {
// Obtain the operation details and message type
// Extract the SOAP Message
SOAPElement requestNode = getSOAPRequestNode(context);
return unmarshall(requestNode);
} | [
"protected",
"Object",
"getSOAPRequestObjects",
"(",
"SOAPMessageContext",
"context",
")",
"{",
"// Obtain the operation details and message type",
"// Extract the SOAP Message",
"SOAPElement",
"requestNode",
"=",
"getSOAPRequestNode",
"(",
"context",
")",
";",
"return",
"unmar... | Extracts the request as object from the context.
@param context
the message context.
@return Object
@throws SoapFault | [
"Extracts",
"the",
"request",
"as",
"object",
"from",
"the",
"context",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/ws/operations/AbstractOperationHandler.java#L89-L94 |
8,980 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/ws/operations/AbstractOperationHandler.java | AbstractOperationHandler.setSOAPRequestObjects | protected void setSOAPRequestObjects(SOAPMessageContext context,
List<SOAPElement> params) {
// Extract the SOAP Message
SOAPMessage message = context.getMessage();
// Get the envelope body
SOAPBody body;
try {
body = message.... | java | protected void setSOAPRequestObjects(SOAPMessageContext context,
List<SOAPElement> params) {
// Extract the SOAP Message
SOAPMessage message = context.getMessage();
// Get the envelope body
SOAPBody body;
try {
body = message.... | [
"protected",
"void",
"setSOAPRequestObjects",
"(",
"SOAPMessageContext",
"context",
",",
"List",
"<",
"SOAPElement",
">",
"params",
")",
"{",
"// Extract the SOAP Message",
"SOAPMessage",
"message",
"=",
"context",
".",
"getMessage",
"(",
")",
";",
"// Get the envelop... | Sets the request parameters for a request.
@param context
the message context
@param params
list of parameters to set in order
@throws SoapFault | [
"Sets",
"the",
"request",
"parameters",
"for",
"a",
"request",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/ws/operations/AbstractOperationHandler.java#L188-L210 |
8,981 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/ws/operations/AbstractOperationHandler.java | AbstractOperationHandler.setSOAPResponseObject | protected void setSOAPResponseObject(SOAPMessageContext context,
Object newResponse) {
if (newResponse == null) {
return;
}
// Extract the SOAP Message
SOAPMessage message = context.getMessage();
// Get the envelope body
... | java | protected void setSOAPResponseObject(SOAPMessageContext context,
Object newResponse) {
if (newResponse == null) {
return;
}
// Extract the SOAP Message
SOAPMessage message = context.getMessage();
// Get the envelope body
... | [
"protected",
"void",
"setSOAPResponseObject",
"(",
"SOAPMessageContext",
"context",
",",
"Object",
"newResponse",
")",
"{",
"if",
"(",
"newResponse",
"==",
"null",
")",
"{",
"return",
";",
"}",
"// Extract the SOAP Message",
"SOAPMessage",
"message",
"=",
"context",... | Sets the return object for a response as the param.
@param context
the message context
@param newResponse
the object to set as the return object
@throws SoapFault | [
"Sets",
"the",
"return",
"object",
"for",
"a",
"response",
"as",
"the",
"param",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/ws/operations/AbstractOperationHandler.java#L221-L240 |
8,982 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/ws/operations/AbstractOperationHandler.java | AbstractOperationHandler.getSubjects | protected List<Map<URI, List<AttributeValue>>> getSubjects(SOAPMessageContext context) {
// setup the id and value for the requesting subject
List<Map<URI, List<AttributeValue>>> subjects =
new ArrayList<Map<URI, List<AttributeValue>>>();
if (getUser(context) == null
... | java | protected List<Map<URI, List<AttributeValue>>> getSubjects(SOAPMessageContext context) {
// setup the id and value for the requesting subject
List<Map<URI, List<AttributeValue>>> subjects =
new ArrayList<Map<URI, List<AttributeValue>>>();
if (getUser(context) == null
... | [
"protected",
"List",
"<",
"Map",
"<",
"URI",
",",
"List",
"<",
"AttributeValue",
">",
">",
">",
"getSubjects",
"(",
"SOAPMessageContext",
"context",
")",
"{",
"// setup the id and value for the requesting subject",
"List",
"<",
"Map",
"<",
"URI",
",",
"List",
"<... | Extracts the list of Subjects from the given context.
@param context
the message context
@return a list of Subjects
@throws SoapFault | [
"Extracts",
"the",
"list",
"of",
"Subjects",
"from",
"the",
"given",
"context",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/ws/operations/AbstractOperationHandler.java#L250-L305 |
8,983 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/ws/operations/AbstractOperationHandler.java | AbstractOperationHandler.getResources | protected Map<URI, AttributeValue> getResources(SOAPMessageContext context) throws OperationHandlerException, URISyntaxException {
Object oMap = null;
String pid = null;
try {
oMap = getSOAPRequestObjects(context);
logger.debug("Retrieved SOAP Request Objects");
... | java | protected Map<URI, AttributeValue> getResources(SOAPMessageContext context) throws OperationHandlerException, URISyntaxException {
Object oMap = null;
String pid = null;
try {
oMap = getSOAPRequestObjects(context);
logger.debug("Retrieved SOAP Request Objects");
... | [
"protected",
"Map",
"<",
"URI",
",",
"AttributeValue",
">",
"getResources",
"(",
"SOAPMessageContext",
"context",
")",
"throws",
"OperationHandlerException",
",",
"URISyntaxException",
"{",
"Object",
"oMap",
"=",
"null",
";",
"String",
"pid",
"=",
"null",
";",
"... | Obtains a map of resource Attributes.
@param context
the message context
@return map of resource Attributes
@throws OperationHandlerException
@throws URISyntaxException | [
"Obtains",
"a",
"map",
"of",
"resource",
"Attributes",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/ws/operations/AbstractOperationHandler.java#L339-L362 |
8,984 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/ws/operations/AbstractOperationHandler.java | AbstractOperationHandler.getUserRoles | @SuppressWarnings("unchecked")
protected String[] getUserRoles(SOAPMessageContext context) {
HttpServletRequest request =
(HttpServletRequest) context
.get(SOAPMessageContext.SERVLET_REQUEST);
Map<String, Set<String>> reqAttr = null;
reqAttr =
... | java | @SuppressWarnings("unchecked")
protected String[] getUserRoles(SOAPMessageContext context) {
HttpServletRequest request =
(HttpServletRequest) context
.get(SOAPMessageContext.SERVLET_REQUEST);
Map<String, Set<String>> reqAttr = null;
reqAttr =
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"String",
"[",
"]",
"getUserRoles",
"(",
"SOAPMessageContext",
"context",
")",
"{",
"HttpServletRequest",
"request",
"=",
"(",
"HttpServletRequest",
")",
"context",
".",
"get",
"(",
"SOAPMessageContext... | Returns the roles that the user has.
@param context
the message context
@return a String array of roles | [
"Returns",
"the",
"roles",
"that",
"the",
"user",
"has",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/ws/operations/AbstractOperationHandler.java#L377-L401 |
8,985 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/storage/types/DatastreamReferencedContent.java | DatastreamReferencedContent.getExternalContentManager | private ExternalContentManager getExternalContentManager()
throws Exception {
if (s_ecm == null) {
Server server;
try {
server = Server.getInstance(new File(Constants.FEDORA_HOME),
false);
s_ecm = (ExternalContentManager... | java | private ExternalContentManager getExternalContentManager()
throws Exception {
if (s_ecm == null) {
Server server;
try {
server = Server.getInstance(new File(Constants.FEDORA_HOME),
false);
s_ecm = (ExternalContentManager... | [
"private",
"ExternalContentManager",
"getExternalContentManager",
"(",
")",
"throws",
"Exception",
"{",
"if",
"(",
"s_ecm",
"==",
"null",
")",
"{",
"Server",
"server",
";",
"try",
"{",
"server",
"=",
"Server",
".",
"getInstance",
"(",
"new",
"File",
"(",
"Co... | Gets the external content manager which is used for the retrieval of
content.
@return an instance of <code>ExternalContentManager</code>
@throws Exception is thrown in case the server is not able to find the module. | [
"Gets",
"the",
"external",
"content",
"manager",
"which",
"is",
"used",
"for",
"the",
"retrieval",
"of",
"content",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/types/DatastreamReferencedContent.java#L49-L65 |
8,986 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/storage/types/DatastreamReferencedContent.java | DatastreamReferencedContent.getContentStream | @Override
public InputStream getContentStream(Context context) throws StreamIOException {
try {
ContentManagerParams params = new ContentManagerParams(DSLocation);
if (context != null ) {
params.setContext(context);
}
MIMETypedStream stream = g... | java | @Override
public InputStream getContentStream(Context context) throws StreamIOException {
try {
ContentManagerParams params = new ContentManagerParams(DSLocation);
if (context != null ) {
params.setContext(context);
}
MIMETypedStream stream = g... | [
"@",
"Override",
"public",
"InputStream",
"getContentStream",
"(",
"Context",
"context",
")",
"throws",
"StreamIOException",
"{",
"try",
"{",
"ContentManagerParams",
"params",
"=",
"new",
"ContentManagerParams",
"(",
"DSLocation",
")",
";",
"if",
"(",
"context",
"... | Gets an InputStream to the content of this externally-referenced
datastream.
<p>The DSLocation of this datastream must be non-null before invoking
this method.
<p>If successful, the DSMIME type is automatically set based on the web
server's response header. If the web server doesn't send a valid
Content-type: header,... | [
"Gets",
"an",
"InputStream",
"to",
"the",
"content",
"of",
"this",
"externally",
"-",
"referenced",
"datastream",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/types/DatastreamReferencedContent.java#L84-L98 |
8,987 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/storage/types/DatastreamReferencedContent.java | DatastreamReferencedContent.getContentLength | public long getContentLength(MIMETypedStream stream) {
long length = 0;
if (stream.header != null) {
for (int i = 0; i < stream.header.length; i++) {
if (stream.header[i].name != null
&& !stream.header[i].name.equalsIgnoreCase("")
... | java | public long getContentLength(MIMETypedStream stream) {
long length = 0;
if (stream.header != null) {
for (int i = 0; i < stream.header.length; i++) {
if (stream.header[i].name != null
&& !stream.header[i].name.equalsIgnoreCase("")
... | [
"public",
"long",
"getContentLength",
"(",
"MIMETypedStream",
"stream",
")",
"{",
"long",
"length",
"=",
"0",
";",
"if",
"(",
"stream",
".",
"header",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"stream",
".",
"header",
... | Returns the length of the content of this stream.
@param stream the MIMETypedStream
@return length the length of the content | [
"Returns",
"the",
"length",
"of",
"the",
"content",
"of",
"this",
"stream",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/types/DatastreamReferencedContent.java#L105-L118 |
8,988 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/utilities/CleanupContextListener.java | CleanupContextListener.contextDestroyed | @Override
public void contextDestroyed(ServletContextEvent event) {
// deregister database drivers
try {
for (Enumeration<Driver> e = DriverManager.getDrivers(); e
.hasMoreElements();) {
Driver driver = e.nextElement();
if (driver.getCl... | java | @Override
public void contextDestroyed(ServletContextEvent event) {
// deregister database drivers
try {
for (Enumeration<Driver> e = DriverManager.getDrivers(); e
.hasMoreElements();) {
Driver driver = e.nextElement();
if (driver.getCl... | [
"@",
"Override",
"public",
"void",
"contextDestroyed",
"(",
"ServletContextEvent",
"event",
")",
"{",
"// deregister database drivers",
"try",
"{",
"for",
"(",
"Enumeration",
"<",
"Driver",
">",
"e",
"=",
"DriverManager",
".",
"getDrivers",
"(",
")",
";",
"e",
... | Clean up resources used by the application when stopped
@see javax.servlet.ServletContextListener#contextDestroyed(javax.servlet
.ServletContextEvent) | [
"Clean",
"up",
"resources",
"used",
"by",
"the",
"application",
"when",
"stopped"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/utilities/CleanupContextListener.java#L58-L76 |
8,989 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/storage/service/WSDLParser.java | WSDLParser.checkForUnsupportedPattern | private void checkForUnsupportedPattern(String namespaceURI,
String localName,
String qName,
Attributes attrs)
throws SAXException {
// Elements in XML schema definitio... | java | private void checkForUnsupportedPattern(String namespaceURI,
String localName,
String qName,
Attributes attrs)
throws SAXException {
// Elements in XML schema definitio... | [
"private",
"void",
"checkForUnsupportedPattern",
"(",
"String",
"namespaceURI",
",",
"String",
"localName",
",",
"String",
"qName",
",",
"Attributes",
"attrs",
")",
"throws",
"SAXException",
"{",
"// Elements in XML schema definitions (within WSDL types)",
"if",
"(",
"nam... | we might encounter! | [
"we",
"might",
"encounter!"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/service/WSDLParser.java#L745-L797 |
8,990 | fcrepo3/fcrepo | fcrepo-webapp/fcrepo-webapp-imagemanip/src/main/java/org/fcrepo/localservices/imagemanip/ImageManipulation.java | ImageManipulation.resize | private ImageProcessor resize(ImageProcessor ip, String newWidth) {
if (newWidth != null) {
try {
int width = Integer.parseInt(newWidth);
if (width < 0) {
return ip;
}
int imgWidth = ip.getWidth();
... | java | private ImageProcessor resize(ImageProcessor ip, String newWidth) {
if (newWidth != null) {
try {
int width = Integer.parseInt(newWidth);
if (width < 0) {
return ip;
}
int imgWidth = ip.getWidth();
... | [
"private",
"ImageProcessor",
"resize",
"(",
"ImageProcessor",
"ip",
",",
"String",
"newWidth",
")",
"{",
"if",
"(",
"newWidth",
"!=",
"null",
")",
"{",
"try",
"{",
"int",
"width",
"=",
"Integer",
".",
"parseInt",
"(",
"newWidth",
")",
";",
"if",
"(",
"... | Resizes an image to the supplied new width in pixels. The height is
reduced proportionally to the new width.
@param ip
The image to resize newWidth The width in pixels to resize the
image to
@return The image resized | [
"Resizes",
"an",
"image",
"to",
"the",
"supplied",
"new",
"width",
"in",
"pixels",
".",
"The",
"height",
"is",
"reduced",
"proportionally",
"to",
"the",
"new",
"width",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-webapp/fcrepo-webapp-imagemanip/src/main/java/org/fcrepo/localservices/imagemanip/ImageManipulation.java#L374-L395 |
8,991 | fcrepo3/fcrepo | fcrepo-webapp/fcrepo-webapp-imagemanip/src/main/java/org/fcrepo/localservices/imagemanip/ImageManipulation.java | ImageManipulation.zoom | private ImageProcessor zoom(ImageProcessor ip, String zoomAmt) {
if (zoomAmt != null) {
try {
float zoom = Float.parseFloat(zoomAmt);
if (zoom < 0) {
return ip;
}
ip.scale(zoom, zoom);
// if the im... | java | private ImageProcessor zoom(ImageProcessor ip, String zoomAmt) {
if (zoomAmt != null) {
try {
float zoom = Float.parseFloat(zoomAmt);
if (zoom < 0) {
return ip;
}
ip.scale(zoom, zoom);
// if the im... | [
"private",
"ImageProcessor",
"zoom",
"(",
"ImageProcessor",
"ip",
",",
"String",
"zoomAmt",
")",
"{",
"if",
"(",
"zoomAmt",
"!=",
"null",
")",
"{",
"try",
"{",
"float",
"zoom",
"=",
"Float",
".",
"parseFloat",
"(",
"zoomAmt",
")",
";",
"if",
"(",
"zoom... | Zooms either in or out of an image by a supplied amount. The zooming
occurs from the center of the image.
@param ip
The image to zoom zoomAmt The amount to zoom the image. 0 <
zoomAmt < 1 : zoom out 1 = zoomAmt : original image 1 < zoomAmt :
zoom in
@return The image zoomed | [
"Zooms",
"either",
"in",
"or",
"out",
"of",
"an",
"image",
"by",
"a",
"supplied",
"amount",
".",
"The",
"zooming",
"occurs",
"from",
"the",
"center",
"of",
"the",
"image",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-webapp/fcrepo-webapp-imagemanip/src/main/java/org/fcrepo/localservices/imagemanip/ImageManipulation.java#L407-L440 |
8,992 | fcrepo3/fcrepo | fcrepo-webapp/fcrepo-webapp-imagemanip/src/main/java/org/fcrepo/localservices/imagemanip/ImageManipulation.java | ImageManipulation.brightness | private ImageProcessor brightness(ImageProcessor ip, String brightAmt) {
if (brightAmt != null) {
try {
float bright = Float.parseFloat(brightAmt);
if (bright < 0) {
return ip;
}
ip.multiply(bright);
}... | java | private ImageProcessor brightness(ImageProcessor ip, String brightAmt) {
if (brightAmt != null) {
try {
float bright = Float.parseFloat(brightAmt);
if (bright < 0) {
return ip;
}
ip.multiply(bright);
}... | [
"private",
"ImageProcessor",
"brightness",
"(",
"ImageProcessor",
"ip",
",",
"String",
"brightAmt",
")",
"{",
"if",
"(",
"brightAmt",
"!=",
"null",
")",
"{",
"try",
"{",
"float",
"bright",
"=",
"Float",
".",
"parseFloat",
"(",
"brightAmt",
")",
";",
"if",
... | Adjusts the brightness of an image by a supplied amount.
@param ip
The image to adjust the brightness of brightAmt The amount to
adjust the brightness of the image by 0 <= brightAmt < 1 : darkens
image 1 = brightAmt : original image 1 < brightAmt : brightens
image
@return The image with brightness levels adjusted | [
"Adjusts",
"the",
"brightness",
"of",
"an",
"image",
"by",
"a",
"supplied",
"amount",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-webapp/fcrepo-webapp-imagemanip/src/main/java/org/fcrepo/localservices/imagemanip/ImageManipulation.java#L452-L472 |
8,993 | fcrepo3/fcrepo | fcrepo-webapp/fcrepo-webapp-imagemanip/src/main/java/org/fcrepo/localservices/imagemanip/ImageManipulation.java | ImageManipulation.crop | public ImageProcessor crop(ImageProcessor ip,
String cropX,
String cropY,
String cropWidth,
String cropHeight) {
if (cropX != null && cropY != null) {
try {
int... | java | public ImageProcessor crop(ImageProcessor ip,
String cropX,
String cropY,
String cropWidth,
String cropHeight) {
if (cropX != null && cropY != null) {
try {
int... | [
"public",
"ImageProcessor",
"crop",
"(",
"ImageProcessor",
"ip",
",",
"String",
"cropX",
",",
"String",
"cropY",
",",
"String",
"cropWidth",
",",
"String",
"cropHeight",
")",
"{",
"if",
"(",
"cropX",
"!=",
"null",
"&&",
"cropY",
"!=",
"null",
")",
"{",
"... | Crops an image with supplied starting point and ending point.
@param ip
The image to crop cropX The starting x position; x=0 corresponds
to left side of image cropY The starting y position; y=0
corresponds to top of image cropWidth The width of the crop,
starting from the above x cropHeight The height of the crop,
sta... | [
"Crops",
"an",
"image",
"with",
"supplied",
"starting",
"point",
"and",
"ending",
"point",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-webapp/fcrepo-webapp-imagemanip/src/main/java/org/fcrepo/localservices/imagemanip/ImageManipulation.java#L498-L540 |
8,994 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-messaging/src/main/java/org/fcrepo/client/messaging/JmsMessagingClient.java | JmsMessagingClient.start | public void start(boolean wait) throws MessagingException {
Thread connector = new JMSBrokerConnector();
connector.start();
if(wait) {
int maxWait = RETRY_INTERVAL * MAX_RETRIES;
int waitTime = 0;
while(!isConnected()) {
if(waitTime < maxWait)... | java | public void start(boolean wait) throws MessagingException {
Thread connector = new JMSBrokerConnector();
connector.start();
if(wait) {
int maxWait = RETRY_INTERVAL * MAX_RETRIES;
int waitTime = 0;
while(!isConnected()) {
if(waitTime < maxWait)... | [
"public",
"void",
"start",
"(",
"boolean",
"wait",
")",
"throws",
"MessagingException",
"{",
"Thread",
"connector",
"=",
"new",
"JMSBrokerConnector",
"(",
")",
";",
"connector",
".",
"start",
"(",
")",
";",
"if",
"(",
"wait",
")",
"{",
"int",
"maxWait",
... | Starts the MessagingClient. This method must be called
in order to receive messages.
@param wait Set to true to wait until the startup process
is complete before returning. Set to false to
allow for asynchronous startup. | [
"Starts",
"the",
"MessagingClient",
".",
"This",
"method",
"must",
"be",
"called",
"in",
"order",
"to",
"receive",
"messages",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-messaging/src/main/java/org/fcrepo/client/messaging/JmsMessagingClient.java#L228-L249 |
8,995 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-messaging/src/main/java/org/fcrepo/client/messaging/JmsMessagingClient.java | JmsMessagingClient.createDestinations | private void createDestinations() throws MessagingException {
try {
// Create Destinations based on properties
Enumeration<?> propertyNames = m_connectionProperties.keys();
while (propertyNames.hasMoreElements()) {
String propertyName = (String) propertyNames.... | java | private void createDestinations() throws MessagingException {
try {
// Create Destinations based on properties
Enumeration<?> propertyNames = m_connectionProperties.keys();
while (propertyNames.hasMoreElements()) {
String propertyName = (String) propertyNames.... | [
"private",
"void",
"createDestinations",
"(",
")",
"throws",
"MessagingException",
"{",
"try",
"{",
"// Create Destinations based on properties",
"Enumeration",
"<",
"?",
">",
"propertyNames",
"=",
"m_connectionProperties",
".",
"keys",
"(",
")",
";",
"while",
"(",
... | Creates topics and queues and starts listeners | [
"Creates",
"topics",
"and",
"queues",
"and",
"starts",
"listeners"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-messaging/src/main/java/org/fcrepo/client/messaging/JmsMessagingClient.java#L258-L304 |
8,996 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-messaging/src/main/java/org/fcrepo/client/messaging/JmsMessagingClient.java | JmsMessagingClient.stop | public void stop(boolean unsubscribe) throws MessagingException {
try {
if (unsubscribe) {
m_jmsManager.unsubscribeAllDurable();
}
m_jmsManager.close();
m_jmsManager = null;
m_connected = false;
} catch (MessagingException me) {... | java | public void stop(boolean unsubscribe) throws MessagingException {
try {
if (unsubscribe) {
m_jmsManager.unsubscribeAllDurable();
}
m_jmsManager.close();
m_jmsManager = null;
m_connected = false;
} catch (MessagingException me) {... | [
"public",
"void",
"stop",
"(",
"boolean",
"unsubscribe",
")",
"throws",
"MessagingException",
"{",
"try",
"{",
"if",
"(",
"unsubscribe",
")",
"{",
"m_jmsManager",
".",
"unsubscribeAllDurable",
"(",
")",
";",
"}",
"m_jmsManager",
".",
"close",
"(",
")",
";",
... | Stops the MessagingClient, shuts down connections. If the unsubscribe
parameter is set to true, all durable subscriptions will be removed.
@param unsubscribe | [
"Stops",
"the",
"MessagingClient",
"shuts",
"down",
"connections",
".",
"If",
"the",
"unsubscribe",
"parameter",
"is",
"set",
"to",
"true",
"all",
"durable",
"subscriptions",
"will",
"be",
"removed",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-messaging/src/main/java/org/fcrepo/client/messaging/JmsMessagingClient.java#L312-L326 |
8,997 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/management/DBPIDGenerator.java | DBPIDGenerator.upgradeIfNeeded | private void upgradeIfNeeded(File oldPidGenDir) throws IOException {
if (oldPidGenDir != null && oldPidGenDir.isDirectory()) {
String[] names = oldPidGenDir.list();
Arrays.sort(names);
if (names.length > 0) {
BufferedReader in =
new Buf... | java | private void upgradeIfNeeded(File oldPidGenDir) throws IOException {
if (oldPidGenDir != null && oldPidGenDir.isDirectory()) {
String[] names = oldPidGenDir.list();
Arrays.sort(names);
if (names.length > 0) {
BufferedReader in =
new Buf... | [
"private",
"void",
"upgradeIfNeeded",
"(",
"File",
"oldPidGenDir",
")",
"throws",
"IOException",
"{",
"if",
"(",
"oldPidGenDir",
"!=",
"null",
"&&",
"oldPidGenDir",
".",
"isDirectory",
"(",
")",
")",
"{",
"String",
"[",
"]",
"names",
"=",
"oldPidGenDir",
"."... | Read the highest value from the old pidGen directory if it exists, and
ensure it is never used. | [
"Read",
"the",
"highest",
"value",
"from",
"the",
"old",
"pidGen",
"directory",
"if",
"it",
"exists",
"and",
"ensure",
"it",
"is",
"never",
"used",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/management/DBPIDGenerator.java#L124-L146 |
8,998 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/management/DBPIDGenerator.java | DBPIDGenerator.generatePID | public synchronized PID generatePID(String namespace) throws IOException {
int i = getHighestID(namespace);
i++;
try {
m_lastPID = new PID(namespace + ":" + i);
} catch (MalformedPIDException e) {
throw new IOException(e.getMessage());
}
setHighe... | java | public synchronized PID generatePID(String namespace) throws IOException {
int i = getHighestID(namespace);
i++;
try {
m_lastPID = new PID(namespace + ":" + i);
} catch (MalformedPIDException e) {
throw new IOException(e.getMessage());
}
setHighe... | [
"public",
"synchronized",
"PID",
"generatePID",
"(",
"String",
"namespace",
")",
"throws",
"IOException",
"{",
"int",
"i",
"=",
"getHighestID",
"(",
"namespace",
")",
";",
"i",
"++",
";",
"try",
"{",
"m_lastPID",
"=",
"new",
"PID",
"(",
"namespace",
"+",
... | Generate a new pid that is guaranteed to be unique, within the given
namespace. | [
"Generate",
"a",
"new",
"pid",
"that",
"is",
"guaranteed",
"to",
"be",
"unique",
"within",
"the",
"given",
"namespace",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/management/DBPIDGenerator.java#L152-L165 |
8,999 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/management/DBPIDGenerator.java | DBPIDGenerator.neverGeneratePID | public synchronized void neverGeneratePID(String pid) throws IOException {
logger.debug("Never generating PID: {}", pid);
try {
PID p = new PID(pid);
String ns = p.getNamespaceId();
int id = Integer.parseInt(p.getObjectId());
if (id > getHighestID(ns)) {
... | java | public synchronized void neverGeneratePID(String pid) throws IOException {
logger.debug("Never generating PID: {}", pid);
try {
PID p = new PID(pid);
String ns = p.getNamespaceId();
int id = Integer.parseInt(p.getObjectId());
if (id > getHighestID(ns)) {
... | [
"public",
"synchronized",
"void",
"neverGeneratePID",
"(",
"String",
"pid",
")",
"throws",
"IOException",
"{",
"logger",
".",
"debug",
"(",
"\"Never generating PID: {}\"",
",",
"pid",
")",
";",
"try",
"{",
"PID",
"p",
"=",
"new",
"PID",
"(",
"pid",
")",
";... | Cause the given PID to never be generated by the PID generator. | [
"Cause",
"the",
"given",
"PID",
"to",
"never",
"be",
"generated",
"by",
"the",
"PID",
"generator",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/management/DBPIDGenerator.java#L177-L192 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.