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,800 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/storage/translation/handlers/METSContentHandler.java | METSContentHandler.setRDFAsDatastream | private void setRDFAsDatastream(StringBuffer buf) {
DatastreamXMLMetadata ds = new DatastreamXMLMetadata();
// set the attrs common to all datastream versions
ds.DatastreamID = "RELS-INT";
ds.DSVersionable = false;
ds.DSFormatURI = m_dsFormatURI;
ds.DatastreamAltIDs = m_... | java | private void setRDFAsDatastream(StringBuffer buf) {
DatastreamXMLMetadata ds = new DatastreamXMLMetadata();
// set the attrs common to all datastream versions
ds.DatastreamID = "RELS-INT";
ds.DSVersionable = false;
ds.DSFormatURI = m_dsFormatURI;
ds.DatastreamAltIDs = m_... | [
"private",
"void",
"setRDFAsDatastream",
"(",
"StringBuffer",
"buf",
")",
"{",
"DatastreamXMLMetadata",
"ds",
"=",
"new",
"DatastreamXMLMetadata",
"(",
")",
";",
"// set the attrs common to all datastream versions",
"ds",
".",
"DatastreamID",
"=",
"\"RELS-INT\"",
";",
"... | DMDID and ADMID relationships found in the METS file. | [
"DMDID",
"and",
"ADMID",
"relationships",
"found",
"in",
"the",
"METS",
"file",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/translation/handlers/METSContentHandler.java#L1124-L1155 |
8,801 | fcrepo3/fcrepo | fcrepo-installer/src/main/java/org/fcrepo/utilities/install/container/Tomcat5ServerXML.java | Tomcat5ServerXML.setSSLPort | public void setSSLPort() throws InstallationFailedException {
Element httpsConnector =
(Element) getDocument()
.selectSingleNode(HTTPS_CONNECTOR_XPATH);
if (options.getBooleanValue(InstallOptions.SSL_AVAILABLE, true)) {
if (httpsConnector == null) {
... | java | public void setSSLPort() throws InstallationFailedException {
Element httpsConnector =
(Element) getDocument()
.selectSingleNode(HTTPS_CONNECTOR_XPATH);
if (options.getBooleanValue(InstallOptions.SSL_AVAILABLE, true)) {
if (httpsConnector == null) {
... | [
"public",
"void",
"setSSLPort",
"(",
")",
"throws",
"InstallationFailedException",
"{",
"Element",
"httpsConnector",
"=",
"(",
"Element",
")",
"getDocument",
"(",
")",
".",
"selectSingleNode",
"(",
"HTTPS_CONNECTOR_XPATH",
")",
";",
"if",
"(",
"options",
".",
"g... | Sets the port and keystore information on the SSL connector if it already
exists; creates a new SSL connector, otherwise. Also sets the
redirectPort on the non-SSL connector to match.
@throws InstallationFailedException | [
"Sets",
"the",
"port",
"and",
"keystore",
"information",
"on",
"the",
"SSL",
"connector",
"if",
"it",
"already",
"exists",
";",
"creates",
"a",
"new",
"SSL",
"connector",
"otherwise",
".",
"Also",
"sets",
"the",
"redirectPort",
"on",
"the",
"non",
"-",
"SS... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-installer/src/main/java/org/fcrepo/utilities/install/container/Tomcat5ServerXML.java#L94-L152 |
8,802 | fcrepo3/fcrepo | fcrepo-installer/src/main/java/org/fcrepo/utilities/install/container/Tomcat5ServerXML.java | Tomcat5ServerXML.addAttribute | private void addAttribute(Element element,
String attributeName,
String attributeValue,
String defaultValue) {
if (attributeValue == null || attributeValue.equals(defaultValue)) {
Attribute attribute =
... | java | private void addAttribute(Element element,
String attributeName,
String attributeValue,
String defaultValue) {
if (attributeValue == null || attributeValue.equals(defaultValue)) {
Attribute attribute =
... | [
"private",
"void",
"addAttribute",
"(",
"Element",
"element",
",",
"String",
"attributeName",
",",
"String",
"attributeValue",
",",
"String",
"defaultValue",
")",
"{",
"if",
"(",
"attributeValue",
"==",
"null",
"||",
"attributeValue",
".",
"equals",
"(",
"defaul... | Adds the attribute to the element if the attributeValue is not equal to
defaultValue. If attributeValue is null or equals defaultValue, remove
the attribute from the element if it is present.
@param element
@param attributeName
@param attributeValue
@param defaultValue | [
"Adds",
"the",
"attribute",
"to",
"the",
"element",
"if",
"the",
"attributeValue",
"is",
"not",
"equal",
"to",
"defaultValue",
".",
"If",
"attributeValue",
"is",
"null",
"or",
"equals",
"defaultValue",
"remove",
"the",
"attribute",
"from",
"the",
"element",
"i... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-installer/src/main/java/org/fcrepo/utilities/install/container/Tomcat5ServerXML.java#L190-L203 |
8,803 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/objecteditor/types/DatastreamBindingRule.java | DatastreamBindingRule.accepts | public boolean accepts(String type) {
if (m_acceptsAll) {
return true;
}
String[] parts = type.split("/");
if (parts.length != 2) {
return false;
}
for (String element : m_types) {
if (element.equals(parts[0] + "/*") || element.equals(t... | java | public boolean accepts(String type) {
if (m_acceptsAll) {
return true;
}
String[] parts = type.split("/");
if (parts.length != 2) {
return false;
}
for (String element : m_types) {
if (element.equals(parts[0] + "/*") || element.equals(t... | [
"public",
"boolean",
"accepts",
"(",
"String",
"type",
")",
"{",
"if",
"(",
"m_acceptsAll",
")",
"{",
"return",
"true",
";",
"}",
"String",
"[",
"]",
"parts",
"=",
"type",
".",
"split",
"(",
"\"/\"",
")",
";",
"if",
"(",
"parts",
".",
"length",
"!=... | Does this rule allow the given type? | [
"Does",
"this",
"rule",
"allow",
"the",
"given",
"type?"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/objecteditor/types/DatastreamBindingRule.java#L60-L74 |
8,804 | fcrepo3/fcrepo | fcrepo-common/src/main/java/org/fcrepo/utilities/DriverShim.java | DriverShim.loadAndRegister | public static final void loadAndRegister(File driverJarFile,
String driverClassName)
throws Exception {
loadAndRegister(new URL("jar:" + driverJarFile.toURI() + "!/"),
driverClassName);
} | java | public static final void loadAndRegister(File driverJarFile,
String driverClassName)
throws Exception {
loadAndRegister(new URL("jar:" + driverJarFile.toURI() + "!/"),
driverClassName);
} | [
"public",
"static",
"final",
"void",
"loadAndRegister",
"(",
"File",
"driverJarFile",
",",
"String",
"driverClassName",
")",
"throws",
"Exception",
"{",
"loadAndRegister",
"(",
"new",
"URL",
"(",
"\"jar:\"",
"+",
"driverJarFile",
".",
"toURI",
"(",
")",
"+",
"... | Loads the driver from the given jar file and registers it with the driver
manager. | [
"Loads",
"the",
"driver",
"from",
"the",
"given",
"jar",
"file",
"and",
"registers",
"it",
"with",
"the",
"driver",
"manager",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-common/src/main/java/org/fcrepo/utilities/DriverShim.java#L49-L54 |
8,805 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/access/DynamicAccessImpl.java | DynamicAccessImpl.getServiceDefinitions | public String[] getServiceDefinitions(Context context,
String PID,
Date asOfDateTime)
throws ServerException {
// FIXIT! In FUTURE this method might consult some source that tells
// what Service Definition... | java | public String[] getServiceDefinitions(Context context,
String PID,
Date asOfDateTime)
throws ServerException {
// FIXIT! In FUTURE this method might consult some source that tells
// what Service Definition... | [
"public",
"String",
"[",
"]",
"getServiceDefinitions",
"(",
"Context",
"context",
",",
"String",
"PID",
",",
"Date",
"asOfDateTime",
")",
"throws",
"ServerException",
"{",
"// FIXIT! In FUTURE this method might consult some source that tells",
"// what Service Definitions are a... | 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/DynamicAccessImpl.java#L87-L107 |
8,806 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/access/DynamicAccessImpl.java | DynamicAccessImpl.listMethods | public ObjectMethodsDef[] listMethods(Context context,
String PID,
Date asOfDateTime)
throws ServerException {
String[] sDefPIDs = getServiceDefinitions(context, PID, asOfDateTime);
Date versDateTime = asOfDa... | java | public ObjectMethodsDef[] listMethods(Context context,
String PID,
Date asOfDateTime)
throws ServerException {
String[] sDefPIDs = getServiceDefinitions(context, PID, asOfDateTime);
Date versDateTime = asOfDa... | [
"public",
"ObjectMethodsDef",
"[",
"]",
"listMethods",
"(",
"Context",
"context",
",",
"String",
"PID",
",",
"Date",
"asOfDateTime",
")",
"throws",
"ServerException",
"{",
"String",
"[",
"]",
"sDefPIDs",
"=",
"getServiceDefinitions",
"(",
"context",
",",
"PID",
... | Get the definitions for all dynamic disseminations on the object. 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 method de... | [
"Get",
"the",
"definitions",
"for",
"all",
"dynamic",
"disseminations",
"on",
"the",
"object",
".",
"This",
"will",
"return",
"the",
"method",
"definitions",
"for",
"all",
"methods",
"for",
"all",
"of",
"the",
"dynamic",
"disseminators",
"associated",
"with",
... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/access/DynamicAccessImpl.java#L263-L286 |
8,807 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/batch/BatchModify.java | BatchModify.getDuration | private static String getDuration(long millis) {
long tsec = millis / 1000;
long h = tsec / 60 / 60;
long m = (tsec - h * 60 * 60) / 60;
long s = tsec - h * 60 * 60 - m * 60;
StringBuffer out = new StringBuffer();
if (h > 0) {
out.append(h + " hour");
... | java | private static String getDuration(long millis) {
long tsec = millis / 1000;
long h = tsec / 60 / 60;
long m = (tsec - h * 60 * 60) / 60;
long s = tsec - h * 60 * 60 - m * 60;
StringBuffer out = new StringBuffer();
if (h > 0) {
out.append(h + " hour");
... | [
"private",
"static",
"String",
"getDuration",
"(",
"long",
"millis",
")",
"{",
"long",
"tsec",
"=",
"millis",
"/",
"1000",
";",
"long",
"h",
"=",
"tsec",
"/",
"60",
"/",
"60",
";",
"long",
"m",
"=",
"(",
"tsec",
"-",
"h",
"*",
"60",
"*",
"60",
... | Convert the duration time from milliseconds to standard hours, minutes,
and seconds format.
@param millis
The time interval to convert in miliseconds.
@return A string with the converted time. | [
"Convert",
"the",
"duration",
"time",
"from",
"milliseconds",
"to",
"standard",
"hours",
"minutes",
"and",
"seconds",
"format",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/batch/BatchModify.java#L208-L239 |
8,808 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/batch/BatchModify.java | BatchModify.openLog | private static void openLog(String rootName) throws Exception {
s_rootName = rootName;
String fileName =
s_rootName + "-" + System.currentTimeMillis() + ".xml";
File outFile;
String fedoraHome = Constants.FEDORA_HOME;
if (fedoraHome == null) {
// to cu... | java | private static void openLog(String rootName) throws Exception {
s_rootName = rootName;
String fileName =
s_rootName + "-" + System.currentTimeMillis() + ".xml";
File outFile;
String fedoraHome = Constants.FEDORA_HOME;
if (fedoraHome == null) {
// to cu... | [
"private",
"static",
"void",
"openLog",
"(",
"String",
"rootName",
")",
"throws",
"Exception",
"{",
"s_rootName",
"=",
"rootName",
";",
"String",
"fileName",
"=",
"s_rootName",
"+",
"\"-\"",
"+",
"System",
".",
"currentTimeMillis",
"(",
")",
"+",
"\".xml\"",
... | Initializes the log file for writing.
@param rootName
The name of the root element for the xml log file.
@throws Exception
If any type of error occurs in trying to open the log file for
writing. | [
"Initializes",
"the",
"log",
"file",
"for",
"writing",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/batch/BatchModify.java#L250-L273 |
8,809 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/batch/BatchModify.java | BatchModify.fileAsString | private static String fileAsString(String path) throws Exception {
StringBuffer buffer = new StringBuffer();
InputStream fis = new FileInputStream(path);
InputStreamReader isr = new InputStreamReader(fis, "UTF-8");
Reader in = new BufferedReader(isr);
int ch;
while ((ch =... | java | private static String fileAsString(String path) throws Exception {
StringBuffer buffer = new StringBuffer();
InputStream fis = new FileInputStream(path);
InputStreamReader isr = new InputStreamReader(fis, "UTF-8");
Reader in = new BufferedReader(isr);
int ch;
while ((ch =... | [
"private",
"static",
"String",
"fileAsString",
"(",
"String",
"path",
")",
"throws",
"Exception",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"InputStream",
"fis",
"=",
"new",
"FileInputStream",
"(",
"path",
")",
";",
"InputStream... | Converts file into string.
@param path
The absolute file path of the file.
@return The contents of the file as a string.
@throws Exception
If any type of error occurs during the conversion. | [
"Converts",
"file",
"into",
"string",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/batch/BatchModify.java#L295-L306 |
8,810 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/FilePolicyIndex.java | FilePolicyIndex.fileToName | private String fileToName(File policyFile) throws PolicyIndexException {
try {
if (!policyFile.getName().endsWith(".xml"))
throw new PolicyIndexException("Invalid policy file name. Policy files must end in .xml - " + policyFile.getName());
return PID.fromFilename(policy... | java | private String fileToName(File policyFile) throws PolicyIndexException {
try {
if (!policyFile.getName().endsWith(".xml"))
throw new PolicyIndexException("Invalid policy file name. Policy files must end in .xml - " + policyFile.getName());
return PID.fromFilename(policy... | [
"private",
"String",
"fileToName",
"(",
"File",
"policyFile",
")",
"throws",
"PolicyIndexException",
"{",
"try",
"{",
"if",
"(",
"!",
"policyFile",
".",
"getName",
"(",
")",
".",
"endsWith",
"(",
"\".xml\"",
")",
")",
"throw",
"new",
"PolicyIndexException",
... | Determine name of policy from file. .xml prefix is removed, and name is converted to a PID.
Policy names must be valid PIDs.
@param policyFile
@return
@throws PolicyIndexException | [
"Determine",
"name",
"of",
"policy",
"from",
"file",
".",
".",
"xml",
"prefix",
"is",
"removed",
"and",
"name",
"is",
"converted",
"to",
"a",
"PID",
".",
"Policy",
"names",
"must",
"be",
"valid",
"PIDs",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/FilePolicyIndex.java#L145-L155 |
8,811 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/security/PolicyLoader.java | PolicyLoader.loadObjectPolicy | protected AbstractPolicy loadObjectPolicy(PolicyParser policyParser, String pid, boolean validate) throws ServerException {
try {
DOReader reader = m_repoReader.getReader(Server.USE_DEFINITIVE_STORE,
ReadOnlyContext.EMPTY,
... | java | protected AbstractPolicy loadObjectPolicy(PolicyParser policyParser, String pid, boolean validate) throws ServerException {
try {
DOReader reader = m_repoReader.getReader(Server.USE_DEFINITIVE_STORE,
ReadOnlyContext.EMPTY,
... | [
"protected",
"AbstractPolicy",
"loadObjectPolicy",
"(",
"PolicyParser",
"policyParser",
",",
"String",
"pid",
",",
"boolean",
"validate",
")",
"throws",
"ServerException",
"{",
"try",
"{",
"DOReader",
"reader",
"=",
"m_repoReader",
".",
"getReader",
"(",
"Server",
... | the passed parser must be safe to use in this thread | [
"the",
"passed",
"parser",
"must",
"be",
"safe",
"to",
"use",
"in",
"this",
"thread"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/security/PolicyLoader.java#L38-L53 |
8,812 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/validation/RelsValidator.java | RelsValidator.isValidDateTime | private static boolean isValidDateTime(String lex) {
try {
DateUtility.parseDateStrict(lex);
if (logger.isTraceEnabled()) {
logger.trace("Validated dateTime: " + lex);
}
return true;
} catch (ParseException e) {
logger.warn("Not... | java | private static boolean isValidDateTime(String lex) {
try {
DateUtility.parseDateStrict(lex);
if (logger.isTraceEnabled()) {
logger.trace("Validated dateTime: " + lex);
}
return true;
} catch (ParseException e) {
logger.warn("Not... | [
"private",
"static",
"boolean",
"isValidDateTime",
"(",
"String",
"lex",
")",
"{",
"try",
"{",
"DateUtility",
".",
"parseDateStrict",
"(",
"lex",
")",
";",
"if",
"(",
"logger",
".",
"isTraceEnabled",
"(",
")",
")",
"{",
"logger",
".",
"trace",
"(",
"\"Va... | Tells whether the given string is a valid lexical representation of a
dateTime value. Passing this test will ensure successful indexing later. | [
"Tells",
"whether",
"the",
"given",
"string",
"is",
"a",
"valid",
"lexical",
"representation",
"of",
"a",
"dateTime",
"value",
".",
"Passing",
"this",
"test",
"will",
"ensure",
"successful",
"indexing",
"later",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/validation/RelsValidator.java#L527-L538 |
8,813 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multicast/rmi/RmiTransport.java | RmiTransport.openFile | @Override
public void openFile(String repositoryHash,
String filename,
Date currentDate) throws JournalException {
try {
super.testStateChange(State.FILE_OPEN);
writer = new RmiTransportWriter(receiver, repositoryHash, filename);
... | java | @Override
public void openFile(String repositoryHash,
String filename,
Date currentDate) throws JournalException {
try {
super.testStateChange(State.FILE_OPEN);
writer = new RmiTransportWriter(receiver, repositoryHash, filename);
... | [
"@",
"Override",
"public",
"void",
"openFile",
"(",
"String",
"repositoryHash",
",",
"String",
"filename",
",",
"Date",
"currentDate",
")",
"throws",
"JournalException",
"{",
"try",
"{",
"super",
".",
"testStateChange",
"(",
"State",
".",
"FILE_OPEN",
")",
";"... | check state, send the open request, open a very special writer, write the
file opening, set state | [
"check",
"state",
"send",
"the",
"open",
"request",
"open",
"a",
"very",
"special",
"writer",
"write",
"the",
"file",
"opening",
"set",
"state"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multicast/rmi/RmiTransport.java#L169-L191 |
8,814 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/objecteditor/ContentHandlerFactory.java | ContentHandlerFactory.hasViewer | public static boolean hasViewer(String type) {
return s_viewers.containsKey(type) || type.endsWith("+xml")
&& s_viewers.containsKey("text/xml");
} | java | public static boolean hasViewer(String type) {
return s_viewers.containsKey(type) || type.endsWith("+xml")
&& s_viewers.containsKey("text/xml");
} | [
"public",
"static",
"boolean",
"hasViewer",
"(",
"String",
"type",
")",
"{",
"return",
"s_viewers",
".",
"containsKey",
"(",
"type",
")",
"||",
"type",
".",
"endsWith",
"(",
"\"+xml\"",
")",
"&&",
"s_viewers",
".",
"containsKey",
"(",
"\"text/xml\"",
")",
... | Can the factory provide a viewer for the given type? | [
"Can",
"the",
"factory",
"provide",
"a",
"viewer",
"for",
"the",
"given",
"type?"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/objecteditor/ContentHandlerFactory.java#L48-L51 |
8,815 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/objecteditor/ContentHandlerFactory.java | ContentHandlerFactory.viewerIsEditor | public static boolean viewerIsEditor(String type) {
Object viewer = s_viewers.get(type);
if (viewer != null) {
return viewer instanceof ContentEditor;
} else {
return false;
}
} | java | public static boolean viewerIsEditor(String type) {
Object viewer = s_viewers.get(type);
if (viewer != null) {
return viewer instanceof ContentEditor;
} else {
return false;
}
} | [
"public",
"static",
"boolean",
"viewerIsEditor",
"(",
"String",
"type",
")",
"{",
"Object",
"viewer",
"=",
"s_viewers",
".",
"get",
"(",
"type",
")",
";",
"if",
"(",
"viewer",
"!=",
"null",
")",
"{",
"return",
"viewer",
"instanceof",
"ContentEditor",
";",
... | If a viewer would be provided for the given type, is that viewer also an
editor? | [
"If",
"a",
"viewer",
"would",
"be",
"provided",
"for",
"the",
"given",
"type",
"is",
"that",
"viewer",
"also",
"an",
"editor?"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/objecteditor/ContentHandlerFactory.java#L57-L64 |
8,816 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/objecteditor/ContentHandlerFactory.java | ContentHandlerFactory.hasEditor | public static boolean hasEditor(String type) {
return s_editors.containsKey(type) || type.endsWith("+xml")
&& s_editors.containsKey("text/xml");
} | java | public static boolean hasEditor(String type) {
return s_editors.containsKey(type) || type.endsWith("+xml")
&& s_editors.containsKey("text/xml");
} | [
"public",
"static",
"boolean",
"hasEditor",
"(",
"String",
"type",
")",
"{",
"return",
"s_editors",
".",
"containsKey",
"(",
"type",
")",
"||",
"type",
".",
"endsWith",
"(",
"\"+xml\"",
")",
"&&",
"s_editors",
".",
"containsKey",
"(",
"\"text/xml\"",
")",
... | Can the factory provide an editor for the given type? | [
"Can",
"the",
"factory",
"provide",
"an",
"editor",
"for",
"the",
"given",
"type?"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/objecteditor/ContentHandlerFactory.java#L69-L72 |
8,817 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/objecteditor/ContentHandlerFactory.java | ContentHandlerFactory.getViewer | public static ContentViewer getViewer(String type, InputStream data)
throws IOException {
ContentViewer viewer = (ContentViewer) s_viewers.get(type);
if (viewer == null && type.endsWith("+xml")) {
viewer = (ContentViewer) s_viewers.get("text/xml");
}
return viewer... | java | public static ContentViewer getViewer(String type, InputStream data)
throws IOException {
ContentViewer viewer = (ContentViewer) s_viewers.get(type);
if (viewer == null && type.endsWith("+xml")) {
viewer = (ContentViewer) s_viewers.get("text/xml");
}
return viewer... | [
"public",
"static",
"ContentViewer",
"getViewer",
"(",
"String",
"type",
",",
"InputStream",
"data",
")",
"throws",
"IOException",
"{",
"ContentViewer",
"viewer",
"=",
"(",
"ContentViewer",
")",
"s_viewers",
".",
"get",
"(",
"type",
")",
";",
"if",
"(",
"vie... | Get a viewer for the given type, initialized with the given data. This
should only be called if the caller knows there is a viewer for the type. | [
"Get",
"a",
"viewer",
"for",
"the",
"given",
"type",
"initialized",
"with",
"the",
"given",
"data",
".",
"This",
"should",
"only",
"be",
"called",
"if",
"the",
"caller",
"knows",
"there",
"is",
"a",
"viewer",
"for",
"the",
"type",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/objecteditor/ContentHandlerFactory.java#L78-L85 |
8,818 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/objecteditor/ContentHandlerFactory.java | ContentHandlerFactory.getEditor | public static ContentEditor getEditor(String type, InputStream data)
throws IOException {
ContentEditor editor = (ContentEditor) s_editors.get(type);
if (editor == null && type.endsWith("+xml")) {
editor = (ContentEditor) s_editors.get("text/xml");
}
return (Conte... | java | public static ContentEditor getEditor(String type, InputStream data)
throws IOException {
ContentEditor editor = (ContentEditor) s_editors.get(type);
if (editor == null && type.endsWith("+xml")) {
editor = (ContentEditor) s_editors.get("text/xml");
}
return (Conte... | [
"public",
"static",
"ContentEditor",
"getEditor",
"(",
"String",
"type",
",",
"InputStream",
"data",
")",
"throws",
"IOException",
"{",
"ContentEditor",
"editor",
"=",
"(",
"ContentEditor",
")",
"s_editors",
".",
"get",
"(",
"type",
")",
";",
"if",
"(",
"edi... | Get an editor for the given type, initialized with the given data. This
should only be called if the caller knows there is an editor for the
type. | [
"Get",
"an",
"editor",
"for",
"the",
"given",
"type",
"initialized",
"with",
"the",
"given",
"data",
".",
"This",
"should",
"only",
"be",
"called",
"if",
"the",
"caller",
"knows",
"there",
"is",
"an",
"editor",
"for",
"the",
"type",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/objecteditor/ContentHandlerFactory.java#L92-L99 |
8,819 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/utility/validate/ValidationResult.java | ValidationResult.getSeverityLevel | public Level getSeverityLevel() {
Level severity = Level.INFO;
for (ValidationResultNotation note : notes) {
Level noteLevel = note.getLevel();
if (noteLevel.compareTo(severity) > 0) {
severity = noteLevel;
}
}
return severity;
} | java | public Level getSeverityLevel() {
Level severity = Level.INFO;
for (ValidationResultNotation note : notes) {
Level noteLevel = note.getLevel();
if (noteLevel.compareTo(severity) > 0) {
severity = noteLevel;
}
}
return severity;
} | [
"public",
"Level",
"getSeverityLevel",
"(",
")",
"{",
"Level",
"severity",
"=",
"Level",
".",
"INFO",
";",
"for",
"(",
"ValidationResultNotation",
"note",
":",
"notes",
")",
"{",
"Level",
"noteLevel",
"=",
"note",
".",
"getLevel",
"(",
")",
";",
"if",
"(... | What's the highest severity level of any of the notations on this result? | [
"What",
"s",
"the",
"highest",
"severity",
"level",
"of",
"any",
"of",
"the",
"notations",
"on",
"this",
"result?"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/utility/validate/ValidationResult.java#L67-L76 |
8,820 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/resourceIndex/ResourceIndexModule.java | ResourceIndexModule.shutdownModule | @Override
public void shutdownModule() throws ModuleShutdownException {
if (_ri != null) {
try {
_ri.close();
} catch (TrippiException e) {
throw new ModuleShutdownException("Error closing RI",
getRole(... | java | @Override
public void shutdownModule() throws ModuleShutdownException {
if (_ri != null) {
try {
_ri.close();
} catch (TrippiException e) {
throw new ModuleShutdownException("Error closing RI",
getRole(... | [
"@",
"Override",
"public",
"void",
"shutdownModule",
"(",
")",
"throws",
"ModuleShutdownException",
"{",
"if",
"(",
"_ri",
"!=",
"null",
")",
"{",
"try",
"{",
"_ri",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"TrippiException",
"e",
")",
"{",
"thr... | Shutdown the RI module by closing the wrapped ResourceIndex.
@throws ModuleShutdownException
if any error occurs while closing. | [
"Shutdown",
"the",
"RI",
"module",
"by",
"closing",
"the",
"wrapped",
"ResourceIndex",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/resourceIndex/ResourceIndexModule.java#L226-L237 |
8,821 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/config/webxml/WebXML.java | WebXML.getInstance | public static WebXML getInstance(String webxml) {
WebXML wx = null;
BeanReader reader = new BeanReader();
reader.getXMLIntrospector().getConfiguration()
.setAttributesForPrimitives(false);
reader.getBindingConfiguration().setMapIDs(false);
try {
reade... | java | public static WebXML getInstance(String webxml) {
WebXML wx = null;
BeanReader reader = new BeanReader();
reader.getXMLIntrospector().getConfiguration()
.setAttributesForPrimitives(false);
reader.getBindingConfiguration().setMapIDs(false);
try {
reade... | [
"public",
"static",
"WebXML",
"getInstance",
"(",
"String",
"webxml",
")",
"{",
"WebXML",
"wx",
"=",
"null",
";",
"BeanReader",
"reader",
"=",
"new",
"BeanReader",
"(",
")",
";",
"reader",
".",
"getXMLIntrospector",
"(",
")",
".",
"getConfiguration",
"(",
... | Create an instance of WebXML from the specified file.
@param webxml
Path to web.xml file.
@return instance of WebXML | [
"Create",
"an",
"instance",
"of",
"WebXML",
"from",
"the",
"specified",
"file",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/config/webxml/WebXML.java#L89-L110 |
8,822 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/BasicServer.java | BasicServer.preIngestIfNeeded | private void preIngestIfNeeded(boolean firstRun,
DOManager doManager,
RDFName objectName) throws Exception {
PID pid = new PID(objectName.uri.substring("info:fedora/".length()));
boolean exists = doManager.objectExists(pid.toString())... | java | private void preIngestIfNeeded(boolean firstRun,
DOManager doManager,
RDFName objectName) throws Exception {
PID pid = new PID(objectName.uri.substring("info:fedora/".length()));
boolean exists = doManager.objectExists(pid.toString())... | [
"private",
"void",
"preIngestIfNeeded",
"(",
"boolean",
"firstRun",
",",
"DOManager",
"doManager",
",",
"RDFName",
"objectName",
")",
"throws",
"Exception",
"{",
"PID",
"pid",
"=",
"new",
"PID",
"(",
"objectName",
".",
"uri",
".",
"substring",
"(",
"\"info:fed... | Ingests the given system object if it doesn't exist, OR if it
exists, but this instance of Fedora has never been started.
This ensures that, upon upgrade, the old system object
is replaced with the new one. | [
"Ingests",
"the",
"given",
"system",
"object",
"if",
"it",
"doesn",
"t",
"exist",
"OR",
"if",
"it",
"exists",
"but",
"this",
"instance",
"of",
"Fedora",
"has",
"never",
"been",
"started",
".",
"This",
"ensures",
"that",
"upon",
"upgrade",
"the",
"old",
"... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/BasicServer.java#L141-L183 |
8,823 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/validation/DOValidatorImpl.java | DOValidatorImpl.validateXMLSchema | private void validateXMLSchema(InputStream objectAsStream, DOValidatorXMLSchema xsv)
throws ObjectValidityException, GeneralException {
try {
xsv.validate(objectAsStream);
} catch (ObjectValidityException e) {
logger.error("VALIDATE: ERROR - failed XML Schema validat... | java | private void validateXMLSchema(InputStream objectAsStream, DOValidatorXMLSchema xsv)
throws ObjectValidityException, GeneralException {
try {
xsv.validate(objectAsStream);
} catch (ObjectValidityException e) {
logger.error("VALIDATE: ERROR - failed XML Schema validat... | [
"private",
"void",
"validateXMLSchema",
"(",
"InputStream",
"objectAsStream",
",",
"DOValidatorXMLSchema",
"xsv",
")",
"throws",
"ObjectValidityException",
",",
"GeneralException",
"{",
"try",
"{",
"xsv",
".",
"validate",
"(",
"objectAsStream",
")",
";",
"}",
"catch... | Do XML Schema validation on the Fedora object.
@param objectAsFile
The digital object provided as a file.
@throws ObjectValidityException
If validation fails for any reason.
@throws GeneralException
If validation fails for any reason. | [
"Do",
"XML",
"Schema",
"validation",
"on",
"the",
"Fedora",
"object",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/validation/DOValidatorImpl.java#L357-L371 |
8,824 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/validation/DOValidatorImpl.java | DOValidatorImpl.validateByRules | private void validateByRules(InputStream objectAsStream,
String ruleSchemaPath,
String preprocessorPath,
String phase) throws ObjectValidityException,
GeneralException {
try {
DOValidatorS... | java | private void validateByRules(InputStream objectAsStream,
String ruleSchemaPath,
String preprocessorPath,
String phase) throws ObjectValidityException,
GeneralException {
try {
DOValidatorS... | [
"private",
"void",
"validateByRules",
"(",
"InputStream",
"objectAsStream",
",",
"String",
"ruleSchemaPath",
",",
"String",
"preprocessorPath",
",",
"String",
"phase",
")",
"throws",
"ObjectValidityException",
",",
"GeneralException",
"{",
"try",
"{",
"DOValidatorSchema... | Do Schematron rules validation on the Fedora object. Schematron
validation tests the object against a set of rules expressed using XPATH
in a Schematron schema. These test for things that are beyond what can be
expressed using XML Schema.
@param objectAsFile
The digital object provided as a file.
@param schemaPath
Loc... | [
"Do",
"Schematron",
"rules",
"validation",
"on",
"the",
"Fedora",
"object",
".",
"Schematron",
"validation",
"tests",
"the",
"object",
"against",
"a",
"set",
"of",
"rules",
"expressed",
"using",
"XPATH",
"in",
"a",
"Schematron",
"schema",
".",
"These",
"test",... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/validation/DOValidatorImpl.java#L392-L415 |
8,825 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/validation/DOValidatorImpl.java | DOValidatorImpl.cleanUp | private void cleanUp(File f) {
if (f != null && f.getParentFile() != null) {
if (m_absoluteTempPath.equalsIgnoreCase(f
.getParentFile().getAbsolutePath())) {
f.delete();
}
}
} | java | private void cleanUp(File f) {
if (f != null && f.getParentFile() != null) {
if (m_absoluteTempPath.equalsIgnoreCase(f
.getParentFile().getAbsolutePath())) {
f.delete();
}
}
} | [
"private",
"void",
"cleanUp",
"(",
"File",
"f",
")",
"{",
"if",
"(",
"f",
"!=",
"null",
"&&",
"f",
".",
"getParentFile",
"(",
")",
"!=",
"null",
")",
"{",
"if",
"(",
"m_absoluteTempPath",
".",
"equalsIgnoreCase",
"(",
"f",
".",
"getParentFile",
"(",
... | but it should only blow away files in the temp directory. | [
"but",
"it",
"should",
"only",
"blow",
"away",
"files",
"in",
"the",
"temp",
"directory",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/validation/DOValidatorImpl.java#L438-L445 |
8,826 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/security/impl/BasicEvaluationCtx.java | BasicEvaluationCtx.setupResource | private void setupResource(List resource) throws ParsingException {
mapAttributes(resource, resourceMap);
// make sure there resource-id attribute was included
List<Attribute> resourceId = resourceMap.get(RESOURCE_ID);
if (resourceId == null) {
logger.warn("Resource must co... | java | private void setupResource(List resource) throws ParsingException {
mapAttributes(resource, resourceMap);
// make sure there resource-id attribute was included
List<Attribute> resourceId = resourceMap.get(RESOURCE_ID);
if (resourceId == null) {
logger.warn("Resource must co... | [
"private",
"void",
"setupResource",
"(",
"List",
"resource",
")",
"throws",
"ParsingException",
"{",
"mapAttributes",
"(",
"resource",
",",
"resourceMap",
")",
";",
"// make sure there resource-id attribute was included",
"List",
"<",
"Attribute",
">",
"resourceId",
"="... | This basically does the same thing that the other types need
to do, except that we also look for a resource-id attribute, not
because we're going to use, but only to make sure that it's actually
there, and for the optional scope attribute, to see what the scope
of the attribute is | [
"This",
"basically",
"does",
"the",
"same",
"thing",
"that",
"the",
"other",
"types",
"need",
"to",
"do",
"except",
"that",
"we",
"also",
"look",
"for",
"a",
"resource",
"-",
"id",
"attribute",
"not",
"because",
"we",
"re",
"going",
"to",
"use",
"but",
... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/security/impl/BasicEvaluationCtx.java#L295-L352 |
8,827 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/security/impl/BasicEvaluationCtx.java | BasicEvaluationCtx.mapAttributes | private void mapAttributes(List<Attribute> input, Map<String, List<Attribute>> output) {
Iterator<Attribute> it = input.iterator();
while (it.hasNext()) {
Attribute attr = it.next();
String id = attr.getId().toString();
if (output.containsKey(id)) {
L... | java | private void mapAttributes(List<Attribute> input, Map<String, List<Attribute>> output) {
Iterator<Attribute> it = input.iterator();
while (it.hasNext()) {
Attribute attr = it.next();
String id = attr.getId().toString();
if (output.containsKey(id)) {
L... | [
"private",
"void",
"mapAttributes",
"(",
"List",
"<",
"Attribute",
">",
"input",
",",
"Map",
"<",
"String",
",",
"List",
"<",
"Attribute",
">",
">",
"output",
")",
"{",
"Iterator",
"<",
"Attribute",
">",
"it",
"=",
"input",
".",
"iterator",
"(",
")",
... | Generic routine for resource, attribute and environment attributes
to build the lookup map for each. The Form is a Map that is indexed
by the String form of the attribute ids, and that contains Sets at
each entry with all attributes that have that id | [
"Generic",
"routine",
"for",
"resource",
"attribute",
"and",
"environment",
"attributes",
"to",
"build",
"the",
"lookup",
"map",
"for",
"each",
".",
"The",
"Form",
"is",
"a",
"Map",
"that",
"is",
"indexed",
"by",
"the",
"String",
"form",
"of",
"the",
"attr... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/security/impl/BasicEvaluationCtx.java#L360-L375 |
8,828 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/security/impl/BasicEvaluationCtx.java | BasicEvaluationCtx.getGenericAttributes | private EvaluationResult getGenericAttributes(URI type, URI id, URI issuer,
Map<String, List<Attribute>> map, URI category,
int designatorType) {
// try to find the id
List<Attribute> attrList = (List)(ma... | java | private EvaluationResult getGenericAttributes(URI type, URI id, URI issuer,
Map<String, List<Attribute>> map, URI category,
int designatorType) {
// try to find the id
List<Attribute> attrList = (List)(ma... | [
"private",
"EvaluationResult",
"getGenericAttributes",
"(",
"URI",
"type",
",",
"URI",
"id",
",",
"URI",
"issuer",
",",
"Map",
"<",
"String",
",",
"List",
"<",
"Attribute",
">",
">",
"map",
",",
"URI",
"category",
",",
"int",
"designatorType",
")",
"{",
... | Helper function for the resource, action and environment methods
to get an attribute. | [
"Helper",
"function",
"for",
"the",
"resource",
"action",
"and",
"environment",
"methods",
"to",
"get",
"an",
"attribute",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/security/impl/BasicEvaluationCtx.java#L629-L700 |
8,829 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/security/impl/BasicEvaluationCtx.java | BasicEvaluationCtx.checkContext | private Attribute checkContext(URI type, URI id, URI issuer,
URI category, int designatorType) {
if (!STRING_ATTRIBUTE_TYPE_URI.equals(type)) return null;
String [] values = null;
switch(designatorType){
case AttributeDesignator.SUBJECT_TARGET:... | java | private Attribute checkContext(URI type, URI id, URI issuer,
URI category, int designatorType) {
if (!STRING_ATTRIBUTE_TYPE_URI.equals(type)) return null;
String [] values = null;
switch(designatorType){
case AttributeDesignator.SUBJECT_TARGET:... | [
"private",
"Attribute",
"checkContext",
"(",
"URI",
"type",
",",
"URI",
"id",
",",
"URI",
"issuer",
",",
"URI",
"category",
",",
"int",
"designatorType",
")",
"{",
"if",
"(",
"!",
"STRING_ATTRIBUTE_TYPE_URI",
".",
"equals",
"(",
"type",
")",
")",
"return",... | Private helper that checks the request context for an attribute, or else returns
null | [
"Private",
"helper",
"that",
"checks",
"the",
"request",
"context",
"for",
"an",
"attribute",
"or",
"else",
"returns",
"null"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/security/impl/BasicEvaluationCtx.java#L706-L739 |
8,830 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/security/impl/BasicEvaluationCtx.java | BasicEvaluationCtx.callHelper | private EvaluationResult callHelper(URI type, URI id, URI issuer,
URI category, int adType) {
if (finder != null) {
return finder.findAttribute(type, id, issuer, category,
this, adType);
} else {
logg... | java | private EvaluationResult callHelper(URI type, URI id, URI issuer,
URI category, int adType) {
if (finder != null) {
return finder.findAttribute(type, id, issuer, category,
this, adType);
} else {
logg... | [
"private",
"EvaluationResult",
"callHelper",
"(",
"URI",
"type",
",",
"URI",
"id",
",",
"URI",
"issuer",
",",
"URI",
"category",
",",
"int",
"adType",
")",
"{",
"if",
"(",
"finder",
"!=",
"null",
")",
"{",
"return",
"finder",
".",
"findAttribute",
"(",
... | Private helper that calls the finder if it's non-null, or else returns
an empty bag | [
"Private",
"helper",
"that",
"calls",
"the",
"finder",
"if",
"it",
"s",
"non",
"-",
"null",
"or",
"else",
"returns",
"an",
"empty",
"bag"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/security/impl/BasicEvaluationCtx.java#L744-L754 |
8,831 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultDOManager.java | DefaultDOManager.getReader | @Override
public DOReader getReader(boolean cachedObjectRequired, Context context,
String pid) throws ServerException {
long getReaderStartTime = logger.isDebugEnabled() ?
System.currentTimeMillis() : -1;
String source = null;
try {
{
D... | java | @Override
public DOReader getReader(boolean cachedObjectRequired, Context context,
String pid) throws ServerException {
long getReaderStartTime = logger.isDebugEnabled() ?
System.currentTimeMillis() : -1;
String source = null;
try {
{
D... | [
"@",
"Override",
"public",
"DOReader",
"getReader",
"(",
"boolean",
"cachedObjectRequired",
",",
"Context",
"context",
",",
"String",
"pid",
")",
"throws",
"ServerException",
"{",
"long",
"getReaderStartTime",
"=",
"logger",
".",
"isDebugEnabled",
"(",
")",
"?",
... | Gets a reader on an existing digital object. | [
"Gets",
"a",
"reader",
"on",
"an",
"existing",
"digital",
"object",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultDOManager.java#L715-L750 |
8,832 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultDOManager.java | DefaultDOManager.getServiceDeploymentReader | @Override
public ServiceDeploymentReader getServiceDeploymentReader(
boolean cachedObjectRequired, Context context, String pid)
throws ServerException {
{
return new SimpleServiceDeploymentReader(context, this,
m_translator, m_defaultExportFormat,
... | java | @Override
public ServiceDeploymentReader getServiceDeploymentReader(
boolean cachedObjectRequired, Context context, String pid)
throws ServerException {
{
return new SimpleServiceDeploymentReader(context, this,
m_translator, m_defaultExportFormat,
... | [
"@",
"Override",
"public",
"ServiceDeploymentReader",
"getServiceDeploymentReader",
"(",
"boolean",
"cachedObjectRequired",
",",
"Context",
"context",
",",
"String",
"pid",
")",
"throws",
"ServerException",
"{",
"{",
"return",
"new",
"SimpleServiceDeploymentReader",
"(",
... | Gets a reader on an existing service deployment object. | [
"Gets",
"a",
"reader",
"on",
"an",
"existing",
"service",
"deployment",
"object",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultDOManager.java#L755-L765 |
8,833 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultDOManager.java | DefaultDOManager.getServiceDefinitionReader | @Override
public ServiceDefinitionReader getServiceDefinitionReader(
boolean cachedObjectRequired, Context context, String pid)
throws ServerException {
{
return new SimpleServiceDefinitionReader(context, this,
m_translator, m_defaultExportFormat,
... | java | @Override
public ServiceDefinitionReader getServiceDefinitionReader(
boolean cachedObjectRequired, Context context, String pid)
throws ServerException {
{
return new SimpleServiceDefinitionReader(context, this,
m_translator, m_defaultExportFormat,
... | [
"@",
"Override",
"public",
"ServiceDefinitionReader",
"getServiceDefinitionReader",
"(",
"boolean",
"cachedObjectRequired",
",",
"Context",
"context",
",",
"String",
"pid",
")",
"throws",
"ServerException",
"{",
"{",
"return",
"new",
"SimpleServiceDefinitionReader",
"(",
... | Gets a reader on an existing service definition object. | [
"Gets",
"a",
"reader",
"on",
"an",
"existing",
"service",
"definition",
"object",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultDOManager.java#L770-L780 |
8,834 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultDOManager.java | DefaultDOManager.getWriter | @Override
public DOWriter getWriter(boolean cachedObjectRequired, Context context,
String pid) throws ServerException, ObjectLockedException {
if (cachedObjectRequired) {
throw new InvalidContextException(
"A DOWriter is unavailable in a cached context.");
... | java | @Override
public DOWriter getWriter(boolean cachedObjectRequired, Context context,
String pid) throws ServerException, ObjectLockedException {
if (cachedObjectRequired) {
throw new InvalidContextException(
"A DOWriter is unavailable in a cached context.");
... | [
"@",
"Override",
"public",
"DOWriter",
"getWriter",
"(",
"boolean",
"cachedObjectRequired",
",",
"Context",
"context",
",",
"String",
"pid",
")",
"throws",
"ServerException",
",",
"ObjectLockedException",
"{",
"if",
"(",
"cachedObjectRequired",
")",
"{",
"throw",
... | Gets a writer on an existing object. | [
"Gets",
"a",
"writer",
"on",
"an",
"existing",
"object",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultDOManager.java#L785-L811 |
8,835 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultDOManager.java | DefaultDOManager.populateDC | private static void populateDC(Context ctx, DigitalObject obj, DOWriter w,
Date nowUTC) throws IOException, ServerException {
logger.debug("Adding/Checking default DC datastream");
Datastream dc = w.GetDatastream("DC", null);
DCFields dcf;
XMLDatastreamProcessor dcxml = null;... | java | private static void populateDC(Context ctx, DigitalObject obj, DOWriter w,
Date nowUTC) throws IOException, ServerException {
logger.debug("Adding/Checking default DC datastream");
Datastream dc = w.GetDatastream("DC", null);
DCFields dcf;
XMLDatastreamProcessor dcxml = null;... | [
"private",
"static",
"void",
"populateDC",
"(",
"Context",
"ctx",
",",
"DigitalObject",
"obj",
",",
"DOWriter",
"w",
",",
"Date",
"nowUTC",
")",
"throws",
"IOException",
",",
"ServerException",
"{",
"logger",
".",
"debug",
"(",
"\"Adding/Checking default DC datast... | Adds a minimal DC datastream if one isn't already present.
If there is already a DC datastream, ensure one of the dc:identifier
values is the PID of the object. | [
"Adds",
"a",
"minimal",
"DC",
"datastream",
"if",
"one",
"isn",
"t",
"already",
"present",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultDOManager.java#L1060-L1100 |
8,836 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultDOManager.java | DefaultDOManager.objectExists | @Override
public boolean objectExists(String pid) throws StorageDeviceException {
boolean registered = objectExistsInRegistry(pid);
boolean exists = false;
if (!registered && m_checkableStore) {
try {
exists = ((ICheckable)m_permanentStore).objectExists(pid);
... | java | @Override
public boolean objectExists(String pid) throws StorageDeviceException {
boolean registered = objectExistsInRegistry(pid);
boolean exists = false;
if (!registered && m_checkableStore) {
try {
exists = ((ICheckable)m_permanentStore).objectExists(pid);
... | [
"@",
"Override",
"public",
"boolean",
"objectExists",
"(",
"String",
"pid",
")",
"throws",
"StorageDeviceException",
"{",
"boolean",
"registered",
"=",
"objectExistsInRegistry",
"(",
"pid",
")",
";",
"boolean",
"exists",
"=",
"false",
";",
"if",
"(",
"!",
"reg... | Checks the object registry for the given object. | [
"Checks",
"the",
"object",
"registry",
"for",
"the",
"given",
"object",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultDOManager.java#L1699-L1715 |
8,837 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultDOManager.java | DefaultDOManager.unregisterObject | private void unregisterObject(DigitalObject obj)
throws StorageDeviceException {
String pid = obj.getPid();
Connection conn = null;
PreparedStatement st = null;
try {
conn = m_connectionPool.getReadWriteConnection();
String query = "DELETE FROM doRegis... | java | private void unregisterObject(DigitalObject obj)
throws StorageDeviceException {
String pid = obj.getPid();
Connection conn = null;
PreparedStatement st = null;
try {
conn = m_connectionPool.getReadWriteConnection();
String query = "DELETE FROM doRegis... | [
"private",
"void",
"unregisterObject",
"(",
"DigitalObject",
"obj",
")",
"throws",
"StorageDeviceException",
"{",
"String",
"pid",
"=",
"obj",
".",
"getPid",
"(",
")",
";",
"Connection",
"conn",
"=",
"null",
";",
"PreparedStatement",
"st",
"=",
"null",
";",
... | Removes an object from the object registry. | [
"Removes",
"an",
"object",
"from",
"the",
"object",
"registry",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultDOManager.java#L1805-L1841 |
8,838 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultDOManager.java | DefaultDOManager.getPIDs | private String[] getPIDs(String whereClause) throws StorageDeviceException {
Connection conn = null;
PreparedStatement s = null;
ResultSet results = null;
try {
conn = m_connectionPool.getReadOnlyConnection();
String query = "SELECT doPID FROM doRegistry " + where... | java | private String[] getPIDs(String whereClause) throws StorageDeviceException {
Connection conn = null;
PreparedStatement s = null;
ResultSet results = null;
try {
conn = m_connectionPool.getReadOnlyConnection();
String query = "SELECT doPID FROM doRegistry " + where... | [
"private",
"String",
"[",
"]",
"getPIDs",
"(",
"String",
"whereClause",
")",
"throws",
"StorageDeviceException",
"{",
"Connection",
"conn",
"=",
"null",
";",
"PreparedStatement",
"s",
"=",
"null",
";",
"ResultSet",
"results",
"=",
"null",
";",
"try",
"{",
"c... | whereClause is a WHERE clause, starting with "where" | [
"whereClause",
"is",
"a",
"WHERE",
"clause",
"starting",
"with",
"where"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultDOManager.java#L1957-L2001 |
8,839 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultDOManager.java | DefaultDOManager.getNumObjectsWithVersion | private int getNumObjectsWithVersion(Connection conn, int n)
throws SQLException {
PreparedStatement st = null;
try {
String query;
// Because we are dealing with only two Strings, one of which is fixed,
// take advantage of String.concat
if (... | java | private int getNumObjectsWithVersion(Connection conn, int n)
throws SQLException {
PreparedStatement st = null;
try {
String query;
// Because we are dealing with only two Strings, one of which is fixed,
// take advantage of String.concat
if (... | [
"private",
"int",
"getNumObjectsWithVersion",
"(",
"Connection",
"conn",
",",
"int",
"n",
")",
"throws",
"SQLException",
"{",
"PreparedStatement",
"st",
"=",
"null",
";",
"try",
"{",
"String",
"query",
";",
"// Because we are dealing with only two Strings, one of which ... | Get the number of objects in the registry whose system version is equal
to the given value. If n is less than one, return the total number of
objects in the registry. | [
"Get",
"the",
"number",
"of",
"objects",
"in",
"the",
"registry",
"whose",
"system",
"version",
"is",
"equal",
"to",
"the",
"given",
"value",
".",
"If",
"n",
"is",
"less",
"than",
"one",
"return",
"the",
"total",
"number",
"of",
"objects",
"in",
"the",
... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultDOManager.java#L2104-L2126 |
8,840 | fcrepo3/fcrepo | fcrepo-common/src/main/java/org/fcrepo/utilities/XmlTransformUtility.java | XmlTransformUtility.getTemplates | public static Templates getTemplates(File src) throws TransformerException {
String key = src.getAbsolutePath();
TimestampedCacheEntry<Templates> entry = TEMPLATES_CACHE.get(key);
// check to see if it is null or has changed
if (entry == null || entry.timestamp() < src.lastModified()) {
... | java | public static Templates getTemplates(File src) throws TransformerException {
String key = src.getAbsolutePath();
TimestampedCacheEntry<Templates> entry = TEMPLATES_CACHE.get(key);
// check to see if it is null or has changed
if (entry == null || entry.timestamp() < src.lastModified()) {
... | [
"public",
"static",
"Templates",
"getTemplates",
"(",
"File",
"src",
")",
"throws",
"TransformerException",
"{",
"String",
"key",
"=",
"src",
".",
"getAbsolutePath",
"(",
")",
";",
"TimestampedCacheEntry",
"<",
"Templates",
">",
"entry",
"=",
"TEMPLATES_CACHE",
... | Try to cache parsed Templates, but check for changes on disk
@param src
@return Templates | [
"Try",
"to",
"cache",
"parsed",
"Templates",
"but",
"check",
"for",
"changes",
"on",
"disk"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-common/src/main/java/org/fcrepo/utilities/XmlTransformUtility.java#L110-L128 |
8,841 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/storage/translation/AtomDOSerializer.java | AtomDOSerializer.addAuditDatastream | private void addAuditDatastream(Feed feed, DigitalObject obj, ZipOutputStream zout, String encoding) throws ObjectIntegrityException, StreamIOException {
if (obj.getAuditRecords().size() == 0) {
return;
}
String dsId = PID.toURI(obj.getPid()) + "/AUDIT";
String dsvId =
... | java | private void addAuditDatastream(Feed feed, DigitalObject obj, ZipOutputStream zout, String encoding) throws ObjectIntegrityException, StreamIOException {
if (obj.getAuditRecords().size() == 0) {
return;
}
String dsId = PID.toURI(obj.getPid()) + "/AUDIT";
String dsvId =
... | [
"private",
"void",
"addAuditDatastream",
"(",
"Feed",
"feed",
",",
"DigitalObject",
"obj",
",",
"ZipOutputStream",
"zout",
",",
"String",
"encoding",
")",
"throws",
"ObjectIntegrityException",
",",
"StreamIOException",
"{",
"if",
"(",
"obj",
".",
"getAuditRecords",
... | AUDIT datastream is rebuilt from the latest in-memory audit trail which
is a separate array list in the DigitalObject class. Audit trail
datastream re-created from audit records. There is only ONE version of
the audit trail datastream
@throws ObjectIntegrityException
@throws StreamIOException | [
"AUDIT",
"datastream",
"is",
"rebuilt",
"from",
"the",
"latest",
"in",
"-",
"memory",
"audit",
"trail",
"which",
"is",
"a",
"separate",
"array",
"list",
"in",
"the",
"DigitalObject",
"class",
".",
"Audit",
"trail",
"datastream",
"re",
"-",
"created",
"from",... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/translation/AtomDOSerializer.java#L270-L321 |
8,842 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-http/src/main/java/org/fcrepo/security/http/AuthZHttpRequestAttributesFilter.java | AuthZHttpRequestAttributesFilter.setNames | public void setNames(String names) {
this.names = new HashSet<String>(Arrays.asList(names.split(" ")));
} | java | public void setNames(String names) {
this.names = new HashSet<String>(Arrays.asList(names.split(" ")));
} | [
"public",
"void",
"setNames",
"(",
"String",
"names",
")",
"{",
"this",
".",
"names",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
"Arrays",
".",
"asList",
"(",
"names",
".",
"split",
"(",
"\" \"",
")",
")",
")",
";",
"}"
] | setNames set the list of attribute names to look for
@param names
contains space separated attribute names | [
"setNames",
"set",
"the",
"list",
"of",
"attribute",
"names",
"to",
"look",
"for"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-http/src/main/java/org/fcrepo/security/http/AuthZHttpRequestAttributesFilter.java#L49-L51 |
8,843 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultExternalContentManager.java | DefaultExternalContentManager.getFromWeb | private MIMETypedStream getFromWeb(ContentManagerParams params)
throws ModuleInitializationException, GeneralException, RangeNotSatisfiableException {
String username = params.getUsername();
String password = params.getPassword();
boolean backendSSL = false;
String url = p... | java | private MIMETypedStream getFromWeb(ContentManagerParams params)
throws ModuleInitializationException, GeneralException, RangeNotSatisfiableException {
String username = params.getUsername();
String password = params.getPassword();
boolean backendSSL = false;
String url = p... | [
"private",
"MIMETypedStream",
"getFromWeb",
"(",
"ContentManagerParams",
"params",
")",
"throws",
"ModuleInitializationException",
",",
"GeneralException",
",",
"RangeNotSatisfiableException",
"{",
"String",
"username",
"=",
"params",
".",
"getUsername",
"(",
")",
";",
... | Retrieves external content via http or https.
@return A MIMETypedStream
@throws ModuleInitializationException
@throws GeneralException
@throws RangeNotSatisfiableException | [
"Retrieves",
"external",
"content",
"via",
"http",
"or",
"https",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultExternalContentManager.java#L352-L397 |
8,844 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultExternalContentManager.java | DefaultExternalContentManager.determineMimeType | private String determineMimeType(File file){
String mimeType = MIME_MAP.getContentType(file);
// if mimeType detection failed, fall back to the default
if (mimeType == null || mimeType.equalsIgnoreCase("")){
mimeType = DEFAULT_MIMETYPE;
}
return mimeType;
} | java | private String determineMimeType(File file){
String mimeType = MIME_MAP.getContentType(file);
// if mimeType detection failed, fall back to the default
if (mimeType == null || mimeType.equalsIgnoreCase("")){
mimeType = DEFAULT_MIMETYPE;
}
return mimeType;
} | [
"private",
"String",
"determineMimeType",
"(",
"File",
"file",
")",
"{",
"String",
"mimeType",
"=",
"MIME_MAP",
".",
"getContentType",
"(",
"file",
")",
";",
"// if mimeType detection failed, fall back to the default",
"if",
"(",
"mimeType",
"==",
"null",
"||",
"mim... | Determines the mime type of a given file
@param file for which the mime type needs to be detected
@return the detected mime type | [
"Determines",
"the",
"mime",
"type",
"of",
"a",
"given",
"file"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultExternalContentManager.java#L405-L412 |
8,845 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultExternalContentManager.java | DefaultExternalContentManager.isHEADRequest | private static boolean isHEADRequest(ContentManagerParams params) {
Context context = params.getContext();
if (context != null) {
String method =
context.getEnvironmentValue(
Constants.HTTP_REQUEST.METHOD.attributeId);
return "HEAD"... | java | private static boolean isHEADRequest(ContentManagerParams params) {
Context context = params.getContext();
if (context != null) {
String method =
context.getEnvironmentValue(
Constants.HTTP_REQUEST.METHOD.attributeId);
return "HEAD"... | [
"private",
"static",
"boolean",
"isHEADRequest",
"(",
"ContentManagerParams",
"params",
")",
"{",
"Context",
"context",
"=",
"params",
".",
"getContext",
"(",
")",
";",
"if",
"(",
"context",
"!=",
"null",
")",
"{",
"String",
"method",
"=",
"context",
".",
... | determine whether the context is a HEAD http request | [
"determine",
"whether",
"the",
"context",
"is",
"a",
"HEAD",
"http",
"request"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultExternalContentManager.java#L417-L426 |
8,846 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/utility/validate/process/ValidatorProcess.java | ValidatorProcess.openObjectSource | private static RemoteObjectSource openObjectSource(ServiceInfo serviceInfo) {
try {
return new RemoteObjectSource(serviceInfo);
} catch (ServiceException e) {
throw new IllegalStateException("Failed to initialize "
+ "the ValidatorProcess: ", e);
} cat... | java | private static RemoteObjectSource openObjectSource(ServiceInfo serviceInfo) {
try {
return new RemoteObjectSource(serviceInfo);
} catch (ServiceException e) {
throw new IllegalStateException("Failed to initialize "
+ "the ValidatorProcess: ", e);
} cat... | [
"private",
"static",
"RemoteObjectSource",
"openObjectSource",
"(",
"ServiceInfo",
"serviceInfo",
")",
"{",
"try",
"{",
"return",
"new",
"RemoteObjectSource",
"(",
"serviceInfo",
")",
";",
"}",
"catch",
"(",
"ServiceException",
"e",
")",
"{",
"throw",
"new",
"Il... | Open the connection to the Fedora server. | [
"Open",
"the",
"connection",
"to",
"the",
"Fedora",
"server",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/utility/validate/process/ValidatorProcess.java#L34-L44 |
8,847 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/utility/validate/process/ValidatorProcess.java | ValidatorProcess.getPidIterator | private static Iterator<String> getPidIterator(ValidatorProcessParameters parms,
RemoteObjectSource objectSource)
throws ObjectSourceException {
if (parms.getIteratorType() == IteratorType.FS_QUERY) {
return objectSource.findObjectPids(p... | java | private static Iterator<String> getPidIterator(ValidatorProcessParameters parms,
RemoteObjectSource objectSource)
throws ObjectSourceException {
if (parms.getIteratorType() == IteratorType.FS_QUERY) {
return objectSource.findObjectPids(p... | [
"private",
"static",
"Iterator",
"<",
"String",
">",
"getPidIterator",
"(",
"ValidatorProcessParameters",
"parms",
",",
"RemoteObjectSource",
"objectSource",
")",
"throws",
"ObjectSourceException",
"{",
"if",
"(",
"parms",
".",
"getIteratorType",
"(",
")",
"==",
"It... | The list of PIDs may come from a file, or from a query against the object
source. | [
"The",
"list",
"of",
"PIDs",
"may",
"come",
"from",
"a",
"file",
"or",
"from",
"a",
"query",
"against",
"the",
"object",
"source",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/utility/validate/process/ValidatorProcess.java#L50-L58 |
8,848 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/objecteditor/ServiceDescriptionPanel.java | ServiceDescriptionPanel.makePanel | private JPanel makePanel(String sDefPID) throws IOException {
JTextArea supportsMethodsTextArea = new JTextArea(" defines method");
supportsMethodsTextArea.setLineWrap(false);
supportsMethodsTextArea.setEditable(false);
supportsMethodsTextArea.setBackground(Administrator.BACKGROUND_CO... | java | private JPanel makePanel(String sDefPID) throws IOException {
JTextArea supportsMethodsTextArea = new JTextArea(" defines method");
supportsMethodsTextArea.setLineWrap(false);
supportsMethodsTextArea.setEditable(false);
supportsMethodsTextArea.setBackground(Administrator.BACKGROUND_CO... | [
"private",
"JPanel",
"makePanel",
"(",
"String",
"sDefPID",
")",
"throws",
"IOException",
"{",
"JTextArea",
"supportsMethodsTextArea",
"=",
"new",
"JTextArea",
"(",
"\" defines method\"",
")",
";",
"supportsMethodsTextArea",
".",
"setLineWrap",
"(",
"false",
")",
... | Create and return a new panel describing the service definition. Methods
dropdown "methodName - descriptionIfExists" Parameters "None." |
tabbedPane | [
"Create",
"and",
"return",
"a",
"new",
"panel",
"describing",
"the",
"service",
"definition",
".",
"Methods",
"dropdown",
"methodName",
"-",
"descriptionIfExists",
"Parameters",
"None",
".",
"|",
"tabbedPane"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/objecteditor/ServiceDescriptionPanel.java#L87-L145 |
8,849 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/utility/validate/types/DsCompositeModelDoc.java | DsCompositeModelDoc.parseBytesToDocument | private Document parseBytesToDocument(String pid, byte[] bytes)
throws InvalidContentModelException {
try {
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
DocumentBuilder builder = factor... | java | private Document parseBytesToDocument(String pid, byte[] bytes)
throws InvalidContentModelException {
try {
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
DocumentBuilder builder = factor... | [
"private",
"Document",
"parseBytesToDocument",
"(",
"String",
"pid",
",",
"byte",
"[",
"]",
"bytes",
")",
"throws",
"InvalidContentModelException",
"{",
"try",
"{",
"DocumentBuilderFactory",
"factory",
"=",
"DocumentBuilderFactory",
".",
"newInstance",
"(",
")",
";"... | Create a DOM document from the original XML. | [
"Create",
"a",
"DOM",
"document",
"from",
"the",
"original",
"XML",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/utility/validate/types/DsCompositeModelDoc.java#L76-L94 |
8,850 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/storage/types/DatastreamManagedContent.java | DatastreamManagedContent.putContentStream | public void putContentStream(MIMETypedStream stream) throws StreamIOException {
// TODO: refactor to use proper temp file management - FCREPO-718
// for now, write to new temp file, clean up existing location
String oldDSLocation = DSLocation;
try {
// note: don't use temp u... | java | public void putContentStream(MIMETypedStream stream) throws StreamIOException {
// TODO: refactor to use proper temp file management - FCREPO-718
// for now, write to new temp file, clean up existing location
String oldDSLocation = DSLocation;
try {
// note: don't use temp u... | [
"public",
"void",
"putContentStream",
"(",
"MIMETypedStream",
"stream",
")",
"throws",
"StreamIOException",
"{",
"// TODO: refactor to use proper temp file management - FCREPO-718",
"// for now, write to new temp file, clean up existing location",
"String",
"oldDSLocation",
"=",
"DSLoc... | Set the contents of this managed datastream by storing as a temp file. If the previous content
was stored in a temp file, clean up this file.
@param stream - the data to store in this datastream
@throws StreamIOException | [
"Set",
"the",
"contents",
"of",
"this",
"managed",
"datastream",
"by",
"storing",
"as",
"a",
"temp",
"file",
".",
"If",
"the",
"previous",
"content",
"was",
"stored",
"in",
"a",
"temp",
"file",
"clean",
"up",
"this",
"file",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/types/DatastreamManagedContent.java#L271-L303 |
8,851 | fcrepo3/fcrepo | fcrepo-installer/src/main/java/org/fcrepo/utilities/install/Database.java | Database.usesDOTable | protected boolean usesDOTable() throws Exception {
Connection conn = getConnection();
DatabaseMetaData dmd = conn.getMetaData();
// check if we need to update old table
ResultSet rs = dmd.getTables(null, null, "do%", null);
while (rs.next()) {
if (rs.getString("TABLE... | java | protected boolean usesDOTable() throws Exception {
Connection conn = getConnection();
DatabaseMetaData dmd = conn.getMetaData();
// check if we need to update old table
ResultSet rs = dmd.getTables(null, null, "do%", null);
while (rs.next()) {
if (rs.getString("TABLE... | [
"protected",
"boolean",
"usesDOTable",
"(",
")",
"throws",
"Exception",
"{",
"Connection",
"conn",
"=",
"getConnection",
"(",
")",
";",
"DatabaseMetaData",
"dmd",
"=",
"conn",
".",
"getMetaData",
"(",
")",
";",
"// check if we need to update old table",
"ResultSet",... | Determines whether or not the database has a table named "do".
@return true if the database contains a table with the name "do".
@throws Exception | [
"Determines",
"whether",
"or",
"not",
"the",
"database",
"has",
"a",
"table",
"named",
"do",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-installer/src/main/java/org/fcrepo/utilities/install/Database.java#L139-L153 |
8,852 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/AbstractXmlReader.java | AbstractXmlReader.readStartTag | protected XMLEvent readStartTag(XMLEventReader reader, QName tagName)
throws XMLStreamException, JournalException {
XMLEvent event = reader.nextTag();
if (!isStartTagEvent(event, tagName)) {
throw getNotStartTagException(tagName, event);
}
return event;
} | java | protected XMLEvent readStartTag(XMLEventReader reader, QName tagName)
throws XMLStreamException, JournalException {
XMLEvent event = reader.nextTag();
if (!isStartTagEvent(event, tagName)) {
throw getNotStartTagException(tagName, event);
}
return event;
} | [
"protected",
"XMLEvent",
"readStartTag",
"(",
"XMLEventReader",
"reader",
",",
"QName",
"tagName",
")",
"throws",
"XMLStreamException",
",",
"JournalException",
"{",
"XMLEvent",
"event",
"=",
"reader",
".",
"nextTag",
"(",
")",
";",
"if",
"(",
"!",
"isStartTagEv... | Read the next event and complain if it is not the Start Tag that we
expected. | [
"Read",
"the",
"next",
"event",
"and",
"complain",
"if",
"it",
"is",
"not",
"the",
"Start",
"Tag",
"that",
"we",
"expected",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/AbstractXmlReader.java#L44-L51 |
8,853 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/AbstractXmlReader.java | AbstractXmlReader.isStartTagEvent | protected boolean isStartTagEvent(XMLEvent event, QName tagName) {
return event.isStartElement()
&& event.asStartElement().getName().equals(tagName);
} | java | protected boolean isStartTagEvent(XMLEvent event, QName tagName) {
return event.isStartElement()
&& event.asStartElement().getName().equals(tagName);
} | [
"protected",
"boolean",
"isStartTagEvent",
"(",
"XMLEvent",
"event",
",",
"QName",
"tagName",
")",
"{",
"return",
"event",
".",
"isStartElement",
"(",
")",
"&&",
"event",
".",
"asStartElement",
"(",
")",
".",
"getName",
"(",
")",
".",
"equals",
"(",
"tagNa... | Test an event to see whether it is an start tag with the expected name. | [
"Test",
"an",
"event",
"to",
"see",
"whether",
"it",
"is",
"an",
"start",
"tag",
"with",
"the",
"expected",
"name",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/AbstractXmlReader.java#L56-L59 |
8,854 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/AbstractXmlReader.java | AbstractXmlReader.isEndTagEvent | protected boolean isEndTagEvent(XMLEvent event, QName tagName) {
return event.isEndElement()
&& event.asEndElement().getName().equals(tagName);
} | java | protected boolean isEndTagEvent(XMLEvent event, QName tagName) {
return event.isEndElement()
&& event.asEndElement().getName().equals(tagName);
} | [
"protected",
"boolean",
"isEndTagEvent",
"(",
"XMLEvent",
"event",
",",
"QName",
"tagName",
")",
"{",
"return",
"event",
".",
"isEndElement",
"(",
")",
"&&",
"event",
".",
"asEndElement",
"(",
")",
".",
"getName",
"(",
")",
".",
"equals",
"(",
"tagName",
... | Test an event to see whether it is an end tag with the expected name. | [
"Test",
"an",
"event",
"to",
"see",
"whether",
"it",
"is",
"an",
"end",
"tag",
"with",
"the",
"expected",
"name",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/AbstractXmlReader.java#L64-L67 |
8,855 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/AbstractXmlReader.java | AbstractXmlReader.getRequiredAttributeValue | protected String getRequiredAttributeValue(StartElement start,
QName attributeName)
throws JournalException {
Attribute mapNameAttribute = start.getAttributeByName(attributeName);
if (mapNameAttribute == null) {
throw new JournalExce... | java | protected String getRequiredAttributeValue(StartElement start,
QName attributeName)
throws JournalException {
Attribute mapNameAttribute = start.getAttributeByName(attributeName);
if (mapNameAttribute == null) {
throw new JournalExce... | [
"protected",
"String",
"getRequiredAttributeValue",
"(",
"StartElement",
"start",
",",
"QName",
"attributeName",
")",
"throws",
"JournalException",
"{",
"Attribute",
"mapNameAttribute",
"=",
"start",
".",
"getAttributeByName",
"(",
"attributeName",
")",
";",
"if",
"("... | Get the value of a given attribute from this start tag, or complain if
it's not there. | [
"Get",
"the",
"value",
"of",
"a",
"given",
"attribute",
"from",
"this",
"start",
"tag",
"or",
"complain",
"if",
"it",
"s",
"not",
"there",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/AbstractXmlReader.java#L73-L82 |
8,856 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/AbstractXmlReader.java | AbstractXmlReader.getOptionalAttributeValue | protected String getOptionalAttributeValue(StartElement start,
QName attributeName) {
Attribute mapNameAttribute = start.getAttributeByName(attributeName);
if (mapNameAttribute == null) {
return null;
} else {
return mapNameA... | java | protected String getOptionalAttributeValue(StartElement start,
QName attributeName) {
Attribute mapNameAttribute = start.getAttributeByName(attributeName);
if (mapNameAttribute == null) {
return null;
} else {
return mapNameA... | [
"protected",
"String",
"getOptionalAttributeValue",
"(",
"StartElement",
"start",
",",
"QName",
"attributeName",
")",
"{",
"Attribute",
"mapNameAttribute",
"=",
"start",
".",
"getAttributeByName",
"(",
"attributeName",
")",
";",
"if",
"(",
"mapNameAttribute",
"==",
... | Get the value of a given attribute from this start tag, or null if the
attribute is not there. | [
"Get",
"the",
"value",
"of",
"a",
"given",
"attribute",
"from",
"this",
"start",
"tag",
"or",
"null",
"if",
"the",
"attribute",
"is",
"not",
"there",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/AbstractXmlReader.java#L88-L96 |
8,857 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/AbstractXmlReader.java | AbstractXmlReader.getNotNextMemberOrEndOfGroupException | protected JournalException getNotNextMemberOrEndOfGroupException(QName groupTagName,
QName memberTagName,
XMLEvent event) {
return new JournalException("Expecting either '" +... | java | protected JournalException getNotNextMemberOrEndOfGroupException(QName groupTagName,
QName memberTagName,
XMLEvent event) {
return new JournalException("Expecting either '" +... | [
"protected",
"JournalException",
"getNotNextMemberOrEndOfGroupException",
"(",
"QName",
"groupTagName",
",",
"QName",
"memberTagName",
",",
"XMLEvent",
"event",
")",
"{",
"return",
"new",
"JournalException",
"(",
"\"Expecting either '\"",
"+",
"memberTagName",
"+",
"\"' s... | While traversing a group of member tags, we expected either the start of
another member tag, or the end of the group. | [
"While",
"traversing",
"a",
"group",
"of",
"member",
"tags",
"we",
"expected",
"either",
"the",
"start",
"of",
"another",
"member",
"tag",
"or",
"the",
"end",
"of",
"the",
"group",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/AbstractXmlReader.java#L154-L160 |
8,858 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/access/defaultdisseminator/ServiceMethodDispatcher.java | ServiceMethodDispatcher.invokeMethod | public Object invokeMethod(Object service_object,
String methodName,
Property[] userParms) throws ServerException {
Method method = null;
if (userParms == null) {
userParms = new Property[0];
}
Object[] parmValues ... | java | public Object invokeMethod(Object service_object,
String methodName,
Property[] userParms) throws ServerException {
Method method = null;
if (userParms == null) {
userParms = new Property[0];
}
Object[] parmValues ... | [
"public",
"Object",
"invokeMethod",
"(",
"Object",
"service_object",
",",
"String",
"methodName",
",",
"Property",
"[",
"]",
"userParms",
")",
"throws",
"ServerException",
"{",
"Method",
"method",
"=",
"null",
";",
"if",
"(",
"userParms",
"==",
"null",
")",
... | Invoke a method on an internal service. This is done using Java
reflection where the service is the target object of a dynamic method
request.
@param service_object
the target object of the service request
@param methodName
the method to invoke on the target object
@param userParms
parameters to the method to invoke o... | [
"Invoke",
"a",
"method",
"on",
"an",
"internal",
"service",
".",
"This",
"is",
"done",
"using",
"Java",
"reflection",
"where",
"the",
"service",
"is",
"the",
"target",
"object",
"of",
"a",
"dynamic",
"method",
"request",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/access/defaultdisseminator/ServiceMethodDispatcher.java#L38-L62 |
8,859 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/management/ManagementModule.java | ManagementModule.getProxyChain | private Management getProxyChain(Management m)
throws ModuleInitializationException {
try {
invocationHandlers = getInvocationHandlers();
return (Management) ProxyFactory.getProxy(m, invocationHandlers);
} catch (Exception e) {
throw new ModuleInitializati... | java | private Management getProxyChain(Management m)
throws ModuleInitializationException {
try {
invocationHandlers = getInvocationHandlers();
return (Management) ProxyFactory.getProxy(m, invocationHandlers);
} catch (Exception e) {
throw new ModuleInitializati... | [
"private",
"Management",
"getProxyChain",
"(",
"Management",
"m",
")",
"throws",
"ModuleInitializationException",
"{",
"try",
"{",
"invocationHandlers",
"=",
"getInvocationHandlers",
"(",
")",
";",
"return",
"(",
"Management",
")",
"ProxyFactory",
".",
"getProxy",
"... | Build a proxy chain as configured by the module parameters.
@param m The concrete Management implementation to wrap.
@return A proxy chain for Management
@throws ModuleInitializationException | [
"Build",
"a",
"proxy",
"chain",
"as",
"configured",
"by",
"the",
"module",
"parameters",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/management/ManagementModule.java#L575-L583 |
8,860 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/Attribute.java | Attribute.put | public String put(String optionName, String optionValue) {
options.put(optionName, optionValue);
return optionValue;
} | java | public String put(String optionName, String optionValue) {
options.put(optionName, optionValue);
return optionValue;
} | [
"public",
"String",
"put",
"(",
"String",
"optionName",
",",
"String",
"optionValue",
")",
"{",
"options",
".",
"put",
"(",
"optionName",
",",
"optionValue",
")",
";",
"return",
"optionValue",
";",
"}"
] | Add or update a config item for this attribute
@param optionName
@param optionValue
@return String option value | [
"Add",
"or",
"update",
"a",
"config",
"item",
"for",
"this",
"attribute"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/Attribute.java#L37-L40 |
8,861 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/utility/validate/remote/RemotePidIterator.java | RemotePidIterator.refreshStash | private void refreshStash() throws ObjectSourceException {
if (!stash.isEmpty()) {
return;
}
try {
if (SEARCH_NOT_STARTED.equals(token)) {
beginSearch();
} else if (token != null) {
resumeSearch();
}
} catch ... | java | private void refreshStash() throws ObjectSourceException {
if (!stash.isEmpty()) {
return;
}
try {
if (SEARCH_NOT_STARTED.equals(token)) {
beginSearch();
} else if (token != null) {
resumeSearch();
}
} catch ... | [
"private",
"void",
"refreshStash",
"(",
")",
"throws",
"ObjectSourceException",
"{",
"if",
"(",
"!",
"stash",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
";",
"}",
"try",
"{",
"if",
"(",
"SEARCH_NOT_STARTED",
".",
"equals",
"(",
"token",
")",
")",
"{... | Does the stash have anything in it? If it's empty, try to fill it. | [
"Does",
"the",
"stash",
"have",
"anything",
"in",
"it?",
"If",
"it",
"s",
"empty",
"try",
"to",
"fill",
"it",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/utility/validate/remote/RemotePidIterator.java#L110-L123 |
8,862 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/utility/validate/remote/RemotePidIterator.java | RemotePidIterator.beginSearch | private void beginSearch() throws RemoteException {
org.fcrepo.server.types.gen.FieldSearchQuery genFieldSearchQuery =
TypeUtility.convertFieldSearchQueryToGenFieldSearchQuery(query);
org.fcrepo.server.types.gen.FieldSearchResult searchResult =
apia.findObjects(org.fcrepo... | java | private void beginSearch() throws RemoteException {
org.fcrepo.server.types.gen.FieldSearchQuery genFieldSearchQuery =
TypeUtility.convertFieldSearchQueryToGenFieldSearchQuery(query);
org.fcrepo.server.types.gen.FieldSearchResult searchResult =
apia.findObjects(org.fcrepo... | [
"private",
"void",
"beginSearch",
"(",
")",
"throws",
"RemoteException",
"{",
"org",
".",
"fcrepo",
".",
"server",
".",
"types",
".",
"gen",
".",
"FieldSearchQuery",
"genFieldSearchQuery",
"=",
"TypeUtility",
".",
"convertFieldSearchQueryToGenFieldSearchQuery",
"(",
... | We haven't tried searching yet. Do so, and set the stash and token from
the results. | [
"We",
"haven",
"t",
"tried",
"searching",
"yet",
".",
"Do",
"so",
"and",
"set",
"the",
"stash",
"and",
"token",
"from",
"the",
"results",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/utility/validate/remote/RemotePidIterator.java#L129-L143 |
8,863 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/utility/validate/remote/RemotePidIterator.java | RemotePidIterator.resumeSearch | private void resumeSearch() throws RemoteException {
org.fcrepo.server.types.gen.FieldSearchResult searchResult =
apia.resumeFindObjects(token);
FieldSearchResult fsr =
TypeUtility
.convertGenFieldSearchResultToFieldSearchResult(searchResult);
... | java | private void resumeSearch() throws RemoteException {
org.fcrepo.server.types.gen.FieldSearchResult searchResult =
apia.resumeFindObjects(token);
FieldSearchResult fsr =
TypeUtility
.convertGenFieldSearchResultToFieldSearchResult(searchResult);
... | [
"private",
"void",
"resumeSearch",
"(",
")",
"throws",
"RemoteException",
"{",
"org",
".",
"fcrepo",
".",
"server",
".",
"types",
".",
"gen",
".",
"FieldSearchResult",
"searchResult",
"=",
"apia",
".",
"resumeFindObjects",
"(",
"token",
")",
";",
"FieldSearchR... | We are already searching. Use the stored token to continue the search,
and set the stash and token from the results. | [
"We",
"are",
"already",
"searching",
".",
"Use",
"the",
"stored",
"token",
"to",
"continue",
"the",
"search",
"and",
"set",
"the",
"stash",
"and",
"token",
"from",
"the",
"results",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/utility/validate/remote/RemotePidIterator.java#L149-L159 |
8,864 | fcrepo3/fcrepo | fcrepo-common/src/main/java/org/fcrepo/utilities/xml/XercesXmlSerializers.java | XercesXmlSerializers.writeXmlNoSpace | public static void writeXmlNoSpace(Document doc, String encoding, Writer out)
throws IOException {
XMLSerializer ser = new XMLSerializer(out, getXmlNoSpace(encoding));
ser.serialize(doc);
out.close();
} | java | public static void writeXmlNoSpace(Document doc, String encoding, Writer out)
throws IOException {
XMLSerializer ser = new XMLSerializer(out, getXmlNoSpace(encoding));
ser.serialize(doc);
out.close();
} | [
"public",
"static",
"void",
"writeXmlNoSpace",
"(",
"Document",
"doc",
",",
"String",
"encoding",
",",
"Writer",
"out",
")",
"throws",
"IOException",
"{",
"XMLSerializer",
"ser",
"=",
"new",
"XMLSerializer",
"(",
"out",
",",
"getXmlNoSpace",
"(",
"encoding",
"... | Serialize the dom Document with no preserved space between elements,
but without indenting, line wrapping, omission of XML declaration, or
omission of doctype
@param doc
@param encoding
@param out
@throws IOException | [
"Serialize",
"the",
"dom",
"Document",
"with",
"no",
"preserved",
"space",
"between",
"elements",
"but",
"without",
"indenting",
"line",
"wrapping",
"omission",
"of",
"XML",
"declaration",
"or",
"omission",
"of",
"doctype"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-common/src/main/java/org/fcrepo/utilities/xml/XercesXmlSerializers.java#L31-L37 |
8,865 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/FedoraClient.java | FedoraClient.uploadFile | public String uploadFile(File file) throws IOException {
HttpPost post = null;
try {
// prepare the post method
post = new HttpPost(getUploadURL());
post.getParams().setParameter("Connection", "Keep-Alive");
// add the file part
MultipartEntit... | java | public String uploadFile(File file) throws IOException {
HttpPost post = null;
try {
// prepare the post method
post = new HttpPost(getUploadURL());
post.getParams().setParameter("Connection", "Keep-Alive");
// add the file part
MultipartEntit... | [
"public",
"String",
"uploadFile",
"(",
"File",
"file",
")",
"throws",
"IOException",
"{",
"HttpPost",
"post",
"=",
"null",
";",
"try",
"{",
"// prepare the post method",
"post",
"=",
"new",
"HttpPost",
"(",
"getUploadURL",
"(",
")",
")",
";",
"post",
".",
... | Upload the given file to Fedora's upload interface via HTTP POST.
@return the temporary id which can then be passed to API-M requests as a
URL. It will look like uploaded://123 | [
"Upload",
"the",
"given",
"file",
"to",
"Fedora",
"s",
"upload",
"interface",
"via",
"HTTP",
"POST",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/FedoraClient.java#L232-L271 |
8,866 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/FedoraClient.java | FedoraClient.replaceNewlines | private static String replaceNewlines(String in, String replaceWith) {
return in.replaceAll("\r", replaceWith).replaceAll("\n", replaceWith);
} | java | private static String replaceNewlines(String in, String replaceWith) {
return in.replaceAll("\r", replaceWith).replaceAll("\n", replaceWith);
} | [
"private",
"static",
"String",
"replaceNewlines",
"(",
"String",
"in",
",",
"String",
"replaceWith",
")",
"{",
"return",
"in",
".",
"replaceAll",
"(",
"\"\\r\"",
",",
"replaceWith",
")",
".",
"replaceAll",
"(",
"\"\\n\"",
",",
"replaceWith",
")",
";",
"}"
] | Replace newlines with the given string. | [
"Replace",
"newlines",
"with",
"the",
"given",
"string",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/FedoraClient.java#L276-L278 |
8,867 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/FedoraClient.java | FedoraClient.getUploadURL | public synchronized String getUploadURL() throws IOException {
if (m_uploadURL != null) {
return m_uploadURL;
} else {
m_uploadURL = m_baseURL + "management/upload";
if (m_uploadURL.startsWith("http:")) {
URL redirectURL = getRedirectURL(m_uploadURL);
... | java | public synchronized String getUploadURL() throws IOException {
if (m_uploadURL != null) {
return m_uploadURL;
} else {
m_uploadURL = m_baseURL + "management/upload";
if (m_uploadURL.startsWith("http:")) {
URL redirectURL = getRedirectURL(m_uploadURL);
... | [
"public",
"synchronized",
"String",
"getUploadURL",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"m_uploadURL",
"!=",
"null",
")",
"{",
"return",
"m_uploadURL",
";",
"}",
"else",
"{",
"m_uploadURL",
"=",
"m_baseURL",
"+",
"\"management/upload\"",
";",
"i... | Get the URL to which API-M upload requests will be sent. | [
"Get",
"the",
"URL",
"to",
"which",
"API",
"-",
"M",
"upload",
"requests",
"will",
"be",
"sent",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/FedoraClient.java#L283-L296 |
8,868 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/FedoraClient.java | FedoraClient.getServerVersion | public String getServerVersion() throws IOException {
// only do this once -- future invocations will use the known value
if (m_serverVersion == null) {
// Make the APIA call for describe repository
// and make sure that HTTP 302 status is handled.
String desc = getRe... | java | public String getServerVersion() throws IOException {
// only do this once -- future invocations will use the known value
if (m_serverVersion == null) {
// Make the APIA call for describe repository
// and make sure that HTTP 302 status is handled.
String desc = getRe... | [
"public",
"String",
"getServerVersion",
"(",
")",
"throws",
"IOException",
"{",
"// only do this once -- future invocations will use the known value",
"if",
"(",
"m_serverVersion",
"==",
"null",
")",
"{",
"// Make the APIA call for describe repository",
"// and make sure that HTTP ... | Get the version reported by the remote Fedora server. | [
"Get",
"the",
"version",
"reported",
"by",
"the",
"remote",
"Fedora",
"server",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/FedoraClient.java#L673-L692 |
8,869 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/FedoraClient.java | FedoraClient.getServerDate | public Date getServerDate() throws IOException {
HttpInputStream in = get("/describe", false, false);
String dateString = null;
try {
Header header = in.getResponseHeader("Date");
if (header == null) {
throw new IOException("Date was not supplied in HTTP r... | java | public Date getServerDate() throws IOException {
HttpInputStream in = get("/describe", false, false);
String dateString = null;
try {
Header header = in.getResponseHeader("Date");
if (header == null) {
throw new IOException("Date was not supplied in HTTP r... | [
"public",
"Date",
"getServerDate",
"(",
")",
"throws",
"IOException",
"{",
"HttpInputStream",
"in",
"=",
"get",
"(",
"\"/describe\"",
",",
"false",
",",
"false",
")",
";",
"String",
"dateString",
"=",
"null",
";",
"try",
"{",
"Header",
"header",
"=",
"in",... | Return the current date as reported by the Fedora server.
@throws IOException
if the HTTP Date header is not provided by the server for any
reason, or it is in the wrong format. | [
"Return",
"the",
"current",
"date",
"as",
"reported",
"by",
"the",
"Fedora",
"server",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/FedoraClient.java#L701-L725 |
8,870 | fcrepo3/fcrepo | fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/FedoraClient.java | FedoraClient.getRedirectURL | private URL getRedirectURL(String location) throws IOException {
HttpInputStream in = get(location, false, false);
try {
if (in.getStatusCode() == 302) {
Header h = in.getResponseHeader("location");
if (h != null) {
return new URL(h.getValu... | java | private URL getRedirectURL(String location) throws IOException {
HttpInputStream in = get(location, false, false);
try {
if (in.getStatusCode() == 302) {
Header h = in.getResponseHeader("location");
if (h != null) {
return new URL(h.getValu... | [
"private",
"URL",
"getRedirectURL",
"(",
"String",
"location",
")",
"throws",
"IOException",
"{",
"HttpInputStream",
"in",
"=",
"get",
"(",
"location",
",",
"false",
",",
"false",
")",
";",
"try",
"{",
"if",
"(",
"in",
".",
"getStatusCode",
"(",
")",
"==... | Ping the given endpoint to see if an HTTP 302 status code is returned. If
so, return the location given in the HTTP response header. If not, return
null. | [
"Ping",
"the",
"given",
"endpoint",
"to",
"see",
"if",
"an",
"HTTP",
"302",
"status",
"code",
"is",
"returned",
".",
"If",
"so",
"return",
"the",
"location",
"given",
"in",
"the",
"HTTP",
"response",
"header",
".",
"If",
"not",
"return",
"null",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-client/fcrepo-client-admin/src/main/java/org/fcrepo/client/FedoraClient.java#L863-L879 |
8,871 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/XPathPolicyIndex.java | XPathPolicyIndex.getXpath | protected static String getXpath(Map<String, Collection<AttributeBean>> attributeMap) {
StringBuilder sb = new StringBuilder();
getXpath(attributeMap, sb);
return sb.toString();
} | java | protected static String getXpath(Map<String, Collection<AttributeBean>> attributeMap) {
StringBuilder sb = new StringBuilder();
getXpath(attributeMap, sb);
return sb.toString();
} | [
"protected",
"static",
"String",
"getXpath",
"(",
"Map",
"<",
"String",
",",
"Collection",
"<",
"AttributeBean",
">",
">",
"attributeMap",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"getXpath",
"(",
"attributeMap",
",",
"sb"... | Creates an XPath query from the attributes
@param attributeMap attributes from request
@return String | [
"Creates",
"an",
"XPath",
"query",
"from",
"the",
"attributes"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/XPathPolicyIndex.java#L119-L123 |
8,872 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java | JMSManager.createDestination | public Destination createDestination(String name,
DestinationType type,
boolean fTransacted,
int ackMode) throws MessagingException {
// If the destination already exists, just return it
JMSDestination ... | java | public Destination createDestination(String name,
DestinationType type,
boolean fTransacted,
int ackMode) throws MessagingException {
// If the destination already exists, just return it
JMSDestination ... | [
"public",
"Destination",
"createDestination",
"(",
"String",
"name",
",",
"DestinationType",
"type",
",",
"boolean",
"fTransacted",
",",
"int",
"ackMode",
")",
"throws",
"MessagingException",
"{",
"// If the destination already exists, just return it",
"JMSDestination",
"jm... | Creates a Destination if the Destination has not already been created.
@param name - the name of the destination to create
@param type - the destination type (topic or queue)
@param fTransacted - determines whether the session will maintain transactions
@param ackMode - determines the session acknowledgment mode
@thro... | [
"Creates",
"a",
"Destination",
"if",
"the",
"Destination",
"has",
"not",
"already",
"been",
"created",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java#L182-L229 |
8,873 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java | JMSManager.send | public void send(String destName, Message msg) throws MessagingException {
JMSDestination jmsDest = getJMSDestination(destName);
// Make sure we have a message producer created for this destination
setupProducer(jmsDest);
// Send the message for this destination
try {
... | java | public void send(String destName, Message msg) throws MessagingException {
JMSDestination jmsDest = getJMSDestination(destName);
// Make sure we have a message producer created for this destination
setupProducer(jmsDest);
// Send the message for this destination
try {
... | [
"public",
"void",
"send",
"(",
"String",
"destName",
",",
"Message",
"msg",
")",
"throws",
"MessagingException",
"{",
"JMSDestination",
"jmsDest",
"=",
"getJMSDestination",
"(",
"destName",
")",
";",
"// Make sure we have a message producer created for this destination",
... | Allows the caller to send a Message object to a named destination | [
"Allows",
"the",
"caller",
"to",
"send",
"a",
"Message",
"object",
"to",
"a",
"named",
"destination"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java#L488-L504 |
8,874 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java | JMSManager.send | public void send(Destination dest, Message msg) throws MessagingException {
try {
Session s =
connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageProducer p = s.createProducer(dest);
p.send(msg);
s.close();
} catch (JMSExc... | java | public void send(Destination dest, Message msg) throws MessagingException {
try {
Session s =
connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageProducer p = s.createProducer(dest);
p.send(msg);
s.close();
} catch (JMSExc... | [
"public",
"void",
"send",
"(",
"Destination",
"dest",
",",
"Message",
"msg",
")",
"throws",
"MessagingException",
"{",
"try",
"{",
"Session",
"s",
"=",
"connection",
".",
"createSession",
"(",
"false",
",",
"Session",
".",
"AUTO_ACKNOWLEDGE",
")",
";",
"Mess... | Allows the caller to send a Message object to a destination | [
"Allows",
"the",
"caller",
"to",
"send",
"a",
"Message",
"object",
"to",
"a",
"destination"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java#L509-L523 |
8,875 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java | JMSManager.send | public void send(String destName, String messageText)
throws MessagingException {
this.send(destName, (Serializable) messageText);
} | java | public void send(String destName, String messageText)
throws MessagingException {
this.send(destName, (Serializable) messageText);
} | [
"public",
"void",
"send",
"(",
"String",
"destName",
",",
"String",
"messageText",
")",
"throws",
"MessagingException",
"{",
"this",
".",
"send",
"(",
"destName",
",",
"(",
"Serializable",
")",
"messageText",
")",
";",
"}"
] | Allows the caller to send text to a destination | [
"Allows",
"the",
"caller",
"to",
"send",
"text",
"to",
"a",
"destination"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java#L551-L554 |
8,876 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java | JMSManager.stop | public void stop(String destName) throws MessagingException {
try {
// Look for an existing destination for the given destination
//
JMSDestination jmsDest =
jmsDestinations.get(destName);
if (jmsDest != null) {
// Close out all... | java | public void stop(String destName) throws MessagingException {
try {
// Look for an existing destination for the given destination
//
JMSDestination jmsDest =
jmsDestinations.get(destName);
if (jmsDest != null) {
// Close out all... | [
"public",
"void",
"stop",
"(",
"String",
"destName",
")",
"throws",
"MessagingException",
"{",
"try",
"{",
"// Look for an existing destination for the given destination",
"//",
"JMSDestination",
"jmsDest",
"=",
"jmsDestinations",
".",
"get",
"(",
"destName",
")",
";",
... | Stops producers and consumers on a given destination.
This has no effect on durable subscriptions.
@param destName
@throws MessagingException | [
"Stops",
"producers",
"and",
"consumers",
"on",
"a",
"given",
"destination",
".",
"This",
"has",
"no",
"effect",
"on",
"durable",
"subscriptions",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java#L563-L598 |
8,877 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java | JMSManager.stopDurable | public void stopDurable(String subscriptionName) throws MessagingException {
try {
MessageConsumer durableSubscriber =
durableSubscriptions.get(subscriptionName);
if (durableSubscriber != null) {
durableSubscriber.close();
}
} catch... | java | public void stopDurable(String subscriptionName) throws MessagingException {
try {
MessageConsumer durableSubscriber =
durableSubscriptions.get(subscriptionName);
if (durableSubscriber != null) {
durableSubscriber.close();
}
} catch... | [
"public",
"void",
"stopDurable",
"(",
"String",
"subscriptionName",
")",
"throws",
"MessagingException",
"{",
"try",
"{",
"MessageConsumer",
"durableSubscriber",
"=",
"durableSubscriptions",
".",
"get",
"(",
"subscriptionName",
")",
";",
"if",
"(",
"durableSubscriber"... | Stops a durable message consumer. Note that this is not
the same as unsubscribing. When a durable message consumer is
restarted all messages received since it was stopped will be
delivered.
@param subscriptionName - the name of the subscription
@throws MessagingException | [
"Stops",
"a",
"durable",
"message",
"consumer",
".",
"Note",
"that",
"this",
"is",
"not",
"the",
"same",
"as",
"unsubscribing",
".",
"When",
"a",
"durable",
"message",
"consumer",
"is",
"restarted",
"all",
"messages",
"received",
"since",
"it",
"was",
"stopp... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java#L609-L622 |
8,878 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java | JMSManager.unsubscribeDurable | public void unsubscribeDurable(String subscriptionName)
throws MessagingException {
try {
Session session =
connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageConsumer consumer = durableSubscriptions.get(subscriptionName);
if(consume... | java | public void unsubscribeDurable(String subscriptionName)
throws MessagingException {
try {
Session session =
connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageConsumer consumer = durableSubscriptions.get(subscriptionName);
if(consume... | [
"public",
"void",
"unsubscribeDurable",
"(",
"String",
"subscriptionName",
")",
"throws",
"MessagingException",
"{",
"try",
"{",
"Session",
"session",
"=",
"connection",
".",
"createSession",
"(",
"false",
",",
"Session",
".",
"AUTO_ACKNOWLEDGE",
")",
";",
"Messag... | Removes the durable subscription with the given name.
@param subscriptionName - name of the durable subscription
@throws MessagingException | [
"Removes",
"the",
"durable",
"subscription",
"with",
"the",
"given",
"name",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java#L630-L647 |
8,879 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java | JMSManager.getDestination | public Destination getDestination(String destName)
throws MessagingException {
Destination destination = null;
JMSDestination jmsDest = getJMSDestination(destName);
if(jmsDest != null) {
destination = jmsDest.destination;
}
return destination;
} | java | public Destination getDestination(String destName)
throws MessagingException {
Destination destination = null;
JMSDestination jmsDest = getJMSDestination(destName);
if(jmsDest != null) {
destination = jmsDest.destination;
}
return destination;
} | [
"public",
"Destination",
"getDestination",
"(",
"String",
"destName",
")",
"throws",
"MessagingException",
"{",
"Destination",
"destination",
"=",
"null",
";",
"JMSDestination",
"jmsDest",
"=",
"getJMSDestination",
"(",
"destName",
")",
";",
"if",
"(",
"jmsDest",
... | Gets the named Destination if it has been created.
@param destName
@return the Destination object for the specified destination
name or null if the destination does not exist
@throws MessagingException | [
"Gets",
"the",
"named",
"Destination",
"if",
"it",
"has",
"been",
"created",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java#L738-L746 |
8,880 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java | JMSManager.getDestinations | public List<Destination> getDestinations() {
List<Destination> destinations = new ArrayList<Destination>();
Iterator<JMSDestination> destinationIterator =
jmsDestinations.values().iterator();
while(destinationIterator.hasNext()) {
destinations.add(destinationIterator.next... | java | public List<Destination> getDestinations() {
List<Destination> destinations = new ArrayList<Destination>();
Iterator<JMSDestination> destinationIterator =
jmsDestinations.values().iterator();
while(destinationIterator.hasNext()) {
destinations.add(destinationIterator.next... | [
"public",
"List",
"<",
"Destination",
">",
"getDestinations",
"(",
")",
"{",
"List",
"<",
"Destination",
">",
"destinations",
"=",
"new",
"ArrayList",
"<",
"Destination",
">",
"(",
")",
";",
"Iterator",
"<",
"JMSDestination",
">",
"destinationIterator",
"=",
... | Provides a listing of the currently available destinations
@return destination list | [
"Provides",
"a",
"listing",
"of",
"the",
"currently",
"available",
"destinations"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java#L752-L760 |
8,881 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java | JMSManager.connectToJMS | protected void connectToJMS(String clientId) throws MessagingException {
// Check to see if already connected
//
if (connected == true) return;
try {
// Get a JMS Connection
//
connection = getConnection();
if(clientId != null) {
... | java | protected void connectToJMS(String clientId) throws MessagingException {
// Check to see if already connected
//
if (connected == true) return;
try {
// Get a JMS Connection
//
connection = getConnection();
if(clientId != null) {
... | [
"protected",
"void",
"connectToJMS",
"(",
"String",
"clientId",
")",
"throws",
"MessagingException",
"{",
"// Check to see if already connected",
"//",
"if",
"(",
"connected",
"==",
"true",
")",
"return",
";",
"try",
"{",
"// Get a JMS Connection",
"//",
"connection",... | Internal worker methods | [
"Internal",
"worker",
"methods"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java#L803-L823 |
8,882 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/PasswordCipher.java | PasswordCipher.encipher | public static String encipher(String key, String clearText) {
if (key == null) {
throw new NullPointerException("key may not be null");
}
if (key == "") {
return clearText;
}
if (clearText == null) {
return null;
}
byte[] key... | java | public static String encipher(String key, String clearText) {
if (key == null) {
throw new NullPointerException("key may not be null");
}
if (key == "") {
return clearText;
}
if (clearText == null) {
return null;
}
byte[] key... | [
"public",
"static",
"String",
"encipher",
"(",
"String",
"key",
",",
"String",
"clearText",
")",
"{",
"if",
"(",
"key",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"key may not be null\"",
")",
";",
"}",
"if",
"(",
"key",
"==",
... | Use the key to produce a ciphered String from the clearText. | [
"Use",
"the",
"key",
"to",
"produce",
"a",
"ciphered",
"String",
"from",
"the",
"clearText",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/PasswordCipher.java#L36-L53 |
8,883 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/PasswordCipher.java | PasswordCipher.decipher | public static String decipher(String key,
String cipherText,
String cipherType) {
if (key == null || key == "") {
return cipherText;
}
if (cipherText == null) {
return null;
}
if (cipher... | java | public static String decipher(String key,
String cipherText,
String cipherType) {
if (key == null || key == "") {
return cipherText;
}
if (cipherText == null) {
return null;
}
if (cipher... | [
"public",
"static",
"String",
"decipher",
"(",
"String",
"key",
",",
"String",
"cipherText",
",",
"String",
"cipherType",
")",
"{",
"if",
"(",
"key",
"==",
"null",
"||",
"key",
"==",
"\"\"",
")",
"{",
"return",
"cipherText",
";",
"}",
"if",
"(",
"ciphe... | Use the key to produce a clear text String from the cipherText. If no key
is provided, or if no type is specified, just return the text as is. | [
"Use",
"the",
"key",
"to",
"produce",
"a",
"clear",
"text",
"String",
"from",
"the",
"cipherText",
".",
"If",
"no",
"key",
"is",
"provided",
"or",
"if",
"no",
"type",
"is",
"specified",
"just",
"return",
"the",
"text",
"as",
"is",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/PasswordCipher.java#L59-L82 |
8,884 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/PasswordCipher.java | PasswordCipher.convertKeyToByteArray | private static byte[] convertKeyToByteArray(String key) {
byte[] result = new byte[key.length()];
for (int i = 0; i < result.length; i++) {
char thisChar = key.charAt(i);
result[i] = (byte) (thisChar >>> 8 & 0xFF ^ thisChar & 0xFF);
}
return result;
} | java | private static byte[] convertKeyToByteArray(String key) {
byte[] result = new byte[key.length()];
for (int i = 0; i < result.length; i++) {
char thisChar = key.charAt(i);
result[i] = (byte) (thisChar >>> 8 & 0xFF ^ thisChar & 0xFF);
}
return result;
} | [
"private",
"static",
"byte",
"[",
"]",
"convertKeyToByteArray",
"(",
"String",
"key",
")",
"{",
"byte",
"[",
"]",
"result",
"=",
"new",
"byte",
"[",
"key",
".",
"length",
"(",
")",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"resul... | Convert the key to a byte array by compressing the 16-bit characters to
bytes. This XOR compression insures that the top 8 bits are still
significant, so a key of "\u0020" yields a different cipher than a key of
"\u0120". | [
"Convert",
"the",
"key",
"to",
"a",
"byte",
"array",
"by",
"compressing",
"the",
"16",
"-",
"bit",
"characters",
"to",
"bytes",
".",
"This",
"XOR",
"compression",
"insures",
"that",
"the",
"top",
"8",
"bits",
"are",
"still",
"significant",
"so",
"a",
"ke... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/PasswordCipher.java#L90-L97 |
8,885 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/PasswordCipher.java | PasswordCipher.convertClearTextToByteArray | private static byte[] convertClearTextToByteArray(String clearText) {
byte[] result = new byte[clearText.length() * 2];
for (int i = 0; i < clearText.length(); i++) {
char thisChar = clearText.charAt(i);
int pos = i * 2;
result[pos] = (byte) (thisChar >>> 8 & 0xFF);
... | java | private static byte[] convertClearTextToByteArray(String clearText) {
byte[] result = new byte[clearText.length() * 2];
for (int i = 0; i < clearText.length(); i++) {
char thisChar = clearText.charAt(i);
int pos = i * 2;
result[pos] = (byte) (thisChar >>> 8 & 0xFF);
... | [
"private",
"static",
"byte",
"[",
"]",
"convertClearTextToByteArray",
"(",
"String",
"clearText",
")",
"{",
"byte",
"[",
"]",
"result",
"=",
"new",
"byte",
"[",
"clearText",
".",
"length",
"(",
")",
"*",
"2",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0... | Convert the clear text to a byte array by splitting each 16-bit character
into 2 bytes. This insures that no data is lost. | [
"Convert",
"the",
"clear",
"text",
"to",
"a",
"byte",
"array",
"by",
"splitting",
"each",
"16",
"-",
"bit",
"character",
"into",
"2",
"bytes",
".",
"This",
"insures",
"that",
"no",
"data",
"is",
"lost",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/PasswordCipher.java#L103-L112 |
8,886 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/PasswordCipher.java | PasswordCipher.sanityCheckOnCipherBytes | private static void sanityCheckOnCipherBytes(String cipherText,
byte[] cipherBytes) {
if (cipherBytes.length % 2 != 0) {
throw new IllegalStateException("Ciphered text decodes to an odd number of bytes! Text='"
+ cipherText
... | java | private static void sanityCheckOnCipherBytes(String cipherText,
byte[] cipherBytes) {
if (cipherBytes.length % 2 != 0) {
throw new IllegalStateException("Ciphered text decodes to an odd number of bytes! Text='"
+ cipherText
... | [
"private",
"static",
"void",
"sanityCheckOnCipherBytes",
"(",
"String",
"cipherText",
",",
"byte",
"[",
"]",
"cipherBytes",
")",
"{",
"if",
"(",
"cipherBytes",
".",
"length",
"%",
"2",
"!=",
"0",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Cip... | If the cipher text decodes to an odd number of bytes, we can't go on! | [
"If",
"the",
"cipher",
"text",
"decodes",
"to",
"an",
"odd",
"number",
"of",
"bytes",
"we",
"can",
"t",
"go",
"on!"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/PasswordCipher.java#L117-L126 |
8,887 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/PasswordCipher.java | PasswordCipher.convertByteArrayToClearText | private static String convertByteArrayToClearText(byte[] bytes) {
StringBuffer result = new StringBuffer();
for (int i = 0; i < bytes.length; i += 2) {
char thisChar = (char) (bytes[i] << 8 | bytes[i + 1]);
result.append(thisChar);
}
return result.toString();
... | java | private static String convertByteArrayToClearText(byte[] bytes) {
StringBuffer result = new StringBuffer();
for (int i = 0; i < bytes.length; i += 2) {
char thisChar = (char) (bytes[i] << 8 | bytes[i + 1]);
result.append(thisChar);
}
return result.toString();
... | [
"private",
"static",
"String",
"convertByteArrayToClearText",
"(",
"byte",
"[",
"]",
"bytes",
")",
"{",
"StringBuffer",
"result",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"bytes",
".",
"length",
";",
"... | Convert a byte array to text by joining each two bytes into a 16-bit
character. | [
"Convert",
"a",
"byte",
"array",
"to",
"text",
"by",
"joining",
"each",
"two",
"bytes",
"into",
"a",
"16",
"-",
"bit",
"character",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/PasswordCipher.java#L132-L139 |
8,888 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/PasswordCipher.java | PasswordCipher.applyCipher | private static byte[] applyCipher(byte[] keyBytes, byte[] textBytes) {
byte[] result = new byte[textBytes.length];
for (int i = 0; i < result.length; i++) {
int keyPos = i % keyBytes.length;
result[i] = (byte) (textBytes[i] ^ keyBytes[keyPos]);
}
return result;
... | java | private static byte[] applyCipher(byte[] keyBytes, byte[] textBytes) {
byte[] result = new byte[textBytes.length];
for (int i = 0; i < result.length; i++) {
int keyPos = i % keyBytes.length;
result[i] = (byte) (textBytes[i] ^ keyBytes[keyPos]);
}
return result;
... | [
"private",
"static",
"byte",
"[",
"]",
"applyCipher",
"(",
"byte",
"[",
"]",
"keyBytes",
",",
"byte",
"[",
"]",
"textBytes",
")",
"{",
"byte",
"[",
"]",
"result",
"=",
"new",
"byte",
"[",
"textBytes",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i"... | The same algorithm applies for enciphering or deciphering. Go through the
text, XORing with successive bytes of the key. If you apply it twice, you
get the original text back. | [
"The",
"same",
"algorithm",
"applies",
"for",
"enciphering",
"or",
"deciphering",
".",
"Go",
"through",
"the",
"text",
"XORing",
"with",
"successive",
"bytes",
"of",
"the",
"key",
".",
"If",
"you",
"apply",
"it",
"twice",
"you",
"get",
"the",
"original",
"... | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/PasswordCipher.java#L146-L153 |
8,889 | fcrepo3/fcrepo | fcrepo-security/fcrepo-security-jaas/src/main/java/org/fcrepo/server/security/jaas/auth/module/XmlUsersFileModule.java | XmlUsersFileModule.getUserDocument | private static Document getUserDocument() throws Exception {
if (userDoc == null || userFileParsed != userFile.lastModified() || userFileBytesLoaded != userFile.length()) {
synchronized(XmlUsersFileModule.class) {
if (userDoc == null || userFileParsed != userFile.lastModified() || us... | java | private static Document getUserDocument() throws Exception {
if (userDoc == null || userFileParsed != userFile.lastModified() || userFileBytesLoaded != userFile.length()) {
synchronized(XmlUsersFileModule.class) {
if (userDoc == null || userFileParsed != userFile.lastModified() || us... | [
"private",
"static",
"Document",
"getUserDocument",
"(",
")",
"throws",
"Exception",
"{",
"if",
"(",
"userDoc",
"==",
"null",
"||",
"userFileParsed",
"!=",
"userFile",
".",
"lastModified",
"(",
")",
"||",
"userFileBytesLoaded",
"!=",
"userFile",
".",
"length",
... | Quick and dirty caching.
@return DOM of a parsed user file
@throws Exception | [
"Quick",
"and",
"dirty",
"caching",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-jaas/src/main/java/org/fcrepo/server/security/jaas/auth/module/XmlUsersFileModule.java#L258-L269 |
8,890 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multifile/MultiFileJournalHelper.java | MultiFileJournalHelper.getRequiredParameter | static String getRequiredParameter(Map<String, String> parameters,
String parameterName)
throws JournalException {
String value = parameters.get(parameterName);
if (value == null) {
throw new JournalException("'" + parameterName + "' is requ... | java | static String getRequiredParameter(Map<String, String> parameters,
String parameterName)
throws JournalException {
String value = parameters.get(parameterName);
if (value == null) {
throw new JournalException("'" + parameterName + "' is requ... | [
"static",
"String",
"getRequiredParameter",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"parameters",
",",
"String",
"parameterName",
")",
"throws",
"JournalException",
"{",
"String",
"value",
"=",
"parameters",
".",
"get",
"(",
"parameterName",
")",
";",
"... | Get the requested parameter, or throw an exception if it is not found. | [
"Get",
"the",
"requested",
"parameter",
"or",
"throw",
"an",
"exception",
"if",
"it",
"is",
"not",
"found",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multifile/MultiFileJournalHelper.java#L36-L44 |
8,891 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multifile/MultiFileJournalHelper.java | MultiFileJournalHelper.parseParametersForPollingInterval | static long parseParametersForPollingInterval(Map<String, String> parameters)
throws JournalException {
String intervalString =
parameters.get(PARAMETER_FOLLOW_POLLING_INTERVAL);
if (intervalString == null) {
intervalString = DEFAULT_FOLLOW_POLLING_INTERVAL;
... | java | static long parseParametersForPollingInterval(Map<String, String> parameters)
throws JournalException {
String intervalString =
parameters.get(PARAMETER_FOLLOW_POLLING_INTERVAL);
if (intervalString == null) {
intervalString = DEFAULT_FOLLOW_POLLING_INTERVAL;
... | [
"static",
"long",
"parseParametersForPollingInterval",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"parameters",
")",
"throws",
"JournalException",
"{",
"String",
"intervalString",
"=",
"parameters",
".",
"get",
"(",
"PARAMETER_FOLLOW_POLLING_INTERVAL",
")",
";",
... | Find the polling interval that we will choose when checking for new
journal files to appear. | [
"Find",
"the",
"polling",
"interval",
"that",
"we",
"will",
"choose",
"when",
"checking",
"for",
"new",
"journal",
"files",
"to",
"appear",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multifile/MultiFileJournalHelper.java#L50-L73 |
8,892 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multifile/MultiFileJournalHelper.java | MultiFileJournalHelper.getSortedArrayOfJournalFiles | static File[] getSortedArrayOfJournalFiles(File journalDirectory,
String filenamePrefix) {
JournalFileFilter filter = new JournalFileFilter(filenamePrefix);
File[] journalFiles = journalDirectory.listFiles(filter);
Arrays.sort(journalFiles, new File... | java | static File[] getSortedArrayOfJournalFiles(File journalDirectory,
String filenamePrefix) {
JournalFileFilter filter = new JournalFileFilter(filenamePrefix);
File[] journalFiles = journalDirectory.listFiles(filter);
Arrays.sort(journalFiles, new File... | [
"static",
"File",
"[",
"]",
"getSortedArrayOfJournalFiles",
"(",
"File",
"journalDirectory",
",",
"String",
"filenamePrefix",
")",
"{",
"JournalFileFilter",
"filter",
"=",
"new",
"JournalFileFilter",
"(",
"filenamePrefix",
")",
";",
"File",
"[",
"]",
"journalFiles",... | Get the Journal Files that exist the Journal Directory, sorted by name. | [
"Get",
"the",
"Journal",
"Files",
"that",
"exist",
"the",
"Journal",
"Directory",
"sorted",
"by",
"name",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multifile/MultiFileJournalHelper.java#L78-L84 |
8,893 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/security/servletfilters/CacheElement.java | CacheElement.populate | public final void populate(Boolean authenticated,
Set<?> predicates,
Map<String, Set<?>> map,
String errorMessage) {
String m = m_cacheabbrev + " populate() ";
logger.debug("{}>", m);
try {
i... | java | public final void populate(Boolean authenticated,
Set<?> predicates,
Map<String, Set<?>> map,
String errorMessage) {
String m = m_cacheabbrev + " populate() ";
logger.debug("{}>", m);
try {
i... | [
"public",
"final",
"void",
"populate",
"(",
"Boolean",
"authenticated",
",",
"Set",
"<",
"?",
">",
"predicates",
",",
"Map",
"<",
"String",
",",
"Set",
"<",
"?",
">",
">",
"map",
",",
"String",
"errorMessage",
")",
"{",
"String",
"m",
"=",
"m_cacheabbr... | Populates this cache element with the given authenticated state
and named values, then puts it in the valid state.
Note: Prior to the call, the element must be in the invalid state.
TODO: The predicates parameter is deprecated and should be removed.
For now, callers can avoid a warning by giving it as null. | [
"Populates",
"this",
"cache",
"element",
"with",
"the",
"given",
"authenticated",
"state",
"and",
"named",
"values",
"then",
"puts",
"it",
"in",
"the",
"valid",
"state",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/security/servletfilters/CacheElement.java#L80-L105 |
8,894 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/recoverylog/JournalRecoveryLog.java | JournalRecoveryLog.getInstance | public static JournalRecoveryLog getInstance(Map<String, String> parameters,
String role,
ServerInterface server)
throws ModuleInitializationException {
try {
Object recoveryLog =
... | java | public static JournalRecoveryLog getInstance(Map<String, String> parameters,
String role,
ServerInterface server)
throws ModuleInitializationException {
try {
Object recoveryLog =
... | [
"public",
"static",
"JournalRecoveryLog",
"getInstance",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"parameters",
",",
"String",
"role",
",",
"ServerInterface",
"server",
")",
"throws",
"ModuleInitializationException",
"{",
"try",
"{",
"Object",
"recoveryLog",
... | Create an instance of the proper JournalRecoveryLog child class, as
determined by the server parameters. | [
"Create",
"an",
"instance",
"of",
"the",
"proper",
"JournalRecoveryLog",
"child",
"class",
"as",
"determined",
"by",
"the",
"server",
"parameters",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/recoverylog/JournalRecoveryLog.java#L50-L75 |
8,895 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/recoverylog/JournalRecoveryLog.java | JournalRecoveryLog.logHeaderInfo | public void logHeaderInfo(Map<String, String> parameters) {
StringBuffer buffer = new StringBuffer("Recovery parameters:");
for (Iterator<String> keys = parameters.keySet().iterator(); keys
.hasNext();) {
Object key = keys.next();
Object value = parameters.get(key... | java | public void logHeaderInfo(Map<String, String> parameters) {
StringBuffer buffer = new StringBuffer("Recovery parameters:");
for (Iterator<String> keys = parameters.keySet().iterator(); keys
.hasNext();) {
Object key = keys.next();
Object value = parameters.get(key... | [
"public",
"void",
"logHeaderInfo",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"parameters",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"\"Recovery parameters:\"",
")",
";",
"for",
"(",
"Iterator",
"<",
"String",
">",
"keys",
"="... | Concrete sub-classes should call this method from their constructor, or
as soon as the log is ready for writing. | [
"Concrete",
"sub",
"-",
"classes",
"should",
"call",
"this",
"method",
"from",
"their",
"constructor",
"or",
"as",
"soon",
"as",
"the",
"log",
"is",
"ready",
"for",
"writing",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/recoverylog/JournalRecoveryLog.java#L129-L138 |
8,896 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/recoverylog/JournalRecoveryLog.java | JournalRecoveryLog.log | public void log(ConsumerJournalEntry journalEntry) {
StringBuffer buffer = new StringBuffer();
buffer.append("Event: method='").append(journalEntry.getMethodName())
.append("', ").append(journalEntry.getIdentifier())
.append("\n");
if (logLevel == LEVEL_HIGH) {
... | java | public void log(ConsumerJournalEntry journalEntry) {
StringBuffer buffer = new StringBuffer();
buffer.append("Event: method='").append(journalEntry.getMethodName())
.append("', ").append(journalEntry.getIdentifier())
.append("\n");
if (logLevel == LEVEL_HIGH) {
... | [
"public",
"void",
"log",
"(",
"ConsumerJournalEntry",
"journalEntry",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"\"Event: method='\"",
")",
".",
"append",
"(",
"journalEntry",
".",
"getMethodName... | Format a journal entry for writing to the logger. Take logging level into
account. | [
"Format",
"a",
"journal",
"entry",
"for",
"writing",
"to",
"the",
"logger",
".",
"Take",
"logging",
"level",
"into",
"account",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/recoverylog/JournalRecoveryLog.java#L144-L184 |
8,897 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/recoverylog/JournalRecoveryLog.java | JournalRecoveryLog.log | protected void log(String message, Writer writer) {
try {
writer.write(JournalHelper.formatDate(new Date()) + ": " + message
+ "\n");
} catch (IOException e) {
logger.error("Error writing journal log entry", e);
}
} | java | protected void log(String message, Writer writer) {
try {
writer.write(JournalHelper.formatDate(new Date()) + ": " + message
+ "\n");
} catch (IOException e) {
logger.error("Error writing journal log entry", e);
}
} | [
"protected",
"void",
"log",
"(",
"String",
"message",
",",
"Writer",
"writer",
")",
"{",
"try",
"{",
"writer",
".",
"write",
"(",
"JournalHelper",
".",
"formatDate",
"(",
"new",
"Date",
"(",
")",
")",
"+",
"\": \"",
"+",
"message",
"+",
"\"\\n\"",
")",... | Concrete sub-classes call this method to perform the final formatting if
a log entry. | [
"Concrete",
"sub",
"-",
"classes",
"call",
"this",
"method",
"to",
"perform",
"the",
"final",
"formatting",
"if",
"a",
"log",
"entry",
"."
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/recoverylog/JournalRecoveryLog.java#L225-L232 |
8,898 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/rest/DatastreamFilenameHelper.java | DatastreamFilenameHelper.getExtension | private static final String getExtension(String MIMETYPE) throws Exception {
if (m_extensionMappings == null) {
m_extensionMappings = readExtensionMappings(Server.FEDORA_HOME + "/server/" + Server.CONFIG_DIR + "/" + DATASTREAM_MAPPING_SOURCE_FILE);
}
String extension = m_extensionMa... | java | private static final String getExtension(String MIMETYPE) throws Exception {
if (m_extensionMappings == null) {
m_extensionMappings = readExtensionMappings(Server.FEDORA_HOME + "/server/" + Server.CONFIG_DIR + "/" + DATASTREAM_MAPPING_SOURCE_FILE);
}
String extension = m_extensionMa... | [
"private",
"static",
"final",
"String",
"getExtension",
"(",
"String",
"MIMETYPE",
")",
"throws",
"Exception",
"{",
"if",
"(",
"m_extensionMappings",
"==",
"null",
")",
"{",
"m_extensionMappings",
"=",
"readExtensionMappings",
"(",
"Server",
".",
"FEDORA_HOME",
"+... | Get the file extension for a given MIMETYPE from the extensions mappings
@param MIMETYPE
@return
@throws Exception | [
"Get",
"the",
"file",
"extension",
"for",
"a",
"given",
"MIMETYPE",
"from",
"the",
"extensions",
"mappings"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/rest/DatastreamFilenameHelper.java#L104-L115 |
8,899 | fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/rest/DatastreamFilenameHelper.java | DatastreamFilenameHelper.readExtensionMappings | private static synchronized final HashMap<String, String> readExtensionMappings(String mappingFile) throws Exception {
HashMap<String, String> extensionMappings = new HashMap<String, String>();
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
Document doc = factory.newDoc... | java | private static synchronized final HashMap<String, String> readExtensionMappings(String mappingFile) throws Exception {
HashMap<String, String> extensionMappings = new HashMap<String, String>();
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
Document doc = factory.newDoc... | [
"private",
"static",
"synchronized",
"final",
"HashMap",
"<",
"String",
",",
"String",
">",
"readExtensionMappings",
"(",
"String",
"mappingFile",
")",
"throws",
"Exception",
"{",
"HashMap",
"<",
"String",
",",
"String",
">",
"extensionMappings",
"=",
"new",
"Ha... | Read the extensions mappings from config file
@returns new HashMap of mime-types to extensions mappings
@throws Exception | [
"Read",
"the",
"extensions",
"mappings",
"from",
"config",
"file"
] | 37df51b9b857fd12c6ab8269820d406c3c4ad774 | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/rest/DatastreamFilenameHelper.java#L123-L166 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.